Skip to content

Commit 27fe647

Browse files
authored
added single-value context claims docs (#3040)
1 parent aecfd05 commit 27fe647

File tree

1 file changed

+43
-17
lines changed

1 file changed

+43
-17
lines changed

src/pages/docs/infrastructure/accounts/openid-connect.md

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ navOrder: 70
1313
If you are using Octopus Cloud, you will not need to do anything to expose the instance to the public internet, this is already configured for you.
1414
:::
1515

16-
To use federated credentials, your Octopus instance will need to have two anonymous URLs exposed to the public internet.
16+
To use federated credentials, your Octopus instance will need to have two anonymous URLs exposed to the public internet.
1717

1818
- `https://server-host/.well-known/openid-configuration`
1919
- `https://server-host/.well-known/jwks`
2020

2121
These must be exposed with anonymous access on HTTPS. Without this, the OpenID Connect protocol will not be able to complete the authentication flow.
2222

23-
The hostname of the URL that these two endpoints are available on must either be configured under **Configuration->Nodes->Server Uri** or set as the first ListenPrefix in the server configuration.
23+
The hostname of the URL that these two endpoints are available on must either be configured under **Configuration->Nodes->Server Uri** or set as the first ListenPrefix in the server configuration.
2424

2525
## Authenticating using OpenID Connect with third party services and tools
2626

@@ -43,19 +43,18 @@ The subject can be modified for the three different uses within Octopus:
4343

4444
- Only the requested keys for a **Subject** claim will be include in the generated **Subject** claim
4545
- Any Octopus resource types included in the **Subject** claim will use the slug value for the Octopus resource. The slug value is generated from the name of the Octopus resource when it was created, it can be edited on the edit page of resource type.
46-
- The **Subject** claim parts will always be in the following order
47-
- **Space**
48-
- **Project**
49-
- **Runbook**
50-
- **Tenant**
51-
- **Environment**
52-
- **Target**
53-
- **Account**
54-
- **Type**
55-
- **Feed**
56-
57-
58-
### Deployments and Runbooks {#deployments-and-runbooks}
46+
- The **Subject** claim parts will always be in the following order:
47+
- **Space**
48+
- **Project**
49+
- **Runbook**
50+
- **Tenant**
51+
- **Environment**
52+
- **Target**
53+
- **Account**
54+
- **Type**
55+
- **Feed**
56+
57+
## Deployments and Runbooks {#deployments-and-runbooks}
5958

6059
The **Subject** claim for a deployment or a runbook supports the following parts:
6160

@@ -72,7 +71,7 @@ The default format for a deployment and runbook is `space:[space-slug]:project:[
7271

7372
The value for the type is either `deployment` or `runbook`.
7473

75-
When changing the **Subject** claim format for a deployment and runbook, the runbook value will not be included (if specified) when running a deployment.
74+
When changing the **Subject** claim format for a deployment and runbook, the runbook value will not be included (if specified) when running a deployment.
7675

7776
For example, in the **Default** space, you have a project called **Deploy Web App**, and a runbook called **Restart**. If you set the **Subject** claim format to `space`, `project`, `runbook` and `type`, when running a deployment the **Subject** claim will be `space:default:project:deploy-web-app:type:deployment` and for the run of the runbook the **Subject** claim would be `space:default:project:deploy-web-app:runbook:restart:type:runbook`.
7877
This is using the default generated slug values for the space, project and runbook.
@@ -85,7 +84,6 @@ The default format for a health check is `space:[space-slug]:target:[target-slug
8584

8685
The value for the type is `health`.
8786

88-
8987
## Account Test {#account-test}
9088

9189
The Account Test **Subject** claim supports the **Space** slug, the **Account** slug and the **Type**
@@ -98,3 +96,31 @@ The Feed **Subject** claim supports the **Space** slug and the **Feed** slug. Th
9896

9997
The default format for feeds is `space:[space-slug]:feed:[feed-slug]`.
10098

99+
## Context specific value claims {#context-specific-value-claims}
100+
101+
In addition to the customizable subject claim, the JWT token will also include specific single-value claims for the deployment or runbook execution.
102+
Each of these claims will be prefixed with `https://octopus.com/claims/` and will represent all the values that can be included in the subject configuration.
103+
104+
```json
105+
{
106+
"aud": "api://default",
107+
"iss": "https://example.octopus.app/",
108+
"exp": 1234567890,
109+
"iat": 1234567890,
110+
"nbf": 1234567890,
111+
"jti": "abc",
112+
"https://octopus.com/claims/space": "space-slug",
113+
"https://octopus.com/claims/project": "project-slug",
114+
"https://octopus.com/claims/runbook": "runbook-slug", // only on a runbook run
115+
"https://octopus.com/claims/projectgroup": "project-group-slug",
116+
"https://octopus.com/claims/environment": "environment-slug",
117+
"https://octopus.com/claims/tenant": "teannt-slug",
118+
"https://octopus.com/claims/type": "deployment", // or runbook for a runbook run
119+
"https://octopus.com/claims/account": "account-slug",
120+
"sub": "space:[space-slug]:project:[project-slug]:environment:[environment-slug]"
121+
}
122+
```
123+
124+
:::div{.hint}
125+
These namespaced claims are only available in **Octopus 2026.1**.
126+
:::

0 commit comments

Comments
 (0)