You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add signed JWT auto sign-in flow (LibreGraph.SignedLoginOK)
When --allow-client-signed-logins is enabled, trusted apps can sign in
users without an interactive password challenge by sending an OIDC
authorization request that includes the LibreGraph.SignedLoginOK scope
together with a signed request object carrying a preferred_username claim.
The signed login path is built directly into IdentifierIdentityManager:
- checkAndRecordJTI: in-memory JTI replay prevention (10 min window)
- authenticateSignedLogin: validates the signed JWT, looks up the user
by preferred_username, writes a logon cookie so subsequent silent-renew
and re-auth requests succeed via the normal cookie path without needing
a new signed JWT each time
- authorizeSignedLogin: verifies client identity against the signed
request object and approves scopes via the client's trusted_scopes list
WriteLogonCookie is introduced on Identifier to write the cookie
mid-flow without firing onSetLogonCallbacks (which would produce a
spurious browser-state cookie header in the same response).
SetUserToLogonCookie is refactored to delegate to it.
serveCmd.Flags().StringArrayVar(&cfg.TrustedProxy, "trusted-proxy", nil, "Trusted proxy IP or IP network (can be used multiple times)")
99
99
serveCmd.Flags().StringArrayVar(&cfg.AllowScope, "allow-scope", nil, "Allow OAuth 2 scope (can be used multiple times, if not set default scopes are allowed)")
100
100
serveCmd.Flags().BoolVar(&cfg.AllowClientGuests, "allow-client-guests", false, "Allow sign in of client controlled guest users")
101
+
serveCmd.Flags().BoolVar(&cfg.AllowClientSignedLogins, "allow-client-signed-logins", false, "Allow sign in of client controlled signed login users")
serveCmd.Flags().Uint64Var(&cfg.AccessTokenDurationSeconds, "access-token-expiration", 60*10, "Expiration time of access tokens in seconds since generated") // 10 Minutes.
103
104
serveCmd.Flags().Uint64Var(&cfg.IDTokenDurationSeconds, "id-token-expiration", 60*60, "Expiration time of id tokens in seconds since generated") // 1 Hour.
0 commit comments