Commit Graph

14 Commits

Author SHA1 Message Date
Jannis Mattheis
bb62086fda fix: more oidc logging
In debug mode this outputs the oidc discovery

    2026-07-07T20:51:14+02:00 DBG discover config={"authorization_endpoint":"http://192.168.178.2:5556/dex/auth","claims_supported":["iss","sub","aud","iat","exp","email","email_verified","locale","name","preferred_username","at_hash"],"code_challenge_methods_supported":["S256","plain"],"device_authorization_endpoint":"http://192.168.178.2:5556/dex/device/code","grant_types_supported":["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:device_code","urn:ietf:params:oauth:grant-type:token-exchange"],"id_token_signing_alg_values_supported":["RS256"],"introspection_endpoint":"http://192.168.178.2:5556/dex/token/introspect","issuer":"http://192.168.178.2:5556/dex","jwks_uri":"http://192.168.178.2:5556/dex/keys","request_uri_parameter_supported":false,"response_types_supported":["code"],"scopes_supported":["openid","email","groups","profile","offline_access"],"subject_types_supported":["public"],"token_endpoint":"http://192.168.178.2:5556/dex/token","token_endpoint_auth_methods_supported":["client_secret_basic","client_secret_post"],"userinfo_endpoint":"http://192.168.178.2:5556/dex/userinfo"} rp.function=NewRelyingPartyOIDC
2026-07-07 20:52:49 +02:00
饺子w (Yumechi)
ad977d3d9c feat: EdDSA token for database leakage/index mitigation (#971)
* feat: EdDSA token for database leakage/index mitigation

* [skip ci]: remove token from api output

* fix: e2e tests

* fixup! fix: e2e tests

* doc: document tokens are now optional fields for app and aclient

* fixup(doc): swagger version again

* address review comments

* address review comments
2026-06-28 14:58:20 +00:00
Jannis Mattheis
7a95321bd5 fix: discover oidc signing algs 2026-06-20 15:13:15 +02:00
Jannis Mattheis
bf6d8eee85 fix: map oidc user to iss/sub 2026-06-20 14:07:49 +02:00
Jannis Mattheis
b13080615c fix: default for oidc scopes 2026-06-14 12:32:55 +02:00
Jannis Mattheis
925fce0bf9 fix: use zerolog 2026-05-20 17:16:35 +02:00
Jannis Mattheis
cf9a1ea32f fix: align session client expiry with cookie max age 2026-05-18 17:16:08 +02:00
Jannis Mattheis
ef36e7538d fix: /client:elevate to /client/:id/elevate 2026-04-26 12:41:02 +02:00
Jannis Mattheis
624ab65742 fix: elevate session on login 2026-04-19 19:43:52 +02:00
Jannis Mattheis
58677b32ef fix: add client elevatedUntil 2026-04-19 19:22:31 +02:00
Jannis Mattheis
2674f729eb fix: use decay map 2026-04-11 18:53:48 +02:00
Jannis Mattheis
fb6f90bf59 fix: don't store client name in state 2026-04-11 18:53:48 +02:00
Jannis Mattheis
6d53859b77 feat: add external oidc flow
Add two new endpoints for native app OIDC authentication using the
PKCE relay pattern (similar to Vaultwarden's SSO implementation):

- POST /auth/oidc/external/authorize - accepts a PKCE code_challenge
from the client, forwards it to the IdP, and returns the authorize URL
- POST /auth/oidc/external/token - accepts the auth code and
code_verifier, relays them to the IdP for token exchange, and returns
a gotify client token

The server never generates its own PKCE pair for this flow. It then relays
the client's code_challenge to the IdP during authorization and the
code_verifier during token exchange. The IdP validates the binding.
Pending auth sessions are stored in memory with a 10-minute TTL.

CSRF protection is provided by the state parameter, which contains a
cryptographically random nonce and is validated on the token exchange.
The state is single-use (deleted from the pending session map on lookup),
preventing replay attacks. Even without single-use enforcement, replay
would be harmless since the IdP's authorization code can only be
exchanged once.
2026-04-11 18:53:48 +02:00
Jannis Mattheis
cfaddfe255 feat: oidc 2026-04-11 18:53:48 +02:00