Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Sep 14, 2025

This pull request introduces support for SAML 2.0 Single Sign-On (SSO) authentication to the Switcher API, including configuration, documentation, environment setup, and code changes. It adds new dependencies, environment variables, and API endpoints, and updates the admin model to support SAML users. The documentation is updated to guide users through SAML setup.

SAML 2.0 SSO Integration

  • Added SAML 2.0 authentication support using passport and @node-saml/passport-saml, including strategy configuration and session management in src/external/saml.js and src/app.js. [1] [2] [3]
  • Updated the admin model (src/models/admin.js) to support SAML users, adding the saml provider, _samlid field, and new query methods for SAML accounts. [1] [2]

Environment and Deployment Configuration

  • Added SAML-related environment variables to .env-cmdrc-template, config/.env.dev, and docker-compose.yml for local and production deployments. [1] [2] [3] [4]
  • Included SAML environment variables in GitHub Actions workflow files for CI/CD (master.yml, release.yml, re-release.yml, sonar.yml). [1] [2] [3] [4]

API Changes and Documentation

  • Added new SAML SSO endpoints (/admin/saml/login, /admin/saml/callback, /admin/saml/auth, /admin/saml/metadata) to the API and documented them in Swagger (src/api-docs/paths/path-admin-saml.js, src/api-docs/swagger-document.js). [1] [2] [3]
  • Updated README.md with SAML SSO setup instructions and clarified supported authentication providers. [1] [2]

Dependency Updates

  • Added new dependencies for SAML and session management (passport, @node-saml/passport-saml, express-session) and updated axios. [1] [2]

Minor Improvements

  • Improved admin model query logic for third-party providers and fixed minor code issues. [1] [2] [3]

@petruki petruki added this to the v1.4.1 milestone Sep 14, 2025
@petruki petruki self-assigned this Sep 14, 2025
@petruki petruki added the enhancement New feature or request label Sep 14, 2025
@sonarqubecloud
Copy link

@petruki petruki merged commit 8df81ae into master Sep 14, 2025
5 checks passed
@petruki petruki deleted the feat_saml branch September 14, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants