Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf39943c

Browse files
committed
Add custom aud claims
Added description for single/multiple custom audience claima
1 parent2738435 commitf39943c

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

‎_docs/integrations/oidc-pipelines.md‎

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Codefresh supports a subset of standard claims which are listed below. Generally
4848

4949

5050
***audience (`aud`) claim**
51-
The`aud` claim is the Client ID, which is the URL of the Codefresh platform instance.
51+
The`aud` claim is the Client ID, which isby defaultthe URL of the Codefresh platform instance. It can also be a custom audience claim, or a list of comma-separated custom audience claims.
5252
***subject (`sub`) claim**
5353
The`sub` claim is a string value concatenated from the different claims representing the precise authentication and authorization required for access.
5454
***issuer (`iss`) claim**
@@ -173,6 +173,7 @@ You can move on to the Codefresh platform to obtain and use the OIDC ID token in
173173

174174
Obtain the ID token from the Codefresh OIDC provider to authenticate and authorize pipeline actions. Codefresh makes this simple by offering a dedicated Marketplace step, the`obtain-oidc-id-token` step, which you can seamlessly add to your pipeline, without the need for additional configuration or parameters on your part.
175175

176+
You can also use this step with custom`aud` claims to override the default configured.
176177

177178

178179
{% include
@@ -194,7 +195,7 @@ The step:
194195
1. Makes an API call to the Codefresh OIDC provider passing the`CF_OIDC_REQUEST_TOKEN` and the`CF_OIDC_REQUEST_URL` variables.
195196

196197
>**NOTE**:
197-
Codefresh injects these two variablesfor every pipeline build, ensuring their availability for use, regardless of the cloud provider's authentication mechanism, whether it's OIDC ID tokens or static credentials.
198+
Codefresh injects these two variablesinto every pipeline build, ensuring their availability for use, regardless of the cloud provider's authentication mechanism, whether it's OIDC ID tokens or static credentials.
198199

199200

200201
Example:
@@ -203,14 +204,42 @@ The step:
203204
*`CF_OIDC_REQUEST_TOKEN` is an access token used to request the OIDC ID token for the OIDC provider.
204205
*`CF_OIDC_REQUEST_URL` is the URL from which to request the ID token.
205206

206-
You can also insert the`curl` command as an API call in a freestyle step to get the same result.
207+
You can also insert the`curl` command as an API call in a`freestyle` step to get the same result.
207208

208209
{:start="2"}
209210
1. Sets the ID token in the`ID_TOKEN` environment variable.
210211
You can use this environment variable in subsequent steps within the same pipeline.
211212

212213
<br>
213214

215+
**Custom`aud` claims with the`obtain-oidc-id-token` step**
216+
217+
Instead of configuring the URL of the Codefresh platform URL as the`aud` claim, you can pass single or multiple strings as custom audiences in the`obtain-oidc-id-token` step.
218+
219+
Here are examples of using single and multiple`aud` claims in the`obtain-oidc-id-token` step.
220+
221+
* Single custom`aud` claim
222+
```yaml
223+
obtain_id_token:
224+
title:Obtain ID Token
225+
type:obtain-oidc-id-token
226+
arguments:
227+
AUDIENCE:"cosign"
228+
```
229+
230+
* Multiple custom`aud` claim s
231+
```yaml
232+
obtain_id_token:
233+
title: Obtain ID Token
234+
type: obtain-oidc-id-token
235+
arguments:
236+
AUDIENCE: "cosign,acme,custom"
237+
```
238+
You can also do this via a simple API call in a `freestyle` step as follows:
239+
`curl -H "Authorization:$CF_OIDC_REQUEST_TOKEN" "$CF_OIDC_REQUEST_URL?audience=cosign"`
240+
241+
<br>
242+
214243
**Requesting new OIDC ID tokens during build**
215244
* OIDC ID tokens expire after five minutes. If needed, you can request new OIDC ID tokens multiple times within the same pipeline, through the `obtain-oidc-id-token` step, or within a `freestyle` step with an API call.
216245

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp