Implementing SSO#230
Open
kevin-atnos wants to merge 12 commits intomasterfrom
Open
Conversation
Collaborator
Author
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements Single Sign-On (SSO) functionality by adding new SAML routes and controllers, updating session management with Redis, and configuring SAML settings in Devise.
- Added SAML routes in routes.rb
- Introduced a new SamlController that handles SSO, ACS, and SLO flows
- Updated session store and extended Devise initializer with commented SAML config for future adjustments
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| config/routes.rb | Added SAML endpoints for metadata, SSO, ACS, logout, and SLO handling |
| config/initializers/session_store.rb | Configured Redis as the session store with updated parameters |
| config/initializers/devise.rb | Enabled email authentication and provided commented sample SAML settings |
| config/application.rb | Minor changes with stylistic quote updates and added secret_key_base |
| app/policies/pia_policy.rb | Switched to eager loading of associated records for performance improvements |
| app/models/user.rb | Updated login uniqueness validation using Ruby shorthand, but with issues |
| app/controllers/saml_controller.rb | Introduced new controller handling SSO requests and SAML attribute population |
| app/controllers/pias_controller.rb | Adjusted association loading for performance |
| app/controllers/application_controller.rb | Extended info API to include SSO enabled flag |
| Gemfile | Added new dependencies for ruby-saml, devise_saml_authenticatable, and Redis |
brunto
previously approved these changes
Jul 18, 2025
mrdev023
reviewed
Nov 25, 2025
10a2a8b to
7041e6f
Compare
# Conflicts: # config/application.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant updates to the application, focusing on adding SAML-based single sign-on (SSO) support, improving database query performance, and enhancing configuration and session management. Below is a summary of the most important changes grouped by theme.
SAML-Based Single Sign-On (SSO) Integration:
SamlControllerto handle SAML metadata, SSO, logout, and SLO responses, enabling SAML-based authentication workflows (app/controllers/saml_controller.rb).config/routes.rb.deviseinitializer with commented-out SAML configuration options to support SAML-based user authentication (config/initializers/devise.rb).Performance Improvements:
PiaandPiaPolicyqueries to useeager_loadfor preloading associateduser_pias, reducing N+1 query issues (app/controllers/pias_controller.rb,app/policies/pia_policy.rb) [1] [2].Session and Configuration Enhancements:
config/initializers/session_store.rb).config.secret_key_basetoconfig/application.rbfor secure application configuration (config/application.rb).Dependency Updates:
ruby-samlanddevise_saml_authenticatablefor SAML authentication, andrediswithredis-actionpackfor Redis-based session storage (Gemfile).Minor Code and Syntax Improvements:
app/models/user.rb,config/application.rb) [1] [2].