Skip to content
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

Add auth_provider to users/ endpoint to denote an SSO user #996

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

ShaiahWren
Copy link
Contributor

@ShaiahWren ShaiahWren commented Sep 29, 2021

Issue: AAH-952
Assignment: Add auth_provider to users/ endpoint to denote an SSO user
See on Jira: https://issues.redhat.com/browse/AAH-952

Creates a new serializer method field, "auth_provider" that checks to see if the user is an SSO user. If so, method returns the SSO provider; if not it returns "django" as a string.

@app-sre-bot
Copy link
Collaborator

Can one of the admins verify this patch?

.compose.env.example Outdated Show resolved Hide resolved
galaxy_ng/app/api/ui/serializers/user.py Outdated Show resolved Hide resolved
Copy link
Member

@newswangerd newswangerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meant to request changes.

@newswangerd newswangerd added the backport-4.4 This PR should be backported to stable-4.4 (2.1) label Sep 30, 2021
Copy link
Contributor

@awcrosby awcrosby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see suggestion for auth_provider in UserSerializer.Meta

@ShaiahWren ShaiahWren force-pushed the confirm-SSO-user branch 3 times, most recently from 4eb9643 to 2eeb908 Compare October 4, 2021 19:30
CHANGES/952.bugfix Outdated Show resolved Hide resolved
@ShaiahWren ShaiahWren changed the title confirm SSO users Add auth_provider to users/ endpoint to denote an SSO user Oct 5, 2021
@awcrosby
Copy link
Contributor

awcrosby commented Oct 5, 2021

Seems to be working, I just tested with my local keycloak setup, I had an admin user created outside keycloak, and logged in with one user that was in the test LDAP server.

        ...
            "id": 2,
            "username": "fry",
            "first_name": "Philip J. Fry",
            ...
            "auth_provider": [
                "keycloak"
            ]
       ...
            "id": 1,
            "username": "admin",
            ...
            "auth_provider": [
                "django"
            ]

@awcrosby
Copy link
Contributor

awcrosby commented Oct 5, 2021

/retest

@awcrosby awcrosby dismissed newswangerd’s stale review October 5, 2021 18:50

Requested changes were completed by PR author

@awcrosby awcrosby merged commit 501a299 into ansible:master Oct 5, 2021
@patchback
Copy link

patchback bot commented Oct 5, 2021

Backport to stable-4.4: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4.4/501a299d7f8d54ae8c47a5594922a202ff938ca8/pr-996

Backported as #1007

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Oct 5, 2021
* Create a new serializer method field "auth_provider" that returns the user's SSO providers if present; if not it returns `["django"]`

* Add the "GALAXY_TOKEN_EXPIRATION" setting to the _ui/v1/settings/ endpoint

Issue: AAH-952
(cherry picked from commit 501a299)
awcrosby pushed a commit that referenced this pull request Oct 5, 2021
)

* Create a new serializer method field "auth_provider" that returns the user's SSO providers if present; if not it returns `["django"]`

* Add the "GALAXY_TOKEN_EXPIRATION" setting to the _ui/v1/settings/ endpoint

Issue: AAH-952
(cherry picked from commit 501a299)

Co-authored-by: Shaiah Emigh-Doyle <64337863+ShaiahWren@users.noreply.github.com>
@awcrosby awcrosby added the backported-4.4 This PR has been backported to stable-4.4 (2.1) label Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-4.4 This PR should be backported to stable-4.4 (2.1) backported-4.4 This PR has been backported to stable-4.4 (2.1)
Projects
None yet
5 participants