-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Enable configuration of SAML authentication sources (#5512) #25132
Conversation
This commit only allows administrators to configure a SAML authentication source. It does not include the logic for actually authenticating SAML users, which will come in the next patch.
Looks good overall. I think many the login flow is quite similar to OAuth, so I guess much of that can be re-used. |
Yes, thankfully it's a very simple protocol. I will admit I am unfamilar with Gitea's "norms" for merging, can I expect this to be merged with the promise of a future patch or should I keep adding to this pull request until it is fully complete? |
Depends on what you mean by |
Oh, I apologize I did a horrible job at explaining what I meant there. I meant that this patch is just for configuring the Authentication Source in the Admin UI, and does not add the authentication code. Should I add the authentication code to this pull request and make it bigger, or keep this pull request smaller and make a second pull request for the authentication code? |
Generally, smaller PRs are better as they are easier to review. |
Sorry, I don't think so. The feature should be basically finished. The SAML auth and the login flow is tight. It's better to put them in the same PR. And I think the feature is not a very big PR which should be less than 25 file changes. |
Hey. I'm so sorry about the work you've done so far. Your PR reminded me that I've completed most of this a while ago already during a live stream coding session, and I just hadn't pushed the branch. Please see: #25165 for a nearly complete implementation of SAML auth. |
This commit only allows administrators to configure a SAML authentication source. It does not include the logic for actually authenticating SAML users, which will come in the next patch.
I figured this part of the feature was big enough already so wanted to be kind to the reviewers :). This code, especially the validation, was based on the demo of the library I intend to use (recommended by Gitea maintainers in the original issue): https://github.com/russellhaering/gosaml2/blob/main/s2example/demo.go.
The SAML flow I intend to implement in a future patch is: