Cloud Modernization Patterns Module 6 · Stay Modern

Machine Identity: Secretless Pipelines

Updated

Intermediate

What you'll learn

~20 min
  • Extend 'modern auth' past human sign-in to the machine identities that outnumber people
  • Replace stored service-principal secrets in CI with OIDC workload identity federation
  • Run the migration: inventory, federate, revoke, and alert on the stragglers

The half of “modern auth” everyone forgets

Say “modern auth” and everyone pictures the human half: single sign-on, MFA, conditional access. Meridian’s rebuild has all of that via Entra ID (Lesson 4.1). But walk the estate and count identities: a few hundred humans — and thousands of machine principals. Pipelines deploying infrastructure, apps reaching databases, jobs reading storage. The realistic 2026 pattern, observed across many estates: the workloads got modern identity (Lesson 2.3 wired managed identity and Key Vault references correctly), while the pipelines that deploy everything still authenticate with a service-principal client secret pasted into a CI variable two years ago.

That inversion — platform ready, pipelines lagging — makes CI the softest target in an otherwise-hardened estate. A stored secret is a bearer credential: anyone who exfiltrates the CI variable is the deployment principal, from anywhere, until someone notices. And these secrets expire, so someone rotates them by hand, badly, forever.

The fix: nothing stored, everything federated

Workload identity federation removes the stored secret entirely. The CI platform issues the pipeline run a short-lived, signed OIDC token asserting what it is (“repo X, branch main, environment prod”). The cloud’s identity provider is configured to trust that issuer for one specific subject — and exchanges the token for cloud credentials on the spot, as shown in this comparison diagram:

Stored-secret world:
pipeline has $AZURE_CLIENT_SECRET -> anyone with the value is you, 24/7,
from anywhere, until rotation
Federated world:
pipeline run proves "I am repo X / branch main / env prod" via OIDC
-> identity provider checks the claim against the federated credential
-> issues short-lived tokens, only for that subject, only during a run
Nothing to steal at rest. Nothing to rotate. Branch and repo are part
of the identity - a fork or feature branch simply is not the principal.

Prompt first: the migration

Switch your workspace agent to Plan mode on your CI/CD pipeline configuration files and ask it to plan the OIDC federation migration (if you do not have live exports or files handy, ask it to generate a small Meridian practice sample from the lesson’s scenario first):

Audit our CI/CD configuration for stored cloud credentials and plan an OIDC workload-identity federation migration ordered lowest-risk first. Include secret revocation at the identity provider, a regression guard, and flag any platform needing an exception.

Check that the plan or draft covers:

  • Inventorying every service connection or CI variable holding a client secret, key, or connection string, which pipelines use it, and when it was last rotated
  • Federated workload-identity replacements with exact subject claims (repository, branch, environment) and least-privilege role assignments scoped to what each pipeline deploys
  • A revocation sequence that deletes secrets from the cloud identity provider itself rather than only removing CI variables
  • A scheduled guard check that fails on any new stored cloud secret in CI config, plus a dated decisions-register exception for any platform that cannot support OIDC federation

If the plan stops after deleting the CI variable, follow up with: Add the commands to revoke the underlying credential on the cloud service principal after verifying the federated run.

Revoking at the identity provider is where migrations quietly fail if skipped: deleting the CI variable while the secret remains valid on the service principal leaves the credential alive in whoever’s clipboard it ever passed through. And the scheduled guard makes the posture self-maintaining, acting as a pipeline citizen like Lesson 6.3’s drift checks rather than a one-time cleanup.

The same rule, all the way down

Federation is one instance of the rule this training has been building since Lesson 2.3: identity is asserted and verified, never stored and presented.

ConnectionOld wayModern way
Pipeline → cloudClient secret in CI variableOIDC federation
App → databaseConnection string with passwordManaged identity + directory auth
App → vaultAccess key in configManaged identity + reference resolution
Cluster workload → cloudMounted credential fileWorkload identity — the same OIDC pattern, in-cluster
Human → everythingPasswordSSO + MFA + conditional access

When every row is identity-based, Lesson 4.1’s “configuration contains references, never values” stops being an app-hardening rule and becomes the estate’s physics: there is simply nothing lying around to steal.

💡This is a fleet-week, not a program-quarter

Federation migrations look scary and are mostly mechanical: each service connection is an independent, reversible change (federate, verify a deploy, revoke). An agent generates the inventory and the per-connection configs in an afternoon (Lesson 5.1 economics); humans review the role assignments — least-privilege scoping is the judgment call that deserves the attention (Lesson 5.2’s rule). The guard pipeline keeps it done.

KNOWLEDGE CHECK

During the migration, a teammate proposes: 'Just move the client secrets from CI variables into the key vault, and have pipelines fetch them at run time -- vault-held secrets are the modern pattern from Lesson 4.1.' What is wrong with that?

Key takeaway

Machine identities outnumber humans, and the pipeline tier is where modern auth lags last. Federate CI identity so nothing is stored, revoke at the identity provider, guard against regression on a schedule, and extend the assert-don’t-store rule to every row of the connection table. Eliminate where you can, vault only what must exist.

Search lessons