39 Commits

Author SHA1 Message Date
jnfrati a1d4a044de fix(sql): handle SQLite text password groups 2026-05-12 11:02:14 +02:00
jnfrati d493d44cbb fix: implement id token hint on rp initiated logout
Signed-off-by: jnfrati <nicofrati@gmail.com>
2026-04-13 19:25:51 +02:00
Maksim Nabokikh 3bf25fd6e0 feat: add SSO sharing policy (#4705)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
2026-04-02 14:18:53 +02:00
Maksim Nabokikh 546e66cb5d feat: add WebAuthn support (#4704)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
Signed-off-by: Maksim Nabokikh <max.nabokih@gmail.com>
Co-authored-by: Alwx <alwxsin@gmail.com>
2026-04-02 11:48:46 +02:00
Maksim Nabokikh 58f148dd28 feat: implement OIDC RP-Initiated logout (#4674)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
Signed-off-by: Maksim Nabokikh <max.nabokih@gmail.com>
2026-04-01 08:58:44 +02:00
Maksim Nabokikh 449f66477c feat: Add AuthSession GC (#4667)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
2026-03-20 20:06:43 +01:00
Maksim Nabokikh c3bc1d7466 feat: add auth_time, prompt, and max_age fields (#4662)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
2026-03-19 15:53:15 +01:00
Maksim Nabokikh 86abd336f8 Two-Factor authentication (TOTP) (#3712)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
2026-03-18 18:20:20 +01:00
Maksim Nabokikh cbd7dd7f5a feat: Create AuthSessions and set cookies (#4650)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
2026-03-18 11:58:18 +01:00
Maksim Nabokikh 6b9ce00e11 feat: implement AuthSession CRUD operations (#4646)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
2026-03-16 17:06:53 +01:00
Maksim Nabokikh 5a4395fd12 feat: add UserIdentity entity and CRUD operations (#4643)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
Signed-off-by: Maksim Nabokikh <max.nabokih@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-14 12:58:18 +01:00
Maksim Nabokikh f80a89dd5d feat(client): add allowed connectors field to client configuration (#4610)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
2026-03-11 23:00:38 +01:00
Maksim Nabokikh 7777773067 feat(connector): connectors for grants (#4619)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
2026-03-11 07:21:14 +01:00
Ivan Zviagintsev 9e377718dc feat: add name and emailVerified fields for static passwords (#4526)
Signed-off-by: Ivan Zvyagintsev <ivan.zvyagintsev@flant.com>
2026-02-12 12:13:54 +01:00
Ivan Zviagintsev d1b2722e39 feat: support groups and preferred_username for staticPasswords (#4456)
Signed-off-by: Ivan Zvyagintsev <ivan.zvyagintsev@flant.com>
2026-01-13 10:07:21 +01:00
Bob Callaway cf3b19a952 Merge remote-tracking branch 'upstream/master' into advisory-fix-1
Signed-off-by: Bob Callaway <bcallaway@google.com>
2022-09-26 15:15:58 -04:00
Bob Callaway fcfbb1ecb0 Add HMAC protection on /approval endpoint
Signed-off-by: Bob Callaway <bcallaway@google.com>
2022-07-29 19:45:18 -04:00
Bob Callaway 83e2df821e add PKCE support to device code flow (#2575)
Signed-off-by: Bob Callaway <bobcallaway@users.noreply.github.com>
2022-07-27 19:02:18 +03:00
m.nabokikh 06c8ab5aa7 Fixes of naming and code style
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2021-02-10 23:37:57 +04:00
m.nabokikh 91de99d57e feat: Add refresh token expiration and rotation settings
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2021-02-10 23:37:57 +04:00
Mark Sagi-Kazar 349832b380 Run fixer
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2020-11-03 20:52:14 +01:00
Bernd Eckstein b5519695a6 PKCE implementation (#1784)
* Basic implementation of PKCE

Signed-off-by: Tadeusz Magura-Witkowski <tadeuszmw@gmail.com>

* @mfmarche on 24 Feb: when code_verifier is set, don't check client_secret

In PKCE flow, no client_secret is used, so the check for a valid client_secret
would always fail.

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* @deric on 16 Jun: return invalid_grant when wrong code_verifier

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* Enforce PKCE flow on /token when PKCE flow was started on /auth
Also dissallow PKCE on /token, when PKCE flow was not started on /auth

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* fixed error messages when mixed PKCE/no PKCE flow.

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* server_test.go: Added PKCE error cases on /token endpoint

* Added test for invalid_grant, when wrong code_verifier is sent
* Added test for mixed PKCE / no PKCE auth flows.

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* cleanup: extracted method checkErrorResponse and type TestDefinition

* fixed connector being overwritten

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* /token endpoint: skip client_secret verification only for grand type authorization_code with PKCE extension

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* Allow "Authorization" header in CORS handlers

* Adds "Authorization" to the default CORS headers{"Accept", "Accept-Language", "Content-Language", "Origin"}

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* Add "code_challenge_methods_supported" to discovery endpoint

discovery endpoint /dex/.well-known/openid-configuration
now has the following entry:

"code_challenge_methods_supported": [
  "S256",
  "plain"
]

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* Updated tests (mixed-up comments), added a PKCE test

* @asoorm added test that checks if downgrade to "plain" on /token endpoint

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* remove redefinition of providedCodeVerifier, fixed spelling (#6)

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>
Signed-off-by: Bernd Eckstein <HEllRZA@users.noreply.github.com>

* Rename struct CodeChallenge to PKCE

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* PKCE: Check clientSecret when available

In authorization_code flow with PKCE, allow empty client_secret on /auth and /token endpoints. But check the client_secret when it is given.

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* Enable PKCE with public: true

dex configuration public on staticClients now enables the following behavior in PKCE:
- Public: false, PKCE will always check client_secret. This means PKCE in it's natural form is disabled.
- Public: true, PKCE is enabled. It will only check client_secret if the client has sent one. But it allows the code flow if the client didn't sent one.

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* Redirect error on unsupported code_challenge_method

- Check for unsupported code_challenge_method after redirect uri is validated, and use newErr() to return the error.
- Add PKCE tests to oauth2_test.go

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* Reverted go.mod and go.sum to the state of master

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* Don't omit client secret check for PKCE

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* Allow public clients (e.g. with PKCE) to have redirect URIs configured

Signed-off-by: Martin Heide <martin.heide@faro.com>

* Remove "Authorization" as Accepted Headers on CORS, small fixes

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* Revert "Allow public clients (e.g. with PKCE) to have redirect URIs configured"

This reverts commit b6e297b78537dc44cd3e1374f0b4d34bf89404ac.

Signed-off-by: Martin Heide <martin.heide@faro.com>

* PKCE on client_secret client error message

* When connecting to the token endpoint with PKCE without client_secret, but the client is configured with a client_secret, generate a special error message.

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* Output info message when PKCE without client_secret used on confidential client

* removes the special error message

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

* General missing/invalid client_secret message on token endpoint

Signed-off-by: Bernd Eckstein <Bernd.Eckstein@faro.com>

Co-authored-by: Tadeusz Magura-Witkowski <tadeuszmw@gmail.com>
Co-authored-by: Martin Heide <martin.heide@faro.com>
Co-authored-by: M. Heide <66078329+heidemn-faro@users.noreply.github.com>
2020-10-26 11:33:40 +01:00
justin-slowik 1404477326 Updates based on dexidp pr
Signed-off-by: justin-slowik <justin.slowik@thermofisher.com>
2020-07-08 16:25:06 -04:00
Justin Slowik 9c699b1028 Server integration test for Device Flow (#3)
Extracted test cases from OAuth2Code flow tests to reuse in device flow

deviceHandler unit tests to test specific device endpoints

Include client secret as an optional parameter for standards compliance

Signed-off-by: justin-slowik <justin.slowik@thermofisher.com>
2020-07-08 16:25:05 -04:00
Justin Slowik 9bbdc721d5 Device flow token code exchange (#2)
* Added /device/token handler with associated business logic and storage tests.

Perform user code exchange, flag the device code as complete.

Moved device handler code into its own file for cleanliness.  Cleanup

* Removed PKCE code

* Rate limiting for /device/token endpoint based on ietf standards

* Configurable Device expiry

Signed-off-by: justin-slowik <justin.slowik@thermofisher.com>
2020-07-08 16:25:05 -04:00