how to use teleport bot to issue certificate and save it into aws secret manager?

To use Teleport (a popular tool for secure access to infrastructure) to issue a certificate and save it into AWS Secrets Manager, follow these steps: Prerequisites: Teleport Setup: Ensure you have Teleport installed and configured. A Teleport bot must be running and properly authenticated to issue certificates. AWS CLI: Ensure the AWS CLI is installed […] →Read more

what’s the difference between AWS role permission policies and trust entities?

In AWS Identity and Access Management (IAM), role permission policies and trust entities serve distinct but complementary purposes: 1. Permission Policies Definition: Permission policies define what actions an IAM role can perform on specific AWS resources. Scope: These policies are attached to the role itself and specify the permissions granted to anyone or anything assuming […] →Read more

Self-Signed Certificate

自签名证书(Self-Signed Certificate)本质上并不依赖于外部的证书颁发机构(CA),因为它本身就是自己的 CA。换句话说,自签名证书的签发者(Issuer)和使用者(Subject)是同一个实体。 自签名证书的特点 Issuer 与 Subject 相同 自签名证书自己签署自己,所以在证书的 Issuer 和 Subject 字段中,都会看到相同的内容。 示例: Issuer: CN=MyRootCA, O=My Organization, C=US Subject: CN=MyRootCA, O=My Organization, C=US 没有外部验证 它的合法性完全依赖于你自己信任它,而不是通过第三方 CA 的认证。 使用时需要将自签名证书显式添加到“受信任证书”列表中。 用途 开发、测试环境。 小型闭环系统(如内网)。 为 CA 系统创建根证书(自签名证书可以成为其他证书的信任根)。 自签名证书的 CA 功能 一个自签名证书可以充当根 CA 证书,从而签发其他子证书(如服务器证书)。具体步骤如下: 生成自签名证书 使用 openssl 或类似工具生成密钥对。 自己使用私钥对证书内容进行签名,生成自签名证书。 签发其他证书 自签名证书作为“CA”,用它的私钥签署 CSR(证书签名请求),从而生成子证书。 如何生成自签名证书 以下以 OpenSSL 为例,生成一个自签名证书: 步骤 1:生成私钥 […] →Read more

Credential settings retrieval order

@startuml start floating note: Credential settings retrieval order : 1. Java system properties; : 2. environment variables; : 3. web identity token from AWS STS; : 4. the shared credentials and config files; : 5. Amazon ECS container credentials; : 6. Amazon EC2 instance IAM role-provided credentials; end @enduml The default credentials provider chain of the SDK for Java […] →Read more

How to call go function by java JNI

To use JNI to call the CreateRole function of the Teleport Go client, you need to expose this functionality through a Go shared library, following the steps below. The goal is to make the Go function callable from Java by wrapping it in a JNI-compatible interface. 1. Understand the Function Signature The Go function you […] →Read more

What’s OIDC

What is OIDC (OpenID Connect)? OIDC (OpenID Connect) is an open authentication protocol built on top of OAuth 2.0 that enables secure and seamless user authentication. It allows clients (such as web or mobile applications) to verify the identity of a user based on the authentication performed by an identity provider (IdP) and obtain basic […] →Read more

什么是 AWS Well-Architected Framework?

什么是 AWS Well-Architected Framework? AWS Well-Architected Framework 是 AWS 提供的一套最佳实践指导,用于帮助客户设计和优化其云架构。通过这套框架,企业可以评估其应用程序和工作负载是否符合高性能、可扩展、安全、经济高效和可靠的标准。 五大支柱 (The Five Pillars) AWS Well-Architected Framework 的核心是围绕以下五大支柱展开: 操作卓越 (Operational Excellence): 专注于支持开发和运行工作负载的高效操作。 包括自动化运维任务、监控系统和持续改进流程。 关键实践: 定义明确的操作流程。 使用基础设施即代码 (IaC)。 自动化变更管理和事件响应。 安全性 (Security): 保护信息、系统和资产的机密性、完整性和可用性。 包括访问控制、数据保护和事件响应等领域。 关键实践: 实现最小权限访问控制。 加密敏感数据(静态和传输中)。 定期审计和测试安全配置。 可靠性 (Reliability): 确保工作负载能够在预期范围内运行并快速恢复。 涉及系统设计、故障处理和冗余规划。 关键实践: 实现自动化故障恢复。 使用多区域和多可用区架构。 定期测试备份和恢复流程。 性能效率 (Performance Efficiency): 使用计算资源高效满足需求。 通过选择合适的服务和优化架构实现性能优化。 关键实践: 选择合适的实例类型和存储选项。 利用无服务器 (Serverless) 技术。 监控性能并动态调整资源。 […] →Read more

什么是 Instance Profile?

什么是 Instance Profile? 在 AWS 中,Instance Profile 是一种特殊的容器,用于将 IAM 角色附加到 EC2 实例上,使实例内的应用程序能够以角色的权限来访问 AWS 服务。Instance Profile 是 IAM 角色与 EC2 实例之间的桥梁,它允许角色的临时凭证通过 EC2 的实例元数据服务提供给实例内的应用程序。 Instance Profile 的作用 为 EC2 实例提供 IAM 角色的权限: 通过将 Instance Profile 关联到 EC2 实例,实例中的应用程序可以安全地使用 IAM 角色的权限,而无需嵌入 AWS 密钥或凭证到代码中。 自动获取临时凭证: 使用 AWS SDK、CLI 或者实例元数据服务,应用程序可以自动获取与角色相关联的临时凭证,避免手动管理长期凭证。 提升安全性: 避免将长期访问密钥存储在 EC2 实例中,降低密钥泄漏风险。 配合 IAM 策略,确保实例只能访问所需的最小资源。 支持动态权限调整: 通过修改 IAM […] →Read more

Teleport’s Access Management compared with AWS IAM Role

Teleport’s Access Management mechanism provides a secure and unified way to manage access to infrastructure resources, combining identity-based authentication, roles, and automation tools. Here’s how it compares to AWS IAM concepts and works: 1. Role-Based Access Control (RBAC) AWS IAM: Uses IAM roles to define a set of permissions for what an identity (user, group, […] →Read more