Skip to content

Commit a10fb8d

Browse files
authored
Merge pull request #25181 from shuuji3/en/replace-openid-diagram-with-mermaid
Replace the sequence diagram on authentication page using Mermaid
2 parents 5ddf805 + b5c0e5e commit a10fb8d

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

assets/scss/_custom.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,22 @@ body.td-404 main .error-details {
7171
max-width: 80%;
7272
border: 1px solid rgb(222, 226, 230);
7373
border-radius: 5px;
74+
margin-bottom: 1rem;
75+
padding-top: 1rem;
76+
padding-bottom: 1rem;
77+
78+
// mermaid diagram - sequence diagram
79+
.actor {
80+
fill: #326ce5 !important;
81+
}
82+
text.actor {
83+
font-size: 18px !important;
84+
stroke: white !important;
85+
fill: white !important;
86+
}
87+
.activation0 {
88+
fill: #c9e9ec !important;
89+
}
7490
}
7591

7692
/* HEADER */

content/en/docs/reference/access-authn-authz/authentication.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,33 @@ from the OAuth2 [token response](https://openid.net/specs/openid-connect-core-1_
282282
as a bearer token. See [above](#putting-a-bearer-token-in-a-request) for how the token
283283
is included in a request.
284284

285-
![Kubernetes OpenID Connect Flow](/images/docs/admin/k8s_oidc_login.svg)
285+
{{< mermaid >}}
286+
sequenceDiagram
287+
participant user as User
288+
participant idp as Identity Provider
289+
participant kube as Kubectl
290+
participant api as API Server
291+
292+
user ->> idp: 1. Login to IdP
293+
activate idp
294+
idp -->> user: 2. Provide access_token,<br>id_token, and refresh_token
295+
deactivate idp
296+
activate user
297+
user ->> kube: 3. Call Kubectl<br>with --token being the id_token<br>OR add tokens to .kube/config
298+
deactivate user
299+
activate kube
300+
kube ->> api: 4. Authorization: Bearer...
301+
deactivate kube
302+
activate api
303+
api ->> api: 5. Is JWT signature valid?
304+
api ->> api: 6. Has the JWT expired?(iat+exp)
305+
api ->> api: 7. user authorized?
306+
api -->> kube: 8. Authorized: Perform<br>action and return result
307+
deactivate api
308+
activate kube
309+
kube --x user: 9. Return result
310+
deactivate kube
311+
{{< /mermaid >}}
286312

287313
1. Login to your identity provider
288314
2. Your identity provider will provide you with an `access_token`, `id_token` and a `refresh_token`

0 commit comments

Comments
 (0)