You finally wired up your CI pipeline, everything builds fine, and then access control hits like a surprise boss fight. Secret tokens sprawl across environments, service accounts never expire, and your compliance lead frowns in slow motion. This is exactly where OIDC TeamCity earns its keep.
OpenID Connect gives your CI jobs ephemeral identity, while TeamCity runs those jobs. Put them together and you get short‑lived, verifiable credentials tied to real users or build agents. No more hardcoded secrets. No more living tokens that linger like ghosts in your repo history. It is access you can reason about.
When TeamCity integrates with OIDC, each job can assume an identity through your cloud provider or identity platform, such as AWS IAM, GCP Workload Identity Federation, or Okta. The build pipeline requests a signed token from the provider; that token authenticates calls to APIs, registries, or deployments. Credentials are born for a purpose, then vanish. That is zero trust in action, without the ceremony.
How do I connect OIDC and TeamCity?
You link TeamCity’s service connection to your identity provider using an OIDC endpoint. Then you configure your cloud or repository permissions to accept that identity instead of static keys. The result is a credential that lives seconds, yet unlocks everything your build legitimately needs.
Best practices to keep your OIDC TeamCity setup clean
Map your roles clearly. Each project or pipeline should have one trust relationship and one role policy, not a tangle of overlapping permissions. Rotate trust providers whenever environments shift ownership. Audit access logs regularly; OIDC makes that easy because every token is traceable. Keep humans out of the secret loop entirely.