Repository navigation
NethVoice: pluggable authentication methods with SAML2 Single Sign-On #8142
Description
Description
NethVoice CTI users can currently authenticate only with their account-provider password (PAM/LDAP bind). Organizations using a federated Identity Provider (e.g. universities with Shibboleth/SAML2, as in legacy NethVoice 7 deployments integrated with the Cineca IdP) need users to log into NethVoice CTI through the IdP, without typing a password in NethVoice.
Goal: introduce a generic, pluggable "authentication method" in the NS8 NethVoice module: SAML2 now, ready for OIDC later, with minimal changes to the core components.
Design
Two orthogonal concepts:
- Account provider (existing, unchanged): where users live (NS8 OpenLDAP or external LDAP/AD). Still required with SSO: it remains the source of user records, extensions and CTI profiles.
- Authentication method (new): how users prove their identity:
password(default, current behavior) orsaml2(delegated to an external IdP). The SAML identity attribute (e.g.uid,eppn) must match the account-provider username.
Trusted-mint contract (protocol agnostic):
- A Shibboleth SP container, generated from the module settings, authenticates the user against the IdP.
- Traefik guards a dedicated mint route (
POST /api/sso-login) with forwardAuth against the SP check endpoint; the verified identity is injected asRemote-User(client-supplied values are overridden, the SP fails closed on spoofing). - nethcti-middleware forwards the identity with a shared secret to nethcti-server, which mints the token without a password.
Adding OIDC later only requires a new front door (e.g. oauth2-proxy) speaking the same contract.
Security
- Per-install high-entropy secrets generated by the module (mint-authorization secret and a separate HMAC token key), never shown in the UI, revoked when SSO is disabled.
- Privileged/local accounts (
admin,administrator,root) always denied over SSO; optional user allowlist. - SP attribute filter scoped to the single identity attribute, single-attribute
REMOTE_USER, optional value regex. - Optional IdP metadata signature verification (federation signing certificate, settable via API).
- SSO is off by default: with
authentication_method=passwordnothing changes.
User experience
- Cluster-admin settings: "Authentication method" selector; with
saml2: the service-provider metadata URL to register on the IdP (copy to clipboard), IdP metadata URL, identity attribute, SSO button label. - CTI login page: SSO button instead of the password form;
https://<cti>/?login=ssostarts the flow directly (like the legacy?login=shibboleth). - NethLink: two-step login (host first, then credentials or SSO button based on the host authentication method); the SAML flow runs in a dedicated window and SSO accounts are stored without a password.
Validated end-to-end on NS8 with a Shibboleth SP and a SimpleSAMLphp test IdP (login, phone-island and calls working).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
build: point components to the SSO feature refs
edospadoni commentedon Oct 5, 2026
Testing release:
NethLink release:
edospadoni commentedon Oct 8, 2026
Test cases
Update NethVoice to the testing version:
Requirements:
edoardowith a CTI profile and a NethLink extensionedoardo2in the account providerSet these variables on the node (as root), they are used in all the commands below:
The two test identity providers run on the same node and are published under the NethVoice host, so they reuse its certificate:
https://$VOICE_HOST/simplesaml, usersedoardo/edoardopassandedoardo2/edoardopass2https://$VOICE_HOST/dex, useredoardo@example.org/edoardopassSetup: SAML2 test IdP (SimpleSAMLphp)
Check, the IdP metadata must be returned:
Setup: OIDC test IdP (dex)
Check, the issuer must be returned:
Test case 1: SSO hidden by default
Test case 2: enable SSO
Test case 3: SAML2 configuration
https://$CTI_HOST/Shibboleth.sso/Metadatamust be shown, with a copy buttonhttps://$VOICE_HOST/simplesaml/saml2/idp/metadata.phpuid, saveTest case 4: SAML2 login on CTI
https://$CTI_HOSTin a private windowedoardo/edoardopassedoardo; open the phone island and make a callTest case 5: SAML2 user not enabled on CTI
edoardo2/edoardopass2Test case 6: SAML2 direct login link
https://$CTI_HOST/?login=ssoTest case 7: SAML2 login on NethLink
$CTI_HOSTand continueedoardo/edoardopassedoardoedoardo2/edoardopass2: the "not enabled to use the CTI" message must be shownTest case 8: OIDC configuration
https://$CTI_HOST/oauth2/callbackmust be shown, with a copy buttonhttps://$VOICE_HOST/dex, client IDnethvoice-cti, client secret printed by the dex setup, IdP nameDex Test IdP, saveTest case 9: OIDC login on CTI and NethLink
preferred_usernameclaim used by NethVoice, real IdPs (Entra ID, Keycloak, Okta, Google) do. For dex only, after every save of the OIDC settings run:https://$CTI_HOSTin a private window, click the SSO button ("Dex Test IdP" below it), log in withedoardo@example.org/edoardopassand grant accessedoardoedoardoTest case 10: the SSO login can not be forged
401Test case 11: secrets and ports
passwords.env:environmentmust return 0,passwords.envmust return 1Test case 12: back to password
saml2-proxyandoauth2-proxymust be stopped and their images removed:Test case 13: disable SSO
Test case 14: backup and restore
Test case 15: update from a previous version
SSO_AUTHmust be unset and the SSO images must not be downloadedCleanup
tonyco97 commentedon Oct 8, 2026
Test report
Environment
1.7.10-testing.27, then topr-1017.1041-1.1b4de1c(with fix(sso): allocate SSO proxy ports on upgraded 1.7.x instances nethesis/ns8-nethvoice#1017 and thefix-sso-login-logoutCTI build)ssobranch (feat(auth): two-step login with SSO (SAML2 and OIDC) nethlink#211, including1a39b90)antonioused as the CTI-enabled user;edoardo2exists only on the IdPResults
401passwords.env(environment: 0, passwords.env: 1)charliewhiting commentedon Oct 8, 2026
Package installed correctly at the university site.
SSO disabled by default.
Command executed:
runagent -m nethvoice1 python3 -c 'import agent; agent.set_env("SSO_AUTH", "true")'
The command returned the SSO configuration parameters, and the values were still set to the previous ones.
Login was verified and completed successfully through redirection to the customer's authentication platform.
Amygos commentedon Oct 12, 2026
Release
nethesis/ns8-nethvoice1.7.10