Commit Graph

11 Commits

Author SHA1 Message Date
Bryan Frimin
11770b4058 Add OAuth2/OpenID Connect authorization server
Implement a full OAuth2 2.0 and OpenID Connect 1.0 authorization
server with support for authorization code flow (with PKCE),
refresh token rotation, device authorization grant, dynamic
client registration, token introspection, and token revocation.

Includes database schema, coredata layer, service logic, HTTP
handlers, OIDC discovery endpoint, and JWKS publishing.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-19 12:00:53 +02:00
Bryan Frimin
b58a7e8325 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-31 15:04:57 +02:00
Bryan Frimin
84a35c90e9 Add session transfer for SSO cookies on custom domains
After OIDC login, if the redirect targets a trust center custom
domain, the callback now redirects through a session-transfer
endpoint on that domain. The endpoint verifies an HMAC-signed,
time-limited token and sets the session cookie on the custom
domain before redirecting to the final URL.

The continue URL is bound into the signed token payload to
prevent open-redirect attacks via parameter tampering.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-31 14:49:20 +02:00
Sacha Al Himdani
8c02c53315 Update copyright headers across all Go files
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-25 17:38:32 +01:00
Bryan Frimin
888838cfb0 Fix race condition in magic link token verification and typo in auth error message
- Hold SELECT FOR UPDATE lock within transaction by using tx directly instead of separate WithConn, ensuring mutual exclusion when multiple requests race to verify the same token
- Fix "resouce" → "resource" typo in authentication error messages

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:31:15 +01:00
Émile Ré
d92e893bfd Use authn.Cookie for SAML SSO
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-19 15:17:11 +04:00
Émile Ré
ac65c05488 Clear cookie on sign out
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-19 12:55:04 +04:00
Émile Ré
c5cd225d95 Fix custom domain prefix + cookie
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:34:25 -08:00
Émile Ré
7322201dab Plug trust center part 1
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:34:23 -08:00
Émile Ré
663400c4f6 Extract cookie config into authn pkg
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:34:04 -08:00
Émile Ré
1257347df9 Extract authn & authz utils
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:34:03 -08:00