-
Notifications
You must be signed in to change notification settings - Fork 3
Update to 2.22 #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to 2.22 #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements OAuth2/OIDC authentication handlers and a message broker infrastructure for the LemonLDAP::NG Node.js handler, upgrading all packages from version 0.7.x to 0.8.0. The changes enable distributed configuration management and add support for multiple authentication methods (OAuth2, HTTP Basic Auth, and Cross-Domain Authentication).
Key changes:
- Introduces a message broker abstraction with implementations for Redis, PostgreSQL, HTTP/Web polling, and a no-op fallback
- Adds three new handler types: OAuth2/OIDC, AuthBasic, and CDA (Cross-Domain Authentication)
- Implements JWT utilities for token parsing and session ID extraction
- Enhances session caching with handler-internal cache and cleanup methods
- Adds event loop for processing broker messages (configuration reload, session purge)
Reviewed changes
Copilot reviewed 78 out of 80 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
packages/z-handler/src/tsv.ts |
Extends TSV type with OAuth2, CDA, AuthBasic, and message broker configuration fields |
packages/z-handler/src/msgActions.ts |
Implements message broker action handlers (reload, unlog, newSession, delSession, ping) |
packages/z-handler/src/init.ts |
Adds message broker initialization, event loop management, and broker message handling |
packages/z-handler/src/index.ts |
Exports new handler types and shutdown function for cleanup |
packages/z-handler/src/handlerOAuth2.ts |
OAuth2/OIDC handler with Bearer token authentication and OIDC session storage |
packages/z-handler/src/handlerAuthBasic.ts |
HTTP Basic Authentication handler with WWW-Authenticate challenge |
packages/z-handler/src/handlerCDA.ts |
Cross-Domain Authentication handler with encrypted cookie/parameter support |
packages/z-handler/src/handlerMain.ts |
Adds internal session cache and localUnlog for cache cleanup |
packages/z-handler/src/cda.ts |
CDA utilities for encrypted cookies, URL parameters, and cookie headers |
packages/z-handler/package.json |
Version bump, adds JWT and message-broker dependencies, --forceExit flag |
packages/types/index.d.ts |
Adds MessageBroker, CDA, OAuth2, and extended configuration type definitions |
packages/session/src/index.ts |
Adds cache clearing methods (clearMemoryCache, clearLocalCache, clearAllCaches) |
packages/0_perl-dbi/src/index.ts |
Exports parseDbiChain for PostgreSQL broker, improves CommonJS/ESM compatibility |
packages/0_jwt/src/index.ts |
New package with JWT parsing utilities and access token session ID extraction |
packages/message-broker/src/index.ts |
Core message broker interface and type definitions |
packages/message-broker-redis/src/index.ts |
Redis pub/sub broker with Sentinel support |
packages/message-broker-pg/src/index.ts |
PostgreSQL LISTEN/NOTIFY broker implementation |
packages/message-broker-web/src/index.ts |
HTTP polling broker for portal communication |
packages/message-broker-nobroker/src/index.ts |
No-op broker for single-instance mode |
| Various test files | Adds comprehensive tests for new functionality |
| Various package.json files | Version bumps from 0.7.x to 0.8.0 across all packages |
Comments suppressed due to low confidence (2)
packages/z-handler/src/handlerAuthBasic.ts:74
- Unused variable authChoice.
packages/z-handler/src/handlerAuthBasic.ts:75 - Unused variable authChoiceParam.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
385cc36 to
1d8ab5a
Compare
Features added: - Message broker architecture with Redis, PostgreSQL, and Web backends - OAuth2/OIDC handler for Bearer token authentication - AuthBasic handler for HTTP Basic authentication - Cross-Domain Authentication (CDA) handler
3a7fb5b to
5f0ad3d
Compare
Adds OAuth2 handler and message-brokers