Architecture
Which services need trust relationships, and can a safer workload identity reduce long-lived secret use?
Lesson A11.4
Software often depends on sensitive credentials, keys, tokens, and configuration to authenticate services and protect important operations. Secure architecture must govern those secrets across their entire lifecycle — without exposing the values themselves.
This lesson uses metadata-only fictional records. You will work with ownership, purpose, scope, environment, storage class, rotation, status, dependencies, and retirement evidence. No real passwords, tokens, keys, cookies, or credentials are used or requested.
Lesson Progress
High School Advanced • A11: Secure Software Architecture • Lesson 4 of 10
Readiness Check
0/4 ready
Professional Hook
Imagine a fictional application needs a credential to connect to a reporting database. The team may know the credential exists, but secure architecture needs many more answers.
Who owns it? Which service is allowed to use it? Which environment does it belong to? What permissions does it carry? Where is it stored? When is it rotated? Which services depend on it? How would the team know rotation failed? What happens when the reporting job is retired?
The value is secret. The governance should be visible.
Learning Objectives
Explain why secrets management is a lifecycle and governance problem rather than simply a storage problem.
Distinguish secret values from metadata such as owner, purpose, environment, access scope, rotation date, expiration, and status.
Evaluate fictional secret records for ownership, environment separation, least privilege, rotation, redaction, monitoring, and retirement readiness.
Recognize common design weaknesses such as embedded secrets, shared secrets, stale credentials, overbroad access, weak ownership, missing rotation, and unsafe logging.
Build a metadata-only secrets governance model that connects A11 requirements, threat modeling, review, testing, deployment, and maintenance.
Why It Matters
Secrets are often treated as a small implementation detail, but their lifecycle touches architecture, identity, configuration, dependencies, deployment, logging, monitoring, incident response, and retirement.
Which services need trust relationships, and can a safer workload identity reduce long-lived secret use?
How does the approved workload receive access without copying secret values into code or ordinary configuration?
Who owns rotation, monitoring, exceptions, revocation, and retirement after release?
Core Framework
A secret should have a beginning, controlled use, review points, and a clear end. A lifecycle model helps prevent forgotten credentials, uncontrolled copies, unclear ownership, and indefinite access.
Why does this secret exist and what system or workflow needs it?
Define business purpose, secret type, owner, environment, approved system, initial scope, expiration expectation, and whether a less-sensitive design could avoid the secret entirely.
Where should the secret be kept?
Use approved managed storage or platform mechanisms rather than source code, shared documents, chat messages, tickets, or unprotected configuration.
How does the approved workload receive access?
Limit delivery to the intended service, environment, identity, and workflow. Avoid unnecessary copying or human exposure.
What is the minimum access necessary for the secret's purpose?
Apply least privilege, environment separation, purpose limitation, and appropriate service identities. Do not expose values in logs, errors, dashboards, or user interfaces.
How would the team know if governance or access changed?
Monitor ownership, access-policy changes, failed access, stale rotation, expiration, source health, configuration drift, and unauthorized copying indicators at a policy level.
How is the secret replaced safely without breaking the service?
Define rotation owner, schedule, compatibility window, dependent services, validation steps, rollback, and evidence that the old secret was retired.
When must access be removed immediately?
Revoke when purpose ends, ownership changes, a service is retired, access is no longer needed, or governance evidence indicates the secret should no longer be trusted.
How do we prove the secret is no longer active or needed?
Confirm old values are no longer referenced, dependent workflows use approved replacements, permissions are removed, and the metadata record is closed.
Secret Categories
The exact technology can differ, but the governance questions remain similar. In this lesson, we only discuss categories and metadata.
Allows an approved service or workload to authenticate to another approved system.
Governance: Owner, system identity, environment, destination, access scope, rotation, retirement.
Represents approved access to an API or external service.
Governance: Purpose, owner, allowed service, environment, scope, expiration, rotation, supplier dependency.
Supports approved protection or cryptographic operations.
Governance: Key owner, purpose, environment, rotation or lifecycle, service dependency, recovery policy.
Supports approved integrity or authenticity operations.
Governance: Owner, signing purpose, protected use, rotation, revocation, audit, retirement.
Allows an application or approved service identity to connect to a data service.
Governance: Application owner, database scope, environment, permissions, storage, rotation, monitoring.
Supports validation of approved webhook interactions.
Governance: Integration owner, environment, supplier, rotation, logging boundary, retirement trigger.
Vocabulary
A sensitive value used to authenticate, authorize, encrypt, sign, or otherwise protect a system interaction.
Non-secret information about a secret, such as owner, purpose, environment, type, scope, rotation date, status, and dependencies.
An approved managed system or platform mechanism designed to protect and control access to secret values.
Limiting secret access and permissions to the minimum needed for the intended service and purpose.
Keeping development, test, staging, and production secret access appropriately separated.
Replacing a secret with a new approved value according to policy or risk conditions while safely updating dependencies.
Ending the validity or access of a secret when it should no longer be trusted or used.
A defined point after which a secret should no longer be accepted without renewal or replacement.
Preventing sensitive secret values from appearing in logs, errors, dashboards, reports, or user-visible output.
The uncontrolled copying or spread of secrets across repositories, files, systems, people, or environments.
An identity assigned to a service or workload so it can authenticate without unnecessary shared human credentials.
A tightly governed emergency access path with explicit approval, monitoring, review, and limited use.
Design Principles
If an approved workload identity or platform-native trust mechanism can meet the need without a long-lived secret, reducing secret count can reduce lifecycle burden.
Source code, shared documents, tickets, chat messages, screenshots, and ordinary configuration files are poor places for secret values.
Development, test, staging, and production should not casually share the same secret values or access patterns.
A secret should only reach the service, identity, environment, and resource needed for its purpose.
Secrets should have a lifecycle. Teams need owners, review triggers, rotation procedures, validation, rollback, and evidence that old access is closed.
Security reviews should usually rely on metadata, status, policy, ownership, and validation evidence rather than exposing actual secret values.
Fake Dashboard
Fictional metadata only — no secret values
Tracked secret records
38
Metadata-only inventory; no values displayed
Owned records
36 / 38
Two production records need ownership remediation
Rotation compliance
92%
Three records are overdue or lack current review dates
Environment separation
97%
One legacy shared credential spans two services
Fake SOC Alert
Source: Fictional Secrets Governance Review • Time: 09:22
Fictional Secret Register
A security reviewer usually does not need to see the actual secret value. The register below shows how purpose, ownership, environment, storage, scope, rotation, and status can support governance review.
Purpose
Application service to internal record API
Owner
Application Platform Owner
Environment
Production
Storage
Approved managed secret store
Scope
Record API service identity only
Rotation
Every 90 days or on approved risk trigger
Concern
None in supplied metadata
Next action
Continue source-health and rotation review.
Purpose
Scheduling integration
Owner
Integration Owner
Environment
Production
Storage
Approved managed secret store
Scope
Scheduling API minimum approved operations
Rotation
Every 60 days
Concern
Supplier dependency change planned next quarter
Next action
Re-review scope and rotation before supplier migration.
Purpose
Reporting job to reporting database
Owner
Unknown
Environment
Production
Storage
Approved store listed
Scope
Read-only reporting role
Rotation
No current owner or review date
Concern
Ownership and rotation governance incomplete
Next action
Assign owner and rotation schedule before Confirmed status.
Purpose
Notification provider callbacks
Owner
Notification Service Owner
Environment
Staging
Storage
Approved managed secret store
Scope
Staging notification callback only
Rotation
Every 90 days
Concern
No production sharing allowed
Next action
Keep staging and production metadata separate.
Purpose
Approved release artifact signing
Owner
Release Engineering Owner
Environment
Build / Release
Storage
Protected signing service
Scope
Approved release pipeline only
Rotation
Policy-based lifecycle
Concern
Emergency access path requires quarterly review
Next action
Review emergency access evidence and approval logs.
Purpose
Old maintenance integration
Owner
Legacy Service Owner
Environment
Production
Storage
Migration pending
Scope
Two legacy services
Rotation
Manual and overdue
Concern
Shared access and overdue migration increase lifecycle risk
Next action
Replace with separate approved service identities and retire shared credential.
Fake Log Panel
[08:40] SEC-01 owner=Application Platform status=CONFIRMED rotation=current [09:05] SEC-02 supplier-change trigger opened for scheduling integration [09:22] SEC-03 owner=UNKNOWN rotation-review=missing [09:45] SEC-04 staging-only scope confirmed; production sharing=NOT ALLOWED [10:10] SEC-05 emergency-access review due this quarter [10:31] SEC-06 shared credential rotation overdue -> status=BLOCKED [11:02] REDACTION review confirms secret values absent from approved audit examples
Training note: this is fake data for defensive analysis practice only.
Review Questions
What business purpose requires this secret?
Could a safer identity or platform mechanism remove the need for a long-lived secret?
Who owns the secret metadata and lifecycle?
Which workload or person is allowed to use it?
Which environment does it belong to?
What is the minimum permission or scope needed?
Where is the value stored?
How is access delivered without unnecessary copying?
What is the rotation or expiration expectation?
What dependencies must be updated during rotation?
What evidence proves the old secret is retired?
How are policy changes and stale rotation monitored?
Which logs or dashboards must never reveal the secret value?
What future changes should trigger re-review?
Analyze the Evidence
Environment Separation
Different environments have different users, data, controls, and failure expectations. Sharing the same secret across environments can make a lower-trust environment part of the production trust model.
| Question | Weak pattern | Stronger pattern |
|---|---|---|
| Values | One shared credential for test and production | Environment-specific secret records and access |
| Ownership | Everyone on the team can use the production secret | Only approved workload identities and accountable owners have access |
| Storage | Local files or copied environment variables in documentation | Approved environment-specific managed storage |
| Monitoring | No distinction between environments | Environment-aware governance, access, and source-health monitoring |
| Retirement | Test credentials remain active indefinitely | Unused environment credentials are revoked and closed |
Rotation
Replacing a secret can affect every service that depends on it. Strong teams understand dependencies, plan compatibility, validate the replacement, monitor the change, preserve rollback where appropriate, and confirm old access is retired.
Identify the secret owner and dependent services.
Confirm the new secret or identity path is approved.
Update the intended consumers only.
Validate expected service behavior.
Monitor errors and source health during the change.
Keep rollback bounded and time-limited.
Revoke or retire the old secret after successful validation.
Update the metadata record and close the rotation evidence.
Redaction
Logs should help defenders understand who or what requested access, which secret record or service was involved, whether access succeeded, when the event happened, and which policy applied.
Secret record ID, service identity, environment, operation type, result, timestamp, policy decision, correlation identifier.
Secret value, token contents, passwords, private keys, session cookies, recovery codes, or unnecessary sensitive payloads.
Unexpected identity use, denied access, policy changes, stale rotation, exception use, or unusual ownership changes.
Whether the audit source is delivering current events, parsing correctly, and meeting retention expectations.
Common Mistakes
Why it fails: Repositories are designed for sharing and history, which can spread sensitive values far beyond the intended workload.
Better approach: Keep values in approved managed storage and reference them through approved runtime mechanisms.
Why it fails: A lower-trust environment can become linked to production access and make ownership or incident scope harder to understand.
Better approach: Use environment-specific access and governance.
Why it fails: Access can remain active after business purpose, ownership, or dependency conditions change.
Better approach: Define rotation, expiration, review triggers, and retirement evidence.
Why it fails: Nobody is accountable for rotation, scope, incident response, or retirement.
Better approach: Assign a named role or team and an escalation path.
Why it fails: Logs often have broader access and longer retention than the secret was intended to have.
Better approach: Log metadata and status, not secret values.
Why it fails: Each copy creates another location to govern, rotate, revoke, and audit.
Better approach: Prefer centralized managed access and workload identity where appropriate.
Why it fails: A secret change can break services when consumers, compatibility windows, and rollback are not understood.
Better approach: Map dependencies, validate the new path, retire the old value, and preserve rollback where appropriate.
Why it fails: Unused credentials can survive the system they once supported.
Better approach: Treat secret revocation and retirement as required end-of-life evidence.
Scenario Decision Lab
A production database credential is stored in an approved secret system and has read-only scope. During release review, the team discovers that no owner or current rotation review is recorded.
Scenario Decision Lab
Two legacy services still use the same fictional shared credential. The team plans to replace it as part of a migration, but several dependent workflows have not yet been documented.
Safe Fictional Lab
Use only fictional records. Do not enter any real password, token, key, cookie, credential, hostname, internal route, or production configuration.
Create at least eight fictional secret records.
Give each record a stable ID.
Record type and business purpose.
Assign an owner.
Record environment and approved storage class.
Define the minimum service or workload scope.
Define rotation or expiration expectations.
List dependent fictional services.
Record monitoring and redaction expectations.
Assign status: Confirmed, Conditional, Unknown, Blocked, or Retired.
Add a next action for non-Confirmed records.
Define change triggers and retirement conditions.
Analyze the Evidence
Advanced Challenge
Review a fictional internal service-to-service workflow and ask whether a long-lived shared secret is necessary at all.
Which workload needs to authenticate?
Which service is the destination?
What business purpose requires the trust relationship?
Can an approved workload identity or platform-native mechanism reduce secret use?
Which environment is in scope?
What is the minimum permission needed?
Who owns the trust relationship?
What evidence validates the identity path?
What logging should exist without exposing values?
What happens when the workload is retired?
What change triggers reopen the design?
What residual risk remains?
The challenge is not to eliminate every secret. It is to minimize unnecessary long-lived secrets and make every remaining trust relationship governable.
Defender Habits
Skill Check
Check Your Understanding
Choose your answers first. Explanations appear only after submission.
Portfolio Prompt
Create the fourth artifact for your A11 Secure Software Design Assessment: a metadata-only secrets governance model for a fictional application. Include at least eight secret records with ID, type, purpose, owner, environment, storage class, scope, rotation or expiration, dependencies, monitoring, status, next action, change trigger, and retirement condition. Do not include any secret values.
Confidence / Readiness Reflection
A11.5 moves from secret governance to dependency and software supply chain risk. Before continuing, make sure you can review secrets without ever needing to reveal the actual values.
I can distinguish a secret value from secret metadata.
I can explain why ownership, environment, scope, rotation, monitoring, and retirement are part of secret security.
I can identify secret-sprawl and shared-credential risks conceptually.
I can plan a rotation using dependency, validation, rollback, and retirement evidence.
I can keep secret values out of logs, reports, dashboards, labs, and portfolio artifacts.
Portfolio Build Guide
Never include real values. Show ID, purpose, owner, environment, scope, lifecycle, and status.
Make clear which records belong to development, staging, production, build, or integration workflows.
Every record should have an accountable owner or remain visibly Unknown.
Document the fictional services that must be updated or validated during rotation.
Explain which metadata may appear in logs and which secret values must never appear.
If a legacy shared secret remains, make the exception time-bounded, owned, monitored, and tied to migration.
Record how service shutdown, supplier change, or architecture replacement closes the secret lifecycle.
Link secret records to requirements and threat-model concerns from A11.2 and A11.3.
Key Takeaways
Lesson Safety Boundary
This lesson does not request or authorize access to real passwords, tokens, keys, cookies, recovery codes, credentials, repositories, applications, APIs, devices, or networks. Use metadata-only fictional records and approved design evidence.
Lesson Complete
You now have a metadata-first secrets governance model covering ownership, scope, storage, environment separation, redaction, rotation, revocation, monitoring, and retirement. Next, A11.5 expands software risk to Dependency and Supply Chain Risk Concepts.