Conversation
flask_appbuilder/templates/appbuilder/general/security/login_saml.html
Outdated
Show resolved
Hide resolved
|
I had my claude code do a review :D ignore any nonsense |
aminghadersohi
approved these changes
Feb 3, 2026
Owner
Author
Great comments, I've addressed them all with claude also ;) |
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.
Description
Add SAML 2.0 authentication support (
AUTH_SAML) to Flask-AppBuilder, following the same patterns used by OAuth authentication.New modules (
flask_appbuilder/security/saml/):types.py— TypedDict definitions for all SAML data structures (provider config, SP config, security settings, flask request, user info)utils.py— Pure utility functions:map_saml_attributes()(maps SAML assertion attributes to FAB user fields) andfetch_idp_metadata()metadata.py— SP metadata XML generation via python3-samlSecurity manager (
manager.py):auth_user_saml()— Main authentication method (user lookup, registration, role sync, info update)get_saml_login_redirect_url()/get_saml_userinfo()/get_saml_logout_redirect_url()— SAML protocol methods delegated from the viewget_saml_provider()/get_saml_settings()— Provider config helpers_prepare_saml_request()/_get_saml_auth()— Internal helpers for python3-saml integration_saml_calculate_user_roles()— Role calculation with AUTH_ROLES_MAPPING and jmespath supportsaml_providers,saml_configViews (
views.py):AuthSAMLView— Endpoints for login (/login/<idp>), ACS (/saml/acs/), SLO (/saml/slo/), logout, and SP metadata (/saml/metadata/)UserSAMLModelView— User model view for SAML auth typeOther changes:
const.py— AddedAUTH_SAML = 5setup.py— Addedsamlextras_require (python3-saml>=1.15.0)requirements/extra.txt— Added python3-saml dependencysqla/manager.py— Register SAML user view datamodeldocs/security.rst— Full SAML documentation section (configuration, endpoints, role mapping)Features:
AUTH_ROLES_MAPPINGand jmespath expressionsAUTH_USER_REGISTRATIONTesting:
ADDITIONAL INFORMATION