{{define "content"}}
dex gRPC API

The API that manages dex itself. It is a separate endpoint from the OpenID Connect one, and tokens from that one do not authenticate against it.

{{if .Version}}
Server
{{.Version}}
{{end}} {{if .Issuer}}
Issuer
{{.Issuer}}
{{end}}
{{if .Notice}}

{{.Notice}}

{{end}} {{if .Error}}

{{.Error}}

{{end}}
{{if not .Configured}}
Not connected

This app was started without a gRPC address, so it has nothing to talk to. Two things are needed.

grpc:
  addr: 127.0.0.1:5557
Plaintext is fine on a loopback address; add tlsCert, tlsKey and tlsClientCA for anything else.
--grpc-addr 127.0.0.1:5557
With certificates: --grpc-ca, --grpc-client-cert and --grpc-client-key.
{{else}}
{{if eq .Section "clients"}} {{if .Clients}} {{range .Clients}} {{end}}
IDNameRedirects
{{.ID}}{{if .Public}} public{{end}} {{.Name}} {{len .RedirectURIs}}
Open
{{else}}

ListClients returns nothing. Clients from a static config are not stored, and so are not listed.

{{end}} {{if not .Mode}}
Create a client
{{end}} {{if eq .Mode "create"}}
CreateClient
Leave empty for a public client.
Where dex may send the browser back to.
Clients allowed to ask for tokens with this one as the audience.
Empty means every connector.
Which clients may reuse this one's session. * for all.
Where the browser may be sent after logging out. Anything not listed is refused.
Where dex POSTs a logout token when a session ends. Empty means this client is never told.
standalone tokens outlive the browser session, which is what keeps a CLI signed in. session tokens stop refreshing the moment that session ends.
Cancel
{{end}} {{with .EditClient}}
UpdateClient — {{.ID}}
Fields left empty stay as they are.
{{range .RedirectURIs}}{{.}}{{end}}
Where dex may send the browser back to.
{{range .TrustedPeers}}{{.}}{{end}}
Clients allowed to ask for tokens with this one as the audience.
{{range .AllowedConnectors}}{{.}}{{end}}
Empty means every connector.
{{range .SSOSharedWith}}{{.}}{{end}}
Which clients may reuse this one's session. * for all.
{{range .PostLogoutRedirectURIs}}{{.}}{{end}}
Where the browser may be sent after logging out. Anything not listed is refused.
Clearing the box removes it, and dex stops sending this client logout tokens.
Switching to session ends this client's refresh tokens with the browser session they came from.

UpdateClient carries no secret and no public flag, so neither can be changed: dex expects a client that needs a new secret to be replaced.

Cancel
{{end}} {{end}} {{if eq .Section "passwords"}} {{if .Passwords}} {{range .Passwords}} {{end}}
EmailUsernameUser ID
{{.Email}} {{.Username}} {{.UserID}}
Edit
{{else}}

ListPasswords returns nothing. Users from staticPasswords are not stored, and so are not listed.

{{end}} {{if not .Mode}}
Create a password Verify a password
{{end}} {{if eq .Mode "create"}}
CreatePassword
What the connector calls this user; the sub claim is built from it.
The API takes a bcrypt hash; this page hashes what you type.
Cancel
{{end}} {{with .EditPassword}}
UpdatePassword — {{.Email}}
Leave empty to change only the username.

A password entry holds four things and no more: email, username, user ID and the hash. UpdatePassword carries only the username and the hash, and looks the entry up by its email — so the email and the user ID are fixed once created. Claims like groups are not stored here at all; they come from the connector.

Cancel
{{end}} {{if eq .Mode "verify"}}
VerifyPassword
Checks a password without issuing anything.
Cancel
{{end}} {{end}} {{if eq .Section "connectors"}} {{if .Connectors}} {{range .Connectors}} {{end}}
IDTypeName
{{.ID}} {{.Type}} {{.Name}}
Open
{{else}}

ListConnectors returns nothing. Connectors from the config file are not stored, and so are not listed.

{{end}} {{if not .Mode}}
Create a connector Terminate a connector's sessions
{{end}} {{if eq .Mode "terminate"}}
TerminateSessionsByConnector
Ends every session that came through it, for every user — for a connector being retired or one you no longer trust.
Cancel
{{end}} {{if eq .Mode "create"}}
CreateConnector
The connector's own JSON configuration — the same keys the config file takes for this type.
{{range $.ConnectorGrantTypes}}
{{end}}
Nothing ticked leaves the connector unrestricted.
Cancel
{{end}} {{end}} {{if eq .Section "identities"}} {{if .Identities}} {{range .Identities}} {{end}}
UserConnectorGroupsMFA
{{if .Email}}{{.Email}}{{else}}{{.UserID}}{{end}}
{{.UserID}}
{{.ConnectorID}} {{len .Groups}} {{len .MFADevices}}

Counts rather than contents: a user with forty groups would otherwise be the whole table. Everything about one — claims, consents, factors — is on its page.

{{else}}

ListUserIdentities returns nothing. An identity appears once someone signs in through a connector — and the method itself needs dex started with DEX_API_SESSIONS_IDENTITIES_CRUD=true.

{{end}} {{end}} {{if eq .Section "discovery"}}

What dex reports about itself through GetDiscovery.

{{range .Endpoints}} {{end}} {{range .Capabilities}} {{end}}
{{.Name}}{{.Value}}
{{.Name}} {{range .Values}}{{.}}
{{end}}
{{end}} {{if eq .Section "sessions"}}

Pick a user from the Users tab, or name one here. Sessions are keyed by the ID the connector gave the user; refresh tokens by the sub claim, which the app derives from that ID and the connector. Listing sessions needs dex started with DEX_API_SESSIONS_IDENTITIES_CRUD=true.

Needed for the refresh tokens.
{{if .UserID}}
Sessions
{{if .Sessions}} {{range .Sessions}} {{end}}
SessionConnectorFromDeviceStartedExpires
{{.ID}} {{.ConnectorID}} {{.IPAddress}} {{.UserAgent}} {{.Created}} {{.Expires}}
{{else}}

No sessions for this user.

{{end}} {{end}} {{if and .UserID .ConnectorID}}
Refresh tokens
{{if .RefreshTokens}} {{range .RefreshTokens}} {{end}}
ClientCreatedLast used
{{.ClientID}} {{.Created}} {{.LastUsed}}

Revoke one, then let this app refresh: the sign-in ends. That is the pair worth trying together.

{{else}}

No refresh tokens for this user. They are issued only when offline_access is requested.

{{end}} {{end}} {{if .UserID}}
TerminateSessionsByUser

Ends every session this user has, whatever connector they came through.

{{end}} {{end}}
{{end}} {{end}}