Study Guide890 words

Evaluating Strategies for Secure Secrets and Credentials Management

Evaluating a strategy for the secure management of secrets and credentials

Evaluating Strategies for Secure Secrets and Credentials Management

This study guide focuses on the architectural strategies required to manage sensitive access information—such as API keys, database passwords, and IAM credentials—within the AWS ecosystem, aligned with the SAP-C02 exam requirements.

Learning Objectives

After studying this guide, you should be able to:

  • Evaluate the trade-offs between permanent and temporary credentials.
  • Select the appropriate AWS service (Secrets Manager vs. SSM Parameter Store) for specific secret storage requirements.
  • Design secure access patterns for external workloads using Cognito and IAM Roles Anywhere.
  • Implement the Principle of Least Privilege using automated auditing tools like IAM Access Analyzer.

Key Terms & Glossary

  • Secret: Any sensitive data required for application authentication, such as database credentials, API keys, or SSH keys.
  • Temporary Credentials: Short-lived access tokens provided by AWS STS that expire automatically, eliminating the need for manual rotation.
  • Identity Federation: A system that allows users to use existing identities (e.g., Google, Corporate AD) to access AWS resources.
  • Rotation: The security practice of periodically updating secrets to limit the impact of potential leakage.
  • Permissions Boundary: An advanced IAM feature used to set the maximum permissions that an identity-based policy can grant to an IAM entity.

The "Big Idea"

The core philosophy of secure secret management in AWS is: "The most secure credential is the one you don't have to store." By shifting from long-lived, static secrets (like IAM User Access Keys) to temporary, role-based identities, you significantly reduce the "blast radius" of a potential credential leak.

Formula / Concept Box

FeatureAWS Secrets ManagerSSM Parameter Store
Primary Use CaseSecrets requiring rotation (DB, API)General configuration and basic secrets
RotationNative support via LambdaManual or custom implementation
CostPer secret / per 10k API callsFree (Standard) / Per secret (Advanced)
Cross-AccountBuilt-in sharingPossible via Resource Access Manager
KMS IntegrationMandatoryOptional (SecureString)

Hierarchical Outline

  • I. Fundamental Principles
    • Least Privilege: Scoping permissions to the minimum required perimeter.
    • Ephemeral Identities: Using AWS STS for temporary tokens instead of IAM Access Keys.
  • II. External Access Strategies
    • Amazon Cognito: Identity pools for mobile/web clients to exchange OIDC/SAML tokens for AWS credentials.
    • IAM Roles Anywhere: Exchanging X.509 digital certificates for temporary AWS credentials for on-premises servers.
  • III. Secrets Storage & Lifecycle
    • AWS Secrets Manager: Vault for machine-to-machine secrets with automated rotation.
    • KMS Encryption: Envelope encryption for all secrets at rest.
  • IV. Auditing and Refinement
    • IAM Access Analyzer: Analyzing CloudTrail logs to generate fine-grained, action-level policies.

Visual Anchors

Credential Selection Logic

Loading Diagram...

The Risk Radius: Permanent vs. Temporary

\begin{tikzpicture} \draw[thick, fill=red!20] (0,0) circle (2.5cm); \node at (0,2) {\textbf{Permanent Credentials}}; \node at (0,1.5) {\small Infinite Validity}; \node at (0,1) {\small High Risk if Leaked};

code
\draw[thick, fill=green!20] (0,-0.5) circle (1cm); \node at (0,-0.5) {\textbf{Temporary}}; \node at (0,-1) {\small Expiring}; \node at (0,-1.4) {\small Low Risk};

\end{tikzpicture}

Definition-Example Pairs

  • IAM Roles Anywhere: A service to grant AWS permissions to workloads outside AWS using certificates.
    • Example: An on-premises legacy server needs to upload logs to S3; it uses its local corporate PKI certificate to assume an AWS role without needing an IAM User Access Key.
  • IAM Access Analyzer: A tool that uses logic-based analysis to identify resources shared with external entities.
    • Example: You run Access Analyzer on an S3 bucket and it alerts you that the bucket is accessible by an AWS account outside your Organization.

Worked Examples

Scenario: Rotating a Production Database Password

Problem: A Solutions Architect needs to implement a policy where the RDS PostgreSQL password is changed every 30 days without downtime.

Step-by-Step Breakdown:

  1. Storage: Store the initial username/password in AWS Secrets Manager.
  2. Encryption: Select a customer-managed KMS Key to encrypt the secret.
  3. Rotation Logic: Enable rotation and select the pre-defined Lambda rotation template for RDS PostgreSQL.
  4. Network: Ensure the Lambda function has VPC access to reach the RDS instance.
  5. Application Update: Modify the application code to call GetSecretValue using the AWS SDK instead of hardcoding the password in a config file.

Checkpoint Questions

  1. What is the primary benefit of using IAM Roles Anywhere over IAM User Access Keys for on-premises servers?
  2. How does IAM Access Analyzer help in achieving the Principle of Least Privilege?
  3. When should you choose AWS Secrets Manager over SSM Parameter Store for storing an API key?
  4. Which service facilitates the exchange of social identity provider tokens (like Google) for temporary AWS credentials?

Muddy Points & Cross-Refs

  • Secrets Manager vs. Parameter Store: This is a classic exam "trap." Always check if Rotation is mentioned. If yes, Secrets Manager is the answer. If only Cost is the concern and rotation isn't needed, Parameter Store is the choice.
  • Cross-Account Secrets: Remember that Secrets Manager requires both a Secret Policy and a KMS Key Policy that allows the external account's role to decrypt.
  • Cross-Ref: See Chapter 5: Determining Security Requirements for details on IAM Policy structure.

Comparison Tables

RequirementRecommended Solution
Mobile App accessing DynamoDBAmazon Cognito Identity Pools
On-prem server accessing S3IAM Roles Anywhere
Automatic Rotation of DB CredsAWS Secrets Manager
Storing a non-sensitive Environment NameSSM Parameter Store (Standard)
Refining overly permissive policiesIAM Access Analyzer

Ready to study AWS Certified Solutions Architect - Professional (SAP-C02)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free