The API key is no longer in the source code.
The database password is no longer in the deployment template. The certificate is no longer sitting in a shared folder. The cloud access key is no longer copied into a ticket.
They are all in a vault.
That is progress.
It is not the end of the problem.
A secret stored in Azure Key Vault or AWS Secrets Manager is still a credential. An application still needs permission to retrieve it. The secret still reaches a runtime. Rotation can still fail. A broad role can still expose it. A deleted key can still make protected data unavailable. A private endpoint can still be bypassed by an unintended path. A log can still reveal more than it should.
The first best practice for secrets management is therefore not to store every credential more carefully.
It is to eliminate every credential the workload does not need.
Use workload identity and temporary credentials wherever the platform supports them. Use Azure Key Vault or AWS Secrets Manager for the secrets that remain. Then design access, isolation, rotation, monitoring, and recovery as one operating system.
Start With the Credential Hierarchy
Teams often begin with a migration question:
How do we move our secrets into the vault?
The better first question is:
Which of these secrets should continue to exist?
Microsoft’s November 2026 Safe Secrets Standard puts identity ahead of storage. It recommends Microsoft Entra ID authentication and managed identities for supported Azure workloads, workload identity federation where appropriate, and automatic rotation for the remaining credentials that cannot yet be removed.
AWS makes the same architectural point through IAM. Its current IAM security guidance recommends that workloads use temporary credentials through IAM roles rather than long-term access keys. Workloads outside AWS can use federation or, for appropriate certificate-based scenarios, IAM Roles Anywhere to obtain temporary role credentials.
That produces a practical hierarchy:
- Use native workload identity. Prefer Azure managed identities, federated workload identities, AWS IAM roles, and temporary credentials.
- Use a managed secret service for unavoidable credentials. Azure Key Vault and AWS Secrets Manager are the primary services for application credentials, API keys, passwords, connection strings, tokens, and similar secrets.
- Treat long-lived credentials as exceptions. Give every exception an owner, business reason, scope, rotation method, expiration or review date, and retirement plan.
This distinction matters because a vault reduces the risk of storage and distribution. Identity can remove the shared credential altogether.
Put the Right Data in the Right Service
Not every setting is a secret.
Service names, endpoint URLs, feature flags, retry limits, environment labels, and other ordinary configuration values should not be placed in a secret store merely because the store is available.
Microsoft advises using Azure App Configuration or another appropriate data service for ordinary configuration rather than treating Key Vault as a general-purpose database. Its Key Vault secrets guidance reserves the service for sensitive values such as application credentials, passwords, connection strings, access keys, and private SSH keys.
AWS draws a similar boundary. Its Parameter Store comparison recommends AWS Secrets Manager for credentials and other secrets that need purpose-built controls such as automatic rotation, cross-account access, or fine-grained auditing. Parameter Store and AWS AppConfig serve different configuration use cases.
The decision rule is simple:
- If the value grants authority or reveals protected access, treat it as a secret.
- If the value changes application behavior but does not grant authority, treat it as configuration.
- If the workload can obtain access from its identity, do not create a stored secret for it.
Misclassification creates two kinds of failure. Putting ordinary configuration in the vault increases cost, latency, throttling pressure, and operational complexity. Putting credentials in ordinary configuration exposes them to systems and people that never needed secret access.
Design the Boundary Before Adding the Secrets
A central vault can become a central blast radius.
Azure’s current Key Vault security guidance recommends separate vaults by application, region, and environment. That keeps a development identity from becoming a path to production and limits how much a compromised workload can reach.
AWS Secrets Manager uses individual secrets, IAM policies, resource policies, KMS permissions, accounts, and Regions as overlapping boundaries. The design should still separate applications and environments. A role that reads one production database credential should not gain wildcard access to every secret in the account.
Before populating either service, decide:
- Which application or service owns the secret?
- Which environment and Region use it?
- Which workload identities may read it?
- Which identities may create, update, rotate, delete, restore, or change policy?
- Which KMS or Key Vault administrators can affect availability without reading the value?
- Which break-glass process applies?
- Which logs and alerts must exist before the secret becomes operational?
The runtime reader, secret manager, security administrator, and recovery operator should not silently become the same role.
Separate Runtime Access From Administration
Most applications need very little authority.
A production workload may need to retrieve one current secret. It probably does not need to list every secret, read historical versions, change resource policies, disable logging, modify network access, schedule rotation, or delete the vault.
In Azure, use managed identities and Azure RBAC for data-plane access. Avoid legacy Key Vault access policies for critical workloads. Use Privileged Identity Management for just-in-time administrative roles, require appropriate approval and MFA, and keep control-plane permissions separate from the ability to read secret values.
In AWS, use an IAM role for the workload and scope secretsmanager:GetSecretValue to the required secret resources. Review both identity policies and resource policies. AWS’s Secrets Manager best practices recommend restricting who can call PutResourcePolicy and using the secretsmanager:BlockPublicPolicy condition so a policy granting broad access cannot be attached casually. If a customer-managed KMS key is used, the key policy and IAM policy must preserve the same least-privilege boundary.
Do not measure least privilege by the number of policy statements.
Measure it by the result:
Can this identity retrieve any secret, version, or encryption key outside the exact business function it performs?
Use Private Paths, but Keep Identity as the Control
Network isolation reduces exposure. It does not replace authentication and authorization.
For Azure Key Vault, the most restricted common design disables public network access and uses Azure Private Link private endpoints. If public access is necessary, use the Key Vault firewall and explicitly approved networks. Review any trusted-service bypass carefully; not every Microsoft service participates, and a broad assumption about “trusted Azure traffic” is not a network design.
For AWS Secrets Manager, use an interface VPC endpoint through AWS PrivateLink for workloads operating in a VPC. Scope the endpoint policy as well as the identity and secret resource policies. AWS notes that conditions based only on source IP can fail or behave unexpectedly when AWS services access a secret on the workload’s behalf. VPC and endpoint conditions are useful, but they must be tested with rotation functions and every dependent service.
A private endpoint should answer where the request can travel.
The workload identity and policy should still answer who may retrieve what.
Rotation Is a Distributed Change
Changing the value in the vault is not the same as completing a rotation.
A successful rotation requires at least four things to agree:
- The target system accepts the new credential.
- The secret service stores the correct current version.
- Every authorized consumer refreshes its cached value.
- The previous credential is disabled only after the transition is proven.
Azure supports different automation patterns for keys, certificates, and secrets. For secrets backed by systems with one credential, teams must plan for a controlled update window. Where a target supports two credentials, alternating the inactive credential can reduce or eliminate downtime. Event Grid and Azure Functions can coordinate secret rotation and application refresh.
AWS Secrets Manager supports automatic rotation, including single-user and alternating-user strategies. A Lambda rotation function may need access to both Secrets Manager and the target database or service, which means its role, network path, and KMS permissions are part of the rotation boundary.
For both platforms:
- Set rotation frequency from the consequence and exposure of the credential, not a universal calendar rule.
- Use version labels or versionless references as designed so consumers can find the current value.
- Cache secrets in memory rather than retrieving them for every request.
- Refresh caches when rotation occurs and use bounded retry with exponential backoff.
- Test rollback and emergency rotation through the same mechanism used for routine rotation.
- Alert on rotation failure, stalled consumers, use of an old version, and unexpected retrieval after rotation.
The control objective is not “the secret changes every 60 days.”
It is:
The organization can replace the credential quickly, propagate it safely, prove that every required consumer changed, and revoke the old value without an outage.
Protect Availability as Deliberately as Confidentiality
Secrets systems are availability dependencies.
If a vault, key, policy, private DNS path, rotation function, or identity service is unavailable, the application may not start, scale, recover, or connect to its dependencies.
Azure recommends soft delete and purge protection so accidental or malicious deletion does not immediately become permanent. It also recommends backup for objects that cannot be recreated and regular restore testing. The design must account for the fact that deleting or disabling a key can also make every dependent encrypted service unavailable.
AWS Secrets Manager can replicate secrets across Regions for multi-Region workloads and recovery designs. Replication should follow the application architecture; copying a secret into another Region does not by itself prove that the target system, KMS permissions, application configuration, networking, and failover process are ready.
Recovery planning should distinguish three events:
- The stored object was deleted or corrupted. Can it be restored?
- The credential was exposed. Can it be replaced and the old value revoked everywhere?
- The secret service or Region is unavailable. Can the workload continue safely or fail in a controlled way?
Backups help with loss.
They do not remediate compromise.
Monitor the Decision, Not the Secret Value
Secret values should not appear in source repositories, deployment output, tickets, shell history, logs, traces, crash reports, or alert payloads.
The evidence around the secret should be rich even when the value remains invisible.
In Azure, enable Key Vault audit logging, Azure Monitor alerts, lifecycle notifications, and appropriate Defender for Key Vault detections. Use Azure Policy to enforce required settings and identify drift.
In AWS, use CloudTrail for Secrets Manager activity, CloudWatch for operational monitoring, AWS Config for compliance, GuardDuty where applicable, and IAM Access Analyzer to review public or cross-account access. Remember that secret names, descriptions, and tags are metadata; do not put sensitive values in them.
At minimum, preserve and review evidence of:
- Successful and denied retrievals.
- Policy, role, key, endpoint, and firewall changes.
- Secret creation, version changes, deletion, restoration, and replication.
- Rotation start, completion, failure, and rollback.
- Retrieval by an unexpected identity, Region, network path, or application.
- Use of stale credentials after a new version became current.
- Administrative access outside the expected change process.
The monitoring question is not merely whether the vault was contacted.
It is whether the request matched the expected workload, secret, version, path, and business purpose.
Test the Complete Secrets Control
A secure configuration review is useful.
It is not sufficient evidence that the secrets system works under stress.
Choose one representative production secret and test the complete path:
- Identity test: Confirm that the intended workload retrieves the secret without a stored cloud credential.
- Authorization test: Attempt retrieval from a different workload, environment, account, tenant, or role and verify denial.
- Network test: Attempt access outside the approved private path and verify the result.
- Rotation test: Rotate the credential and prove that the target system, secret version, application cache, and old-credential revocation all complete.
- Deletion test: Exercise the approved soft-delete or recovery process without endangering production data.
- Availability test: Verify application behavior when the secret service, DNS path, or identity dependency is temporarily unavailable.
- Evidence test: Reconstruct who retrieved or changed the secret, from where, under which policy, and with what result—without exposing the value.
- Emergency test: Simulate a leaked credential and measure how long it takes to replace it, validate consumers, revoke the old value, and investigate use.
This is where a collection of settings becomes an operating control.
What Security Leaders Should Do This Week
Select one application in Azure or AWS that depends on a stored credential.
- Ask whether the secret can be removed. Replace it with managed identity, workload federation, an IAM role, or another temporary-credential mechanism where supported.
- Classify what remains. Separate credentials from ordinary configuration and customer content.
- Draw the boundary. Map the application, environment, Region, identity, vault or secret, encryption key, network path, rotation function, and recovery owner.
- Reduce retrieval scope. Prove that the runtime identity can read only the required secret and cannot administer the store.
- Verify the private path. Test the Azure private endpoint or AWS VPC endpoint with every dependent workload and rotation component.
- Run one rotation. Observe the target update, new version, cache refresh, old-value revocation, logs, and alerts.
- Test one recovery path. Confirm that a deleted object can be recovered and that a compromised credential can be replaced through a different procedure.
- Set the retirement date. Give every remaining long-lived secret an owner and a plan to eliminate or revisit it.
Then ask the question that a vault dashboard cannot answer:
If this credential is exposed tonight, can we replace it everywhere, revoke it, keep the application running, and prove what happened?
If the answer depends on a person copying values between systems, the secret is centrally stored but not yet safely managed.
Build a Secrets Management System, Not a Secret Collection
Azure Key Vault and AWS Secrets Manager are strong platforms.
They provide the storage, access-control, encryption, versioning, rotation, monitoring, and recovery capabilities needed to manage secrets more safely.
The security result still depends on architecture and operation.
MicroSolved, Inc. can help organizations review cloud identity and secrets-management designs, test application and administrative access paths, assess rotation and recovery procedures, evaluate logging and alerting, and convert cloud-provider guidance into enforceable technical standards and validation plans.
Useful engagements may include:
- Azure Key Vault and AWS Secrets Manager architecture reviews.
- Workload identity and least-privilege assessments.
- Secret discovery and long-lived credential reduction planning.
- Rotation, revocation, backup, and recovery testing.
- Cloud configuration, policy, logging, and private-network validation.
- Application and API testing for credential exposure and authorization weaknesses.
- Incident-response exercises for leaked keys, tokens, passwords, and certificates.
To discuss a cloud secrets-management review, contact MicroSolved at info@microsolved.com or +1.614.351.1237.
Relax. We’re on watch.
AI tools were used as a research assistant for this content, but human moderation and writing are also included.
