Skip to content
Cloud and infrastructure

Cloud secrets and configuration: control the whole lifecycle

An application works because someone copied a production API key into a deployment setting months ago. Nobody knows which services use it or what will break when it changes. A secret manager improves storage, but reliable operation also requires clear access, ownership and a tested path from creation to revocation.

Cloud secret lifecycle connecting ownership, workload identity and tested credential replacement

Treat secret values, ordinary configuration and cryptographic keys according to their purpose. A database password grants access. A timeout controls behavior. An encryption key may be needed to read historical data. Putting all three behind the same change procedure can create avoidable security and availability problems.

Begin with one important integration and trace how its credential reaches the running application. Name the owner, permitted consumers, target service and replacement process. This gives the team a concrete pattern it can reuse without distributing privileged values to everyone who deploys software.

01Inventory purpose and dependencies before choosing storage

Record the secret’s purpose, environment, owner, consumers and target account. Keep the value out of the inventory. A useful entry tells an operator who to contact and which business function is affected, rather than becoming another place where credentials are copied.

Distinguish an access credential from an encryption key. Replacing a password usually changes how a service authenticates. Retiring a key used to encrypt historical records can make those records unreadable unless the data and key lifecycle have been planned together.

ItemTypical purposeOperating decision
Service credentialAuthenticate to a database or external APIWho consumes it and how access is replaced
Workload identityIdentify a running service to the cloudWhich role and short-lived access it receives
Nonsecret configurationSet a limit, address or feature behaviorValidation, versioning and controlled rollout
Cryptographic keyEncrypt, decrypt, sign or verify dataRequired operations and historical key access
Secret referenceIdentify a stored credential or versionWhether the reference reveals sensitive metadata
Classify actual use and sensitivity. A configuration field is not harmless merely because its name lacks the word password.

Separate environments in the inventory and access design. A development process should not receive production credentials as a shortcut. Identify any shared external account deliberately, including the effect of revoking it on more than one application.

For an order system that calls a shipping provider, list the web service, background job and recovery tool that need access. They may require different capabilities. A tool used to inspect a delivery failure does not necessarily need permission to create shipments.

The cloud security responsibilities guide provides the wider ownership context. Assign the application and business owners as well as the cloud administrator; the person managing storage may not know every operational dependency.

02Prefer an identity over another long-lived credential

AWS IAM guidance recommends temporary credentials through roles for workloads and least-privilege permissions. Where the platform and integration support it, let the running service obtain appropriate access through its identity instead of distributing a permanent account key.

This changes the starting question from where to store a master key to which identity should perform this task. Give each important workload an identifiable role and define the relevant trust conditions. Review deployment identities separately from the identities used by running services.

External providers may still require static tokens. Store those through the chosen secret-management service and grant the consuming workload access to the specific credential. Avoid giving it permission to enumerate or modify unrelated secrets simply because that makes initial setup easier.

Four cloud-secret checks: clear owner, restricted consumer, controlled version and tested replacement
The secret’s stored value is one part of a larger relationship between identity, application and target service.

Separate permissions to read a value, publish a new version, change access and delete the secret. Decide which roles genuinely need each operation. A deployment pipeline may need to refer to a secret without requiring its plaintext value in the build environment.

Review human access as a distinct path. Operators need a way to diagnose failures and request exceptional access, with appropriate records and limits. Giving the entire engineering team routine access to every production token makes ownership and incident investigation harder.

Test denied access as well as permitted access. The shipping worker should obtain its required token, while an unrelated analytics job should fail. A successful application request alone does not show whether the surrounding permissions are appropriately restricted.

03Deliver values without turning diagnostics into storage

Google Cloud’s Secret Manager guidance recommends identity-based access and discusses exposure risks from filesystem and environment-variable delivery. It also recognizes integrations that use those methods. Choose the supported route for the workload and assess its actual exposure.

Keep production values out of source repositories, container images and ordinary build artifacts. Use sample configuration that describes required names and formats without including usable credentials. An encrypted file still needs a considered way to obtain its decryption key.

A value placed in an environment variable does not become protected automatically. Debug dumps, exception reports and support bundles may copy it. For a supported environment-based integration, control the process access and diagnostics that could reveal the value.

OWASP’s secrets-management guidance covers least privilege, auditing and the secret lifecycle, and says secrets should never be logged. Record identifiers, outcomes and version context where useful, while excluding the credential itself from application and pipeline output.

Inspect the full path: startup, a failed request, retry handling and a diagnostic export. Check HTTP headers, connection strings and provider error messages. A redaction rule for one property name may miss the same token when it appears inside a different message.

A secret intended for server authentication must remain on the server. Moving it into a browser bundle or mobile client distributes it to users who can inspect that client. If a provider offers a deliberately public identifier, distinguish that documented role from a private access credential.

04Treat rotation as a coordinated change

Define what changes at the target service and what changes in the application. Creating a new stored version does not necessarily update a database password or invalidate an external token. Rotation is complete only when the intended consumers work with the replacement and the old access is retired as planned.

AWS Secrets Manager’s rotation documentation describes creation, target credential change, testing and completion for its Lambda rotation workflow. The important operating distinction is that stored and target credentials must move together, with testing before the new version becomes current.

Find every consumer before the change, including rarely run jobs and operational tools. A web service can pass a quick health check while an overnight reconciliation still uses the retired value. Tie the validation to the business operations that the credential enables.

Choose a replacement sequence suited to the provider. Some support a controlled overlap of two tokens; others replace a single credential. Document the allowed overlap, how applications refresh or restart and how the team knows that migration has finished.

Keep normal rotation and emergency containment separate. A planned change may allow staged rollout and a tested recovery path. A compromised old credential should not be restored simply because it is convenient. In an incident, the recovery decision must account for the continuing exposure.

Choose timing according to the credential’s risk, provider requirements and system behavior. Avoid assigning one universal rotation interval to every secret. Test the process often enough that an urgent replacement is an operating procedure rather than a first attempt during a failure.

05Version configuration and plan dependency failures

Keep nonsecret configuration in a controlled release process where changes can be reviewed and validated. Record expected types, permitted ranges and required fields. A mistyped provider endpoint or retry limit can interrupt the same business workflow as an invalid password.

Make the application’s effective configuration identifiable without exposing sensitive values. An operator should be able to tell which reviewed configuration and secret reference a service used. That context helps distinguish a deployment error from a target-provider problem.

Google Cloud recommends referencing specific secret versions rather than assuming the latest alias is always suitable. Apply the underlying release discipline to the chosen platform: decide when a consumer changes versions and how that change is validated. Dynamic credentials need their own appropriate refresh design.

Plan how startup and existing instances behave if the secret service is unavailable. Consider bounded retries, request limits and any permitted in-memory reuse. Do not silently switch to a bundled fallback production key or an anonymous connection to keep a health indicator green.

For an optional shipping-label integration, the order system might preserve an approved order while clearly marking label creation pending. If authentication is essential to a protected operation, fail it safely. Define this behavior by the business action rather than applying one fallback to every dependency.

The API integration guide discusses related recovery concerns. Include secret access and configuration changes in the integration’s operating plan so authentication failures have an owner and do not create duplicate downstream actions.

06Prepare for exposure and prove the process

Write an incident path that starts with the credential’s identity and affected systems. Identify who can revoke it at the target, who can deploy a replacement and who assesses the evidence. Store these instructions where the team can reach them during the relevant outage.

When a value is exposed, remove the access it grants and replace it through the controlled path. Deleting a visible copy does not establish that nobody retained it. Review repository history, build artifacts, logs or support exports as relevant to the actual exposure.

Secrets-management rollout: inventory dependencies, restrict identity, test replacement and exercise incident recovery
Prove the access and replacement path for one integration before extending it across the cloud environment.

Preserve useful incident evidence while preventing further disclosure. Record access outcomes, administrative changes and the remediation timeline without reproducing the secret in tickets. Choose notifications and investigation scope from what the credential allowed, rather than assuming every leak has the same impact.

Protect emergency access and recovery dependencies. If a secret-management outage prevents operators from authenticating to repair the service, the recovery design has a circular dependency. Provide an appropriately controlled alternative with an owner, use records and regular review.

Exercise the pattern with one real integration: ordinary access, denied access, replacement, consumer refresh, failed rotation and emergency revocation. Report whether the business action still behaves correctly. A stored-secret inventory and a successful backup are useful, but they do not prove that the application can recover.

07Questions about cloud secrets and configuration

What counts as a secret?

A value that grants access or must remain confidential, such as a private API token or database password. Classify by actual purpose and sensitivity. Some configuration values and references can also reveal information that needs protection.

Does a secret manager remove the need for access controls?

No. The consuming identity, permitted operations and human access still need design. Restrict reading, updating and administration separately, and test that an unrelated workload cannot access the credential.

Are environment variables always safe for secrets?

No. They can be exposed through process access, diagnostics or dependencies that print the environment. Some supported integrations use them, so assess the actual delivery path and control every diagnostic path that might reveal the value.

Can one production token be shared by every service?

It creates coupled replacement and makes activity harder to attribute. Prefer separately identifiable workloads and suitably scoped credentials where supported. Document unavoidable sharing and the consumers affected by revocation.

Is publishing a new version the same as rotating a credential?

Not necessarily. The target service and every relevant consumer must use the replacement, and the old access needs to be retired appropriately. Test the business operation before declaring the process complete.

What happens when a secret is committed to a repository?

Treat the access as exposed and follow the incident procedure, including revocation and replacement. Removing the current file is insufficient by itself. Review relevant copies and history without spreading the value through tickets or logs.

Can old encryption keys be deleted after rotation?

Only according to the planned data and key lifecycle. Historical records may still require them for decryption or verification. Access-credential replacement and cryptographic-key retirement are different operating decisions.

LISTIFY teamWebsites, apps and marketing from Prague since 2008

More articles

All articles →
Cloud and infrastructureOctober 6, 2026 · 11 min read

Backups that restore: put the 3-2-1 rule into practice

Cloud and infrastructureOctober 6, 2026 · 9 min read

Logging and observability: connect metrics, logs and traces

Cloud and infrastructureOctober 4, 2026 · 9 min read

Cloud networks and VPNs: connect your business without opening everything

Share this page

By email

Got an idea?

On a short call, we'll find out what you need and suggest the next step. Then you'll get a proposal with a fixed price and a timeline.

+420 771 166 199Mon to Fri, 8:30 a.m. to 4:00 p.m. (Prague time) · info@listify.cool

When should we call you?

Pick a day and a time window. We'll call you, and it takes about 15 minutes.

Day