JetbrainsIgor BrovtsinTutorial
Authenticating TeamCity Builds to External Services With OIDC
Summary
Static CI/CD credentials can leak through logs or artifacts, expose uncertainty over who copies them, and require rotation, so the article presents OIDC as an alternative for authenticating TeamCity builds. It explains the workload flow: an identity provider issues a signed JWT whose claims include validity, audience, and issuer, while the consuming service retrieves metadata and JWKS, verifies the signature, and checks those claims. The TeamCity OIDC JWT plugin makes the server an identity provider, supports RSA- or ECDSA-based signing, key rotation, configurable public issuer hosting, and extensions for HSMs or key-management services. After installation from JetBrains Marketplace, build configurations can issue tokens at startup or on demand, with default or fixed five-minute lifetimes, for direct presentation or token exchange with AWS, Google Cloud, and other OIDC services.
Context
Static credentials in CI/CD environments can be leaked through logs and build artifacts, copied or shared during setup, and require regular rotation. OIDC provides a way for CI/CD pipelines to authenticate with short-lived identity tokens instead.
Approach / What changed
The TeamCity OIDC JWT plugin makes the TeamCity server an identity provider for third-party OIDC services. It supports RSA- and ECDSA-based signing, key rotation, configurable issuer hosting, JWKS publication, and build features that issue tokens at build start or on demand through HTTP requests.
Takeaways
OIDC consumers validate a JWT by retrieving issuer metadata and JWKS, verifying its signature, and checking its audience and validity period.
The startup token feature stores a configurable-lifetime token in a build parameter; the on-demand HTTP feature issues tokens with a fixed five-minute lifetime.
The plugin supports publicly accessible and internet-inaccessible TeamCity instances, including configurable public issuer URLs and extension points for HSMs or services such as Google Cloud KMS.
Source and freshness
- Source
- blog.jetbrains.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.