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

what’s Teleport Workload Identity

Teleport Workload Identity is a feature of the Teleport Access Plane platform, designed to securely manage and authenticate workloads like servers, containers, or applications that need to access sensitive resources or services in a distributed environment. This feature eliminates the need for static credentials (such as API keys, certificates, or passwords) by providing a dynamic […] →Read more

X.509 PKI 介绍

什么是 X.509 和 PKI? X.509 是一种标准,用于定义数字证书的格式。 PKI(Public Key Infrastructure,公钥基础设施) 是一种系统,用来管理、分发和验证数字证书,从而确保网络通信的安全。 你可以把它想象成一个大型“安全信任体系”,其中每个人都有自己的“身份证”(数字证书),而 PKI 是负责制作、签发和验证这些“身份证”的机构。 关键概念 数字证书 类似于你的网上身份证,里面包含了: 你的公开信息(比如姓名、组织等)。 你的“公钥”(别人用它给你加密消息)。 签发证书的机构信息。 证书的有效期。 常见格式就是 X.509 证书。 证书颁发机构(CA, Certificate Authority) 类似权威的“派出所”或“政府机构”,负责发放和管理数字证书。 如果一个证书是 CA 签发的,那么大家就可以信任这个证书的真实性。 公钥和私钥 公钥:公开分享,别人用来加密给你的信息。 私钥:自己保管,解密别人发给你的信息。 这一对密钥是数字证书运作的核心。 信任链 如果你信任一个“总派出所”(根 CA),你也会信任它下属的分支机构(中级 CA),以及这些机构发放的证书。 X.509 PKI 是怎么工作的? 申请证书 你向 CA 提交一个申请,告诉它你是谁,并提供你的公钥。 颁发证书 CA 验证你的身份后,给你签发一张包含你的公钥和身份信息的数字证书。 使用证书 当你和别人通信时,可以把你的证书发给对方,让他们通过证书了解你的身份,并用你的公钥加密信息。 验证证书 对方收到你的证书后,会检查: 是不是由可信的 CA 签发的? […] →Read more