Skip to content

Commit 5511ffe

Browse files
authored
Feat : Add support for CTE profiles (EA) (#1406)
* Add support for token exchange profile management commands * Update go version
1 parent a5d8372 commit 5511ffe

18 files changed

+955
-4
lines changed

docs/auth0_token-exchange.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
layout: default
3+
has_toc: false
4+
has_children: true
5+
---
6+
# auth0 token-exchange
7+
8+
Manage token exchange profiles. Token exchange profiles enable secure token exchange flows for authentication and authorization.
9+
10+
## Commands
11+
12+
- [auth0 token-exchange create](auth0_token-exchange_create.md) - Create a new token exchange profile
13+
- [auth0 token-exchange delete](auth0_token-exchange_delete.md) - Delete a token exchange profile
14+
- [auth0 token-exchange list](auth0_token-exchange_list.md) - List your token exchange profiles
15+
- [auth0 token-exchange show](auth0_token-exchange_show.md) - Show a token exchange profile
16+
- [auth0 token-exchange update](auth0_token-exchange_update.md) - Update a token exchange profile
17+
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
layout: default
3+
parent: auth0 token-exchange
4+
has_toc: false
5+
---
6+
# auth0 token-exchange create
7+
8+
Create a new token exchange profile.
9+
10+
To create interactively, use `auth0 token-exchange create` with no flags.
11+
12+
To create non-interactively, supply the name, subject token type, action ID, and type through the flags.
13+
14+
## Usage
15+
```
16+
auth0 token-exchange create [flags]
17+
```
18+
19+
## Examples
20+
21+
```
22+
auth0 token-exchange create
23+
auth0 token-exchange create --name "My Token Exchange Profile"
24+
auth0 token-exchange create --name "My Token Exchange Profile" --subject-token-type "urn:ietf:params:oauth:token-type:jwt"
25+
auth0 token-exchange create --name "My Token Exchange Profile" --subject-token-type "urn:ietf:params:oauth:token-type:jwt" --action-id "act_123abc" --type "custom_authentication"
26+
auth0 token-exchange create -n "My Token Exchange Profile" -s "urn:ietf:params:oauth:token-type:jwt" -a "act_123abc" -t "custom_authentication" --json
27+
auth0 token-exchange create -n "My Token Exchange Profile" -s "urn:ietf:params:oauth:token-type:jwt" -a "act_123abc" -t "custom_authentication" --json-compact
28+
```
29+
30+
31+
## Flags
32+
33+
```
34+
-a, --action-id string Identifier of the action.
35+
--json Output in json format.
36+
--json-compact Output in compact json format.
37+
-n, --name string Name of the token exchange profile.
38+
-s, --subject-token-type string Type of the subject token. Must be a valid URI format (e.g., urn:ietf:params:oauth:token-type:jwt). Cannot use reserved prefixes: http://auth0.com, https://auth0.com, http://okta.com, https://okta.com, urn:ietf, urn:auth0, urn:okta.
39+
-t, --type string Type of the token exchange profile. Currently only 'custom_authentication' is supported.
40+
```
41+
42+
43+
## Inherited Flags
44+
45+
```
46+
--debug Enable debug mode.
47+
--no-color Disable colors.
48+
--no-input Disable interactivity.
49+
--tenant string Specific tenant to use.
50+
```
51+
52+
53+
## Related Commands
54+
55+
- [auth0 token-exchange create](auth0_token-exchange_create.md) - Create a new token exchange profile
56+
- [auth0 token-exchange delete](auth0_token-exchange_delete.md) - Delete a token exchange profile
57+
- [auth0 token-exchange list](auth0_token-exchange_list.md) - List your token exchange profiles
58+
- [auth0 token-exchange show](auth0_token-exchange_show.md) - Show a token exchange profile
59+
- [auth0 token-exchange update](auth0_token-exchange_update.md) - Update a token exchange profile
60+
61+
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
layout: default
3+
parent: auth0 token-exchange
4+
has_toc: false
5+
---
6+
# auth0 token-exchange delete
7+
8+
Delete a token exchange profile.
9+
10+
To delete interactively, use `auth0 token-exchange delete` with no arguments.
11+
12+
To delete non-interactively, supply the profile id and the `--force` flag to skip confirmation.
13+
14+
## Usage
15+
```
16+
auth0 token-exchange delete [flags]
17+
```
18+
19+
## Examples
20+
21+
```
22+
auth0 token-exchange delete
23+
auth0 token-exchange rm
24+
auth0 token-exchange delete <profile-id>
25+
auth0 token-exchange delete <profile-id> --force
26+
auth0 token-exchange delete <profile-id> <profile-id2> <profile-idn>
27+
auth0 token-exchange delete <profile-id> <profile-id2> <profile-idn> --force
28+
```
29+
30+
31+
## Flags
32+
33+
```
34+
--force Skip confirmation.
35+
```
36+
37+
38+
## Inherited Flags
39+
40+
```
41+
--debug Enable debug mode.
42+
--no-color Disable colors.
43+
--no-input Disable interactivity.
44+
--tenant string Specific tenant to use.
45+
```
46+
47+
48+
## Related Commands
49+
50+
- [auth0 token-exchange create](auth0_token-exchange_create.md) - Create a new token exchange profile
51+
- [auth0 token-exchange delete](auth0_token-exchange_delete.md) - Delete a token exchange profile
52+
- [auth0 token-exchange list](auth0_token-exchange_list.md) - List your token exchange profiles
53+
- [auth0 token-exchange show](auth0_token-exchange_show.md) - Show a token exchange profile
54+
- [auth0 token-exchange update](auth0_token-exchange_update.md) - Update a token exchange profile
55+
56+

docs/auth0_token-exchange_list.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
layout: default
3+
parent: auth0 token-exchange
4+
has_toc: false
5+
---
6+
# auth0 token-exchange list
7+
8+
List your existing token exchange profiles. To create one, run: `auth0 token-exchange create`.
9+
10+
## Usage
11+
```
12+
auth0 token-exchange list [flags]
13+
```
14+
15+
## Examples
16+
17+
```
18+
auth0 token-exchange list
19+
auth0 token-exchange ls
20+
auth0 token-exchange ls --json
21+
auth0 token-exchange ls --json-compact
22+
auth0 token-exchange ls --csv
23+
```
24+
25+
26+
## Flags
27+
28+
```
29+
--csv Output in csv format.
30+
--json Output in json format.
31+
--json-compact Output in compact json format.
32+
```
33+
34+
35+
## Inherited Flags
36+
37+
```
38+
--debug Enable debug mode.
39+
--no-color Disable colors.
40+
--no-input Disable interactivity.
41+
--tenant string Specific tenant to use.
42+
```
43+
44+
45+
## Related Commands
46+
47+
- [auth0 token-exchange create](auth0_token-exchange_create.md) - Create a new token exchange profile
48+
- [auth0 token-exchange delete](auth0_token-exchange_delete.md) - Delete a token exchange profile
49+
- [auth0 token-exchange list](auth0_token-exchange_list.md) - List your token exchange profiles
50+
- [auth0 token-exchange show](auth0_token-exchange_show.md) - Show a token exchange profile
51+
- [auth0 token-exchange update](auth0_token-exchange_update.md) - Update a token exchange profile
52+
53+

docs/auth0_token-exchange_show.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
layout: default
3+
parent: auth0 token-exchange
4+
has_toc: false
5+
---
6+
# auth0 token-exchange show
7+
8+
Display the name, subject token type, action ID, type and other information about a token exchange profile.
9+
10+
## Usage
11+
```
12+
auth0 token-exchange show [flags]
13+
```
14+
15+
## Examples
16+
17+
```
18+
auth0 token-exchange show
19+
auth0 token-exchange show <profile-id>
20+
auth0 token-exchange show <profile-id> --json
21+
auth0 token-exchange show <profile-id> --json-compact
22+
```
23+
24+
25+
## Flags
26+
27+
```
28+
--json Output in json format.
29+
--json-compact Output in compact json format.
30+
```
31+
32+
33+
## Inherited Flags
34+
35+
```
36+
--debug Enable debug mode.
37+
--no-color Disable colors.
38+
--no-input Disable interactivity.
39+
--tenant string Specific tenant to use.
40+
```
41+
42+
43+
## Related Commands
44+
45+
- [auth0 token-exchange create](auth0_token-exchange_create.md) - Create a new token exchange profile
46+
- [auth0 token-exchange delete](auth0_token-exchange_delete.md) - Delete a token exchange profile
47+
- [auth0 token-exchange list](auth0_token-exchange_list.md) - List your token exchange profiles
48+
- [auth0 token-exchange show](auth0_token-exchange_show.md) - Show a token exchange profile
49+
- [auth0 token-exchange update](auth0_token-exchange_update.md) - Update a token exchange profile
50+
51+
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
layout: default
3+
parent: auth0 token-exchange
4+
has_toc: false
5+
---
6+
# auth0 token-exchange update
7+
8+
Update a token exchange profile.
9+
10+
To update interactively, use `auth0 token-exchange update` with no arguments.
11+
12+
To update non-interactively, supply the profile id, name, and subject token type through the flags.
13+
14+
Note: Only name and subject token type can be updated. Action ID and type are immutable after creation.
15+
16+
## Usage
17+
```
18+
auth0 token-exchange update [flags]
19+
```
20+
21+
## Examples
22+
23+
```
24+
auth0 token-exchange update
25+
auth0 token-exchange update <profile-id>
26+
auth0 token-exchange update <profile-id> --name "Updated Profile Name"
27+
auth0 token-exchange update <profile-id> --name "Updated Profile Name" --subject-token-type "urn:ietf:params:oauth:token-type:jwt"
28+
auth0 token-exchange update <profile-id> -n "Updated Profile Name" -s "urn:ietf:params:oauth:token-type:jwt" --json
29+
auth0 token-exchange update <profile-id> -n "Updated Profile Name" -s "urn:ietf:params:oauth:token-type:jwt" --json-compact
30+
```
31+
32+
33+
## Flags
34+
35+
```
36+
--json Output in json format.
37+
--json-compact Output in compact json format.
38+
-n, --name string Name of the token exchange profile.
39+
-s, --subject-token-type string Type of the subject token. Must be a valid URI format (e.g., urn:ietf:params:oauth:token-type:jwt). Cannot use reserved prefixes: http://auth0.com, https://auth0.com, http://okta.com, https://okta.com, urn:ietf, urn:auth0, urn:okta.
40+
```
41+
42+
43+
## Inherited Flags
44+
45+
```
46+
--debug Enable debug mode.
47+
--no-color Disable colors.
48+
--no-input Disable interactivity.
49+
--tenant string Specific tenant to use.
50+
```
51+
52+
53+
## Related Commands
54+
55+
- [auth0 token-exchange create](auth0_token-exchange_create.md) - Create a new token exchange profile
56+
- [auth0 token-exchange delete](auth0_token-exchange_delete.md) - Delete a token exchange profile
57+
- [auth0 token-exchange list](auth0_token-exchange_list.md) - List your token exchange profiles
58+
- [auth0 token-exchange show](auth0_token-exchange_show.md) - Show a token exchange profile
59+
- [auth0 token-exchange update](auth0_token-exchange_update.md) - Update a token exchange profile
60+
61+

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Authenticating as a user is not supported for **private cloud** tenants. Instead
102102
- [auth0 tenants](auth0_tenants.md) - Manage configured tenants
103103
- [auth0 terraform](auth0_terraform.md) - Manage terraform configuration for your Auth0 Tenant
104104
- [auth0 test](auth0_test.md) - Try your Universal Login box or get a token
105+
- [auth0 token-exchange](auth0_token-exchange.md) - Manage token exchange profiles
105106
- [auth0 universal-login](auth0_universal-login.md) - Manage the Universal Login experience
106107
- [auth0 users](auth0_users.md) - Manage resources for users
107108

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/AlecAivazis/survey/v2 v2.3.7
77
github.com/PuerkitoBio/rehttp v1.4.0
88
github.com/atotto/clipboard v0.1.4
9-
github.com/auth0/go-auth0 v1.32.0
9+
github.com/auth0/go-auth0 v1.32.1
1010
github.com/briandowns/spinner v1.23.2
1111
github.com/charmbracelet/glamour v0.10.0
1212
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew
2222
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
2323
github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
2424
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
25-
github.com/auth0/go-auth0 v1.32.0 h1:PuojPRBDQPvFMtXDX7ags8ackLVYXDU7gpTi7/8sEws=
26-
github.com/auth0/go-auth0 v1.32.0/go.mod h1:32sQB1uAn+99fJo6N819EniKq8h785p0ag0lMWhiTaE=
25+
github.com/auth0/go-auth0 v1.32.1 h1:AAXQqaNaFZWkRm2bg5mVVXpqDLmusv7v238uIaxuFpo=
26+
github.com/auth0/go-auth0 v1.32.1/go.mod h1:32sQB1uAn+99fJo6N819EniKq8h785p0ag0lMWhiTaE=
2727
github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0 h1:0NmehRCgyk5rljDQLKUO+cRJCnduDyn11+zGZIc9Z48=
2828
github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0/go.mod h1:6L7zgvqo0idzI7IO8de6ZC051AfXb5ipkIJ7bIA2tGA=
2929
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=

internal/auth/auth.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ var RequiredScopes = []string{
148148
"read:attack_protection", "update:attack_protection",
149149
"read:event_streams", "create:event_streams", "update:event_streams", "delete:event_streams",
150150
"read:network_acls", "create:network_acls", "update:network_acls", "delete:network_acls",
151+
"read:token_exchange_profiles", "create:token_exchange_profiles", "update:token_exchange_profiles", "delete:token_exchange_profiles",
151152
}
152153

153154
// GetDeviceCode kicks-off the device authentication flow by requesting

0 commit comments

Comments
 (0)