Commit Graph

129 Commits

Author SHA1 Message Date
simonredfern
8c51cf2951 Adding more debug info for debug providers 2026-01-14 13:00:46 +01:00
simonredfern
10e14a2738 added /debug/oidc 2026-01-14 13:00:46 +01:00
simonredfern
99c4d4d22c added console logging regarding auth endpoints 2026-01-14 13:00:46 +01:00
simonredfern
2923ce268c Adding OIDC retry 2 2026-01-14 13:00:46 +01:00
simonredfern
74b0b12b90 Adding OIDC retry 2026-01-14 13:00:46 +01:00
simonredfern
cb9bfbfbcb VITE_OBP_OAUTH2_WELL_KNOWN_URL is optional 2026-01-14 13:00:46 +01:00
simonredfern
8c8630c547 VITE_OBP_SERVER_SESSION_PASSWORD corrected name 2026-01-14 13:00:46 +01:00
simonredfern
d1fb24898c cleanup multi provider 2026-01-14 13:00:46 +01:00
simonredfern
0e8e7df8d5 remove emojis 2026-01-14 13:00:46 +01:00
simonredfern
ac5f978ada providerStatus 2026-01-14 13:00:46 +01:00
simonredfern
5c92d4f0fb debug/providers-status 3 2026-01-14 13:00:46 +01:00
simonredfern
b422980a03 debug/providers-status 2026-01-14 13:00:46 +01:00
simonredfern
c755b47e80 use plain express 5 with new files 2026-01-14 13:00:45 +01:00
simonredfern
5cb5cfc229 use plain express 4 with cleanup 2026-01-14 13:00:45 +01:00
simonredfern
f754b4fde6 use plain express 3 2026-01-14 13:00:45 +01:00
simonredfern
a955b85146 correct wellKnownUri 2026-01-14 13:00:45 +01:00
simonredfern
aa2e192da9 use plain express 2 2026-01-14 13:00:45 +01:00
simonredfern
e34b939a0e can login again 2026-01-14 13:00:45 +01:00
simonredfern
e701522734 Fix TypeScript compilation errors in multi-provider implementation
- Fix OAuth2ClientWithConfig to properly extend arctic OAuth2Client
- Rename methods to avoid base class conflicts (exchangeAuthorizationCode, refreshTokens)
- Fix OAuth2ProviderManager to use OBPClientService.get() correctly
- Fix iteration over Map entries to avoid downlevelIteration issues
- Update OAuth2ConnectController with correct method signatures
- Fix redirect URI access via getRedirectUri() method
2026-01-14 13:00:45 +01:00
simonredfern
0eace070f9 Add multi-OIDC provider controllers and update app initialization
- Create OAuth2ProvidersController to list available providers
- Update OAuth2ConnectController to support provider parameter
- Update OAuth2CallbackController to handle multi-provider callbacks
- Update app.ts to initialize OAuth2ProviderManager on startup
- Maintain backward compatibility with legacy single-provider mode
- Add health monitoring for all providers (60s intervals)
2026-01-14 13:00:45 +01:00
simonredfern
743038953d Add multi-OIDC provider backend services
- Add TypeScript interfaces for multi-provider OAuth2 support
- Create OAuth2ClientWithConfig extending arctic OAuth2Client with OIDC discovery
- Create OAuth2ProviderFactory with strategy pattern for different providers
- Create OAuth2ProviderManager for managing multiple providers with health checks
- Support for OBP-OIDC, Keycloak, Google, GitHub, and custom providers
2026-01-14 13:00:45 +01:00
simonredfern
85aa76a71f session cookie name 2025-12-19 16:01:14 +01:00
simonredfern
6030965947 redis session cache key prefix 2025-12-19 16:01:14 +01:00
simonredfern
1033693b09 Don't hide request body if empty. token refresh try 2025-12-19 16:01:14 +01:00
simonredfern
498a509b2d session timeout 2025-12-19 16:01:14 +01:00
simonredfern
0b4825fc7c OIDC checking / retrying 2 2025-12-14 11:15:35 +01:00
simonredfern
cd9ba264ec OIDC checking / retrying 2025-12-14 11:04:14 +01:00
simonredfern
ca923f7b5a commitID 2025-12-12 10:32:14 +01:00
simonredfern
37c2688fb5 ES modules 2025-12-11 20:44:07 +01:00
simonredfern
c870628ad3 using v6.0.0 of scanned apis 2025-12-11 19:22:59 +01:00
simonredfern
23a1615dcb trying compiler options CommonJS 2025-12-11 16:04:35 +01:00
simonredfern
d7638b1d70 moved shared-constants.ts to src 2025-12-11 14:03:21 +01:00
simonredfern
63bec0dd00 changing url path structure to resource-docs 2025-12-08 16:21:10 +01:00
simonredfern
b0d927c1e1 showing proper OBP error message instead of squashing them 2025-12-03 21:50:56 +01:00
simonredfern
056171388f OAuth2/OIDC 2025-12-02 14:26:19 +01:00
simonredfern
b97f39b4e1 better error with Request Entitlement and sending user_id 2025-12-02 02:08:16 +01:00
simonredfern
4a5239e5aa OAuth2 tweaks 2025-12-02 01:11:17 +01:00
simonredfern
3450df5d01 OAuth2 step 2 ok 2025-12-01 11:28:40 +01:00
simonredfern
dc69f9664d OAuth2 login first step works 2025-12-01 11:07:05 +01:00
simonredfern
d14fb57005 OAuth1 to OAuth2 2025-11-30 10:11:51 +01:00
simonredfern
b2df3a9791 Phase 2: Integrate OAuth2 into application
Application Integration:
- Update server/app.ts to initialize OAuth2Service on startup
  * Conditional initialization based on VITE_USE_OAUTH2 flag
  * OIDC discovery document fetching
  * Comprehensive error handling and logging
  * Graceful fallback if OIDC provider unavailable

UserController Updates:
- Support dual authentication (OAuth 1.0a and OAuth2)
- OAuth2 user session detection and retrieval
- Automatic token refresh when access token expires
- Unified user data format for both auth methods
- Enhanced logout to clear both OAuth 1.0a and OAuth2 sessions
- Comprehensive logging for debugging

Features:
- Seamless switching between auth methods via feature flag
- Backward compatibility maintained
- Automatic token refresh before expiry
- Session cleanup on logout
- Error handling with fallback to empty response

Next phase: Update frontend components for OAuth2 login flow
2025-11-29 19:54:58 +01:00
simonredfern
86295f827a Phase 1: Implement OAuth2/OIDC core infrastructure
Backend Implementation:
- Add arctic and jsonwebtoken dependencies
- Create PKCEUtils for OAuth2 PKCE flow (RFC 7636)
- Create OAuth2Service for OIDC provider integration
  * OIDC discovery (.well-known/openid-configuration)
  * Authorization URL generation with PKCE
  * Token exchange (code for access/refresh/ID tokens)
  * Token refresh flow
  * UserInfo endpoint integration
- Create OAuth2AuthorizationMiddleware (initiate auth flow)
- Create OAuth2CallbackMiddleware (handle provider callback)
- Create OAuth2ConnectController (/oauth2/connect endpoint)
- Create OAuth2CallbackController (/oauth2/callback endpoint)

Configuration:
- Add OAuth2 environment variables to env_ai
- Feature flag VITE_USE_OAUTH2 for gradual migration
- Support for OBP-OIDC provider

Features:
- PKCE (Proof Key for Code Exchange) support
- State parameter for CSRF protection
- Session-based token storage
- Comprehensive error handling
- Security best practices (token expiration, flow timeout)

Note: Backend infrastructure complete. Next phase: integrate with app.ts
and update UserController for dual auth support.
2025-11-29 19:53:41 +01:00
simonredfern
7905adb252 Making sure important env variables are not null. 2025-11-07 07:15:10 +01:00
simonredfern
eae18ad106 Adding a shared constant for the default API Version which is used if
the env variable is not present.
2025-11-07 07:07:17 +01:00
Marko Milić
24107ee884 feature/API Explorer II - make v6.0.0 the default version 2025-11-06 11:29:34 +01:00
Hongwei
826adcb8e0 Remove 'kafka_vSept2018' connector from StatusController and message-docs 2025-08-07 12:58:53 +02:00
Nemo Godebski-Pedersen
f4fa0e4ce9 fix page redirect when logout 2025-05-20 18:12:52 +07:00
Nemo Godebski-Pedersen
267cffba3b fix redirecting after log on 2025-05-20 18:12:52 +07:00
Nemo Godebski-Pedersen
6b2ef5f214 add consent expiry checking 2025-04-21 15:32:49 +01:00
Nemo Godebski-Pedersen
139310574c gert existing consents for opey 2025-04-10 16:26:23 +01:00