CyberArk SECRET-SEN study materials
CyberArk SECRET-SEN study resources

Splitting a Monolithic Application Policy Branch

CyberArk SECRET-SEN · Put your knowledge to work in context.

All case studies

Splitting a Monolithic Application Policy Branch

The Secrets Manager policy for a retail platform has grown into a single branch named apps. It holds 40 variables and one layer, apps-hosts, whose 700 host identities are granted read on the entire branch. During an access review the security team finds that host identities belonging to the loyalty team can read the payroll database credential, and that 30 microservices all authenticate as the same host identity, saas-deployer. Fourteen product teams share the branch. Auditors have asked for read-only visibility into all policy and entitlements without any ability to retrieve secret values. Policy changes deploy through a pipeline that loads the branch; a failed load two months ago left production hosts without entitlements for 20 minutes and caused an incident. No one can say which of the 700 hosts are still in use.

1. Design the target policy structure and the migration order that avoids another entitlement outage.

Read the worked answer

Target structure: one branch per team under apps/ (for example apps/loyalty, apps/payments), each owning its own layer, its own variables, and a single grant from that layer to those variables. Keep a small apps/common branch only for variables genuinely shared by more than one team, and grant it explicitly per consumer layer. Team branches must not be able to reference each other's variables; that isolation is the point.

Migration order - additive first, destructive last:

  1. Inventory before moving. Derive actual usage from audit records of variable retrievals over the last 90 days to identify which of the 700 hosts are live. Hosts with zero retrievals go on a retirement list, not into a new layer.
  2. Create new branches with new variables and layers, and grant them. Nothing is revoked in this step, so a bad load cannot remove access.
  3. Run in parallel. Applications move to the new variable paths team by team, configured through the deployment pipeline, not by hand.
  4. Confirm zero reads on old paths for at least one full release cycle and one rotation.
  5. Revoke and delete the old grants and variables, one team at a time.

Protecting the load itself: stage the policy in a non-production deployment and diff the resulting entitlements before promoting; keep the previous policy files in version control so rollback is a re-load of a known-good tree; and make each load scoped to a single team branch so a failure affects one team rather than 700 hosts.

2. How do you satisfy the auditors' need for visibility without granting them the ability to read secret values?

Read the worked answer

Separate two questions the auditors are really asking: 'can you show me the policy and who is entitled to what' and 'can you show me who actually read each secret'. Neither requires retrieving a value.

Visibility of policy and entitlements: grant the audit group read on the policy tree - branches, layers, hosts, and the grants between them. In Secrets Manager, retrieval of a variable value requires the execute privilege on that variable, while read lets a principal see the resource and its metadata. Grant read broadly at the branch level and deliberately withhold execute. Verify the boundary by having an audit account attempt a retrieval in a test environment and confirming denial - a grant is not proven until a negative test passes.

Visibility of access to values: this comes from the audit records, not from the API. Export authentication and variable-access events to the SIEM and give auditors a standing report: principal, variable, timestamp, source, outcome. That is stronger evidence than any live access, because it is complete and tamper-evident.

If a value must occasionally be viewed: use a break-glass path with a documented request, time-bound entitlement, approval by a second person, and a ticket reference, then revoke. Never convert a one-off need into a standing grant.

Remember that read access to the policy tree reveals credential names and ownership, which is sensitive metadata. Scope the audit group to all branches but treat the exported entitlement report as confidential.

3. Thirty microservices share the host identity saas-deployer. What is the risk and what is the migration path?

Read the worked answer

The risk is fourfold: the API key is copied into 30 places, so its exposure surface is 30 workloads; the audit trail records one identity, so an incident cannot be attributed to a service; any grant made for one service's convenience is silently available to all 30; and revoking or rotating the identity is a 30-service change window, which in practice means nobody rotates it.

Migration path:

  1. Inventory the consumers. Use audit records to list every source address and timestamp authenticating as saas-deployer, and map each to a workload owner.
  2. Choose an identity source per workload rather than a static key: workload-attested authentication where the platform supports it (for example the Kubernetes authenticator bound to a namespace and service account, or a JWT authenticator bound to the workload's own claims). Each service gets its own host identity.
  3. Create one layer per service group and grant only the variables that group reads. Do not add the new hosts to a broad layer 'for now' - that recreates the problem.
  4. Cut over one service at a time and watch for authentications still arriving as saas-deployer from that service's addresses; a service is only migrated when its old-identity traffic stops.
  5. Revoke and delete saas-deployer once traffic is zero for a full release cycle, and confirm with a negative test that the old key no longer authenticates.

Expect resistance where the workload cannot attest its identity. Those cases get a temporary exception with a named owner and expiry, and stay on a short rotation cycle in the meantime.