Skip to content

Instantly share code, notes, and snippets.

@slax0rr
Created October 11, 2024 19:24
Show Gist options
  • Save slax0rr/af2486a5bd5f64c7bc95ff893618803d to your computer and use it in GitHub Desktop.
Save slax0rr/af2486a5bd5f64c7bc95ff893618803d to your computer and use it in GitHub Desktop.
Traefik Forward Auth Diagram
<div class="mermaid">
sequenceDiagram
actor user as User
participant traefik as Traefik
participant auth as Authentication Service
participant order as Order Service
user->>traefik: GET /order/{id}
Note right of traefik: ForwardAuth request
traefik-->>auth: POST /auth/verify
alt Authentication failed
activate auth
Note over auth: Verify user identity
auth-->>user: 401 Unauthorized
deactivate auth
else Authentication succesful
activate auth
Note over auth: Verify user identity
auth-->>traefik: 200 OK
deactivate auth
traefik->>order: GET /order/{id}
order->>user: 200 OK
end
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<script>mermaid.initialize({startOnLoad:true});</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment