You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is 100% AI slop from Abe's virtual son, Moses. Feel free to add input tokens but wow did Moses go overboard.
Problem
NicTool currently supports local password auth, LDAP bind authentication, and WebAuthn/passkeys. Enterprise environments require federated identity (SAML 2.0 / OpenID Connect) for single sign-on and automated user provisioning (SCIM 2.0) for lifecycle management. Without these, NicTool cannot integrate with identity providers like Okta, Azure AD/Entra ID, Google Workspace, Keycloak, or PingIdentity without manual user management.
Research: Perl/CPAN Ecosystem (April 2026)
SAML 2.0 — Production-Ready
Library
Version
Status
Notes
Net::SAML2
0.85 (Feb 2026)
Actively maintained
SP-only; 9 contributors
Capabilities: SAML 2.0 SP implementation with HTTP-Redirect, HTTP-POST, and SOAP bindings. Supports encrypted assertions, IdP metadata parsing (URL or XML), XML signature validation.
No native Perl SCIM 2.0 implementation exists on CPAN (RFC 7642/7643/7644).
Reference implementations in other languages:
Go: elimity-com/scim (production-grade)
Java: SCIM-SDK (Captain-P-Goldfish)
Ruby: scimitar (85 stars, actively maintained)
Python: scim2-server (lightweight prototype)
A Perl SCIM server would need to be built from scratch using standard REST/JSON tools (Plack, JSON, Crypt::JWT for bearer token validation).
Proposed Architecture
Follow the WebAuthn integration pattern already established in the codebase — it cleanly separates browser ceremony from server verification and integrates at the Session dispatcher level.
Filter support (at minimum: userName eq "value", externalId eq "value")
Proper error responses (RFC 7644 Section 3.12)
Handle IdP-specific PATCH quirks (Okta, Azure AD, Google send different structures)
SCIM endpoint lives outside the SOAP layer (direct HTTP/JSON, like a modern REST API)
Admin UI for SCIM configuration (enable/disable, token management)
No CPAN deps — built with core Perl JSON/HTTP modules
Alternative: Reverse Proxy Approach
For deployments where code changes aren't feasible, a reverse proxy can handle SSO externally:
Proxy
Protocol
Notes
mod_auth_mellon
SAML 2.0
Apache module, injects REMOTE_USER header
oauth2-proxy
OIDC
Go binary, injects X-Auth-Request-User header
Keycloak
Both
Full IdP + proxy, heavier deployment
This requires NicTool to trust a REMOTE_USER header for authentication — a smaller code change but with header injection risks. Could be documented as a supported deployment option alongside native integration.
Open Questions
OIDC-first or SAML-first? OIDC is simpler and covers most modern IdPs. Propose OIDC first.
JIT provisioning vs SCIM? JIT (create user on first SSO login) is simpler but doesn't handle deprovisioning. SCIM handles full lifecycle. Could support both.
Group mapping? Should SSO claims/SCIM groups map to NicTool groups? What about permissions — auto-assign from IdP group membership or manual?
Coexistence with local auth? Users should be able to have both local password and SSO, or SSO-only. The auth_method field controls this.
Multi-IdP? Support one IdP at a time, or multiple simultaneously? Start with one, design for extensibility.
SCIM endpoint path? Should SCIM live under the existing CGI structure or as a standalone PSGI app for cleaner REST routing?
Note
This is 100% AI slop from Abe's virtual son, Moses. Feel free to add input tokens but wow did Moses go overboard.
Problem
NicTool currently supports local password auth, LDAP bind authentication, and WebAuthn/passkeys. Enterprise environments require federated identity (SAML 2.0 / OpenID Connect) for single sign-on and automated user provisioning (SCIM 2.0) for lifecycle management. Without these, NicTool cannot integrate with identity providers like Okta, Azure AD/Entra ID, Google Workspace, Keycloak, or PingIdentity without manual user management.
Research: Perl/CPAN Ecosystem (April 2026)
SAML 2.0 — Production-Ready
Capabilities: SAML 2.0 SP implementation with HTTP-Redirect, HTTP-POST, and SOAP bindings. Supports encrypted assertions, IdP metadata parsing (URL or XML), XML signature validation.
Tested IdPs: Okta, Azure AD, Google/GSuite, Keycloak, PingIdentity, ADFS, OneLogin, Shibboleth, SimpleSAMLphp, DigiD, eHerkenning, eIDAS.
Production usage: Foswiki (SamlLoginContrib), OTRS (otrs-saml2sp), Koha (library management).
OpenID Connect — Production-Ready
OIDC::Client capabilities: Authorization code flow, all client auth methods (client_secret_basic/post/jwt, private_key_jwt), automatic JWK key rotation, token introspection, UserInfo endpoint, discovery (.well-known/openid-configuration), claim validation (iss, aud, sub, exp, etc.).
Framework plugins (all 2025+): Mojolicious::Plugin::OIDC, Catalyst::Plugin::OIDC, Dancer2::Plugin::OIDC, Plack::Auth::SSO::OIDC.
SCIM 2.0 — No CPAN Libraries Exist
No native Perl SCIM 2.0 implementation exists on CPAN (RFC 7642/7643/7644).
Reference implementations in other languages:
elimity-com/scim(production-grade)scimitar(85 stars, actively maintained)scim2-server(lightweight prototype)A Perl SCIM server would need to be built from scratch using standard REST/JSON tools (Plack, JSON, Crypt::JWT for bearer token validation).
Proposed Architecture
Follow the WebAuthn integration pattern already established in the codebase — it cleanly separates browser ceremony from server verification and integrates at the Session dispatcher level.
Integration Points (existing code)
server/lib/NicToolServer/Session.pm::verify()server/lib/NicToolServer.pm::api_commands()client/htdocs/webauthn.cgint_optionstableserver/lib/NicToolServer/User.pmNew Modules
NicToolServer::SSONicToolServer::SCIMclient/htdocs/sso.cgiAuthentication Flow
Schema Changes
Feature Requirements
Phase 1: OIDC Support
OIDC is simpler than SAML and covers most modern IdPs (Okta, Azure AD, Google, Keycloak all support it).
.well-known/openid-configuration)sso.cgi)oidc_loginaudit trailOIDC::Client,Crypt::JWTPhase 2: SAML 2.0 Support
For enterprises that require SAML (older IdPs, government, education).
saml_loginaudit trailNet::SAML2(v0.85+)Phase 3: SCIM 2.0 Provisioning
For automated user lifecycle management from IdPs.
GET /scim/v2/ServiceProviderConfig— capability discoveryGET /scim/v2/Schemas— schema discoveryGET /scim/v2/ResourceTypes— resource type discoveryPOST /scim/v2/Users— create userGET /scim/v2/Users/{id}— read userGET /scim/v2/Users?filter=...— list/search usersPATCH /scim/v2/Users/{id}— partial updatePUT /scim/v2/Users/{id}— full replaceDELETE /scim/v2/Users/{id}— deactivate useruserName eq "value",externalId eq "value")Alternative: Reverse Proxy Approach
For deployments where code changes aren't feasible, a reverse proxy can handle SSO externally:
REMOTE_USERheaderX-Auth-Request-UserheaderThis requires NicTool to trust a
REMOTE_USERheader for authentication — a smaller code change but with header injection risks. Could be documented as a supported deployment option alongside native integration.Open Questions
auth_methodfield controls this.