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

PoC: Enable SSO by listning for http header: REMOTE_USER #632

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

spetzreborn
Copy link

This is a proof of concept that we currently are testing, but that I want to start a discussion about.
The code is not production ready, it is a starting point for a concrete discussion.

I have opened issue #631 with more information.

Regards
Björn

This allow all middlewares to query the database. For alternative
authorizations that need to create and read the database.
@spetzreborn
Copy link
Author

This code have been working fine for us, this should fix #631

log.Infof("User %s not in database, creating user", remoteUser)
newUser := model.User{
Username: remoteUser,
Admin: false,
Copy link

Choose a reason for hiding this comment

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

It would be nice to add a flag where you can specify the admin username.

Copy link
Author

Choose a reason for hiding this comment

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

In a SSO context this would preferably be done on the IdP and provisioning entitlements so the app dont have to do it. That also works well when a user is no longer a admin.

The provided code is more a proof of concept that works in our setup, but I did have to do an bootstrap by starting the applikation and edit me to admin and then switching on SSO.

For a real use I think it would be better to listen to some value from the IdP than a set list of users that should be admins.

Copy link

Choose a reason for hiding this comment

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

Unfortunately, there is no protocol for transferring rights or anything else. Even remote-user is not something official, but just one of two popular options. Second is X-Forwarded-User.
I have my own authorizing proxy and I have tried many services. Usually, you just specify the admin for applications. This is a common approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants