0
0
Microservicessystem_design~20 mins

Secrets management (Vault, AWS Secrets Manager) in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Secrets Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
How does AWS Secrets Manager handle secret rotation?

A microservice uses AWS Secrets Manager to store database credentials. What happens when automatic rotation is enabled?

AAWS Secrets Manager deletes the old secret and creates a new secret with a different name.
BAWS Secrets Manager updates the secret value and triggers a Lambda function to update the database credentials accordingly.
CAWS Secrets Manager requires manual update of the secret value by the user every time rotation is needed.
DAWS Secrets Manager disables the secret temporarily during rotation to prevent access.
Attempts:
2 left
💡 Hint

Think about how automation helps keep secrets fresh without downtime.

Architecture
intermediate
2:00remaining
Best practice for microservices accessing Vault secrets

You have multiple microservices that need to access secrets stored in HashiCorp Vault. What is the best way to manage access securely?

AEach microservice authenticates to Vault using its own unique identity and requests only the secrets it needs.
BMicroservices store Vault root token locally and use it to access any secret.
CAll microservices share a single Vault token with full access to all secrets.
DMicroservices access secrets by reading Vault's storage backend files directly.
Attempts:
2 left
💡 Hint

Consider the principle of least privilege and identity separation.

security
advanced
2:00remaining
What error occurs if a microservice tries to access a revoked AWS Secrets Manager secret?

A microservice tries to retrieve a secret from AWS Secrets Manager, but the secret has been revoked or deleted. What error will the microservice receive?

AResourceNotFoundException
BAccessDeniedException
CInvalidParameterException
DThrottlingException
Attempts:
2 left
💡 Hint

Think about what happens when a requested resource does not exist.

🧠 Conceptual
advanced
2:00remaining
Why use dynamic secrets in Vault for database credentials?

Vault can generate dynamic database credentials on demand. What is the main advantage of this approach compared to static secrets?

ADynamic secrets allow storing credentials in plain text files for easy access.
BDynamic secrets are cached indefinitely to improve performance.
CDynamic secrets require manual rotation by the administrator every week.
DDynamic secrets reduce the risk of long-term credential exposure by having short lifetimes and automatic revocation.
Attempts:
2 left
💡 Hint

Think about how temporary credentials improve security.

Best Practice
expert
2:00remaining
How to securely provide AWS IAM permissions for microservices to access Secrets Manager?

You want to allow a microservice running on AWS ECS to access specific secrets in AWS Secrets Manager. Which approach follows best security practices?

AUse the root AWS account credentials in the microservice to access Secrets Manager.
BEmbed AWS access keys with full Secrets Manager access inside the microservice container environment variables.
CAssign an IAM role to the ECS task with a policy granting least privilege access to only required secrets.
DGrant Secrets Manager full access to all ECS tasks in the AWS account.
Attempts:
2 left
💡 Hint

Consider AWS best practices for credentials and permissions.