Skip to content

Follow-up: Enforce Secrets Manager consumption for namespace workloads #36

@lweberru

Description

@lweberru

Background

In issue #35 we implemented namespace-scoped Kubernetes access and deterministic metadata binding to the app landing zone Secrets Manager instance via namespace annotations.

Current state:

  • stackit.cloud/secretsmanager-instance-id is set on managed namespaces.
  • This is a stable contract, but does not yet enforce workload-side secret consumption policy.

Goal

Add enforceable controls so workloads in managed namespaces must use the intended Secrets Manager integration path instead of unmanaged plain Kubernetes secrets.

Scope (proposal)

  1. Define enforcement strategy (admission policy and/or operator pattern).
  2. Add module-level toggles for enforcement mode.
  3. Implement policy resources and defaults for namespace-service-enabled landing zones.
  4. Add tests for allowed/denied paths.
  5. Document rollout and migration strategy.

Non-goals

  • Breaking existing workloads without a migration path.
  • Immediate hard-block in all existing namespaces by default.

Acceptance Criteria

  • Namespaces managed through namespace service can be configured with enforce mode.
  • Direct plain secret usage can be denied (configurable).
  • Approved Secrets Manager integration path remains functional.
  • Tests cover both compliant and non-compliant examples.

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestkubernetesterraformPull requests that update terraform code
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions