Skip to content

Commit

Permalink
Documentation: more diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Chiang committed Apr 21, 2017
1 parent 8a7665b commit c400e86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Binary file added Documentation/img/dex-backend-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Documentation/using-dex.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ A more thorough discussion of these kinds of best practices can be found in the

Apps can also choose to consume ID tokens, letting other trusted clients handle the web flows for login. Clients pass along the ID tokens they receive from dex, usually as a bearer token, letting them act at the user to the backend service.

![][dex-backend-flow]

To accept ID tokens as user credentials, an app would construct an OpenID Connect verifier similarly to the above example. The verifier validates the ID token's signature, ensures it hasn't expired, etc. An important part of this code is that the verifier only trusts the example app's client. This ensures the example app is the one who's using the ID token, and not another, untrusted client.

```go
Expand Down Expand Up @@ -182,6 +184,7 @@ func authorize(ctx context.Context, bearerToken string) (*user, error) {

[api-server]: https://kubernetes.io/docs/admin/authentication/#openid-connect-tokens
[dex-flow]: img/dex-flow.png
[dex-backend-flow]: img/dex-backend-flow.png
[example-app]: ../cmd/example-app
[oauth2-threat-model]: https://tools.ietf.org/html/rfc6819
[go-oidc]: https://godoc.org/github.com/coreos/go-oidc
Expand Down

0 comments on commit c400e86

Please sign in to comment.