-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔑feat: SAML authentication #6169
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please have a look at my comment at:
docker-compose.override.yml.example
docker-compose.override.yml.example
Outdated
# # ADD SAML METADATA FILE | ||
# api: | ||
# - type: bind | ||
# source: ./your-metadata.xml | ||
# target: /app/your-metadata.xml | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you missed here something? you mean the cert file here right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you still made a typo 😅 ycert.pem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it to your_cert.pem
!!process.env.APPLE_CLIENT_ID && | ||
!!process.env.APPLE_TEAM_ID && | ||
!!process.env.APPLE_KEY_ID && | ||
!!process.env.APPLE_PRIVATE_KEY_PATH, | ||
openidLoginEnabled: isOpenIdEnabled, | ||
openidLabel: process.env.OPENID_BUTTON_LABEL || 'Continue with OpenID', | ||
openidImageUrl: process.env.OPENID_IMAGE_URL, | ||
samlLoginEnabled: !isOpenIdEnabled && isSamlEnabled, | ||
samlLabel: process.env.SAML_BUTTON_LABEL, | ||
samlImageUrl: process.env.SAML_IMAGE_URL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this file. about this logic in specific:
samlLoginEnabled: !isOpenIdEnabled && isSamlEnabled,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is designed to ensure that only one authentication method, either OpenID or SAML, can be enabled at a time.
I thought the comment no that you can only setup OpenID or SAML also in the backend api
suggested that OpenID and SAML should be mutually exclusive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah you're correct. It's not common to allow SAML and OpenID authentication at the same time.
But it's more about the changes you made in that file that I'm not fully sure about that's all. I just need to have a good look. 👀
Testing with different combinations of Especially curious about the behavior when the IdP session expires while the app session remains active—want to align it with OpenID behavior. result: Same behavior as OpenID: Reauthentication is required only if both the app session has expired (or the user has logged out) and the IdP session is also expired. |
Pull Request Template
Summary
ref: #6034
Many organizations use SAML for single sign-on (SSO) authentication.
Adding SAML login support allows seamless integration with enterprise authentication systems, improving security and user convenience.
Dependencies:
passport-saml-metadataxml2jsKey Points
issuer
,entry_point
,cert
.SAML_CERT
supports both acert file
path and acert string
.Signed SAML Response
andSigned SAML Assertion
.Concerns
How to register thecom_auth_saml_login
key in Locize. (not yet)Change Type
Testing
Test Configuration:
See: LibreChat-AI/librechat.ai#255
Setup Auth0 SAML and .env.
Checklist
Please delete any irrelevant options.