Skip to content

Commit cd682e8

Browse files
committed
update the idtoken documentation to include the --oidc-issuer-url flag
For the changes in this [Pull Request](concourse/concourse#9358) Signed-off-by: Bing Shi <blyfdev@gmail.com>
1 parent 2ff256e commit cd682e8

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

lit/docs/operation/creds/idtoken.lit

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ allows external services to auto-discover the JWKS-URL.
171171
Here is a short explanation of the different claims:
172172

173173
\list{
174-
\code{iss}: Who issued the token (always contains the external URL of your Concourse)
174+
\code{iss}: Who issued the token. Contains the OIDC issuer URL if \code{--oidc-issuer-url} is configured, otherwise the external URL of your Concourse.
175175
}{
176176
\code{exp}: When the token will expire
177177
}{
@@ -211,6 +211,33 @@ allows external services to auto-discover the JWKS-URL.
211211

212212
}
213213

214+
\section{
215+
\title{Configuring a Separate OIDC Issuer}{idtoken-oidc-issuer}
216+
217+
By default, Concourse uses the \code{--external-url} as the OIDC issuer in generated tokens. You can configure a separate OIDC issuer URL using the \code{--oidc-issuer-url} flag:
218+
219+
\codeblock{bash}{{{
220+
concourse web \
221+
--external-url https://concourse.internal.example.com \
222+
--oidc-issuer-url https://oidc.example.com
223+
}}}
224+
225+
When \code{--oidc-issuer-url} is configured:
226+
\list{
227+
The \code{iss} claim in generated JWT tokens will contain the OIDC issuer URL instead of the external URL
228+
}{
229+
The OIDC discovery endpoints (\code{/.well-known/openid-configuration} and \code{/.well-known/jwks.json}) will return the OIDC issuer URL
230+
}{
231+
Your Concourse web UI and API continue to use the external URL
232+
}
233+
234+
This is useful for private network deployments where you want to serve OIDC discovery from a separate public endpoint while keeping your Concourse instance private.
235+
236+
\italic{Note:} You are responsible for ensuring the \code{.well-known} files are accessible at your configured OIDC issuer URL. When the signing keys rotate, Concourse immediately uses the new key for signing tokens. If your OIDC issuer URL is out of sync with Concourse's JWKS, token verification will fail. The recommended approach is to use a reverse proxy that forwards requests to your private Concourse in real-time, eliminating sync delays during key rotation.
237+
238+
\italic{Note:} If \code{--oidc-issuer-url} is not set, Concourse uses \code{--external-url} for the OIDC issuer (default behavior).
239+
}
240+
214241
\right-side{Examples}{
215242
\example{Vault}{
216243
You can use JWTs to authenticate with \link{HashiCorp
@@ -223,10 +250,10 @@ allows external services to auto-discover the JWKS-URL.
223250
vault auth enable jwt
224251
}}}
225252

226-
Now configure the JWT auth method to accept JWTs issued by your Concourse:
253+
Now configure the JWT auth method to accept JWTs issued by your Concourse (use your \code{--oidc-issuer-url} if configured, otherwise your external URL - see \reference{idtoken-oidc-issuer}):
227254
\codeblock{bash}{{{
228255
vault write auth/jwt/config \
229-
oidc_discovery_url="https://<external_url_of_your_concourse>" \
256+
oidc_discovery_url="https://<external_url_or_oidc_issuer_url>" \
230257
default_role="demo"
231258
}}}
232259

@@ -351,7 +378,7 @@ allows external services to auto-discover the JWKS-URL.
351378
First you need to \link{create an OpenID Connect identity
352379
provider}{https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html}
353380
in your AWS Account.
354-
Set \italic{Provider URL} to the external URL of your Concourse server.
381+
Set \italic{Provider URL} to the external URL of your Concourse server (or the \code{--oidc-issuer-url} if you're using a separate OIDC issuer - see \reference{idtoken-oidc-issuer}).
355382
For \italic{Audience}, you can choose any string you like, but using
356383
a value like \code{sts.amazonaws.com} is recommended. You have to use the
357384
same string later in the configuration of your \reference{idtoken-var-source}.
@@ -417,7 +444,7 @@ allows external services to auto-discover the JWKS-URL.
417444
for the app registration you just created.
418445

419446
For \italic{Scenario} select "Other". For \italic{Issuer} set it to the
420-
external URL of your Concourse server. For \italic{Type} select "Explicit
447+
external URL of your Concourse server (or the \code{--oidc-issuer-url} if you're using a separate OIDC issuer - see \reference{idtoken-oidc-issuer}). For \italic{Type} select "Explicit
421448
subject identifier" and set \italic{Value} to
422449
\code{<teamname>/<pipelinename>} of the pipeline that should be able to use
423450
the identity. If you use the \code{subject_scope} setting to change the

0 commit comments

Comments
 (0)