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

Extend the Remote User Auth backend with REMOTE_GROUPS ability #311

Merged
merged 2 commits into from
Mar 23, 2018

Conversation

jezdez
Copy link

@jezdez jezdez commented Jan 24, 2018

If enabled the feature allows checking the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.

@@ -12,9 +13,11 @@
def login():
next_path = request.args.get('next')

index_url_with_next = url_for('redash.index', next=next_path)

Copy link

Choose a reason for hiding this comment

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

In general I'm nervous about code cleanups like this because it's extra surface area for conflicts when integrating with upstream

Copy link
Author

Choose a reason for hiding this comment

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

Alright, will back it out.

# Check if the allowed groups match any of the ones found in the header
matching_groups = set()
for allowed_group in settings.REMOTE_GROUPS_ALLOWED:
matching_groups.update(set(fnmatch.filter(groups, allowed_group)))
Copy link

Choose a reason for hiding this comment

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

is wildcard support something we need currently?

Copy link
Author

Choose a reason for hiding this comment

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

I don't know how the actual group notation for us is (@robotblake?) but nested groups is certainly a thing in LDAP which would make setting this stuff up simpler.

Copy link

@robotblake robotblake Jan 24, 2018

Choose a reason for hiding this comment

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

It's somewhat arbitrary, it doesn't hurt to have this though and I'm guessing while we probably won't use it right now I could see it being useful going forward.

Copy link
Author

Choose a reason for hiding this comment

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

I changed my mind, this is a risk to land this upstream, backed it out again.

@jezdez jezdez force-pushed the remote_user-auth0 branch from e4a5a85 to 02fcf1c Compare January 24, 2018 22:17
@washort
Copy link

washort commented Jan 24, 2018

Looks good overall.

@jezdez jezdez force-pushed the remote_user-auth0 branch 2 times, most recently from cca066d to bde4ca3 Compare January 26, 2018 16:32
@washort washort force-pushed the master branch 3 times, most recently from 2618326 to bf7370c Compare February 14, 2018 17:53
@rafrombrc rafrombrc added this to the 13 milestone Feb 21, 2018
@jezdez
Copy link
Author

jezdez commented Feb 22, 2018

@robotblake I've rebased the branch with current master, could you push your branch? You can also just push the old state and I do the rebasing ;)

@washort washort force-pushed the master branch 2 times, most recently from ecaaeda to ea9c225 Compare March 5, 2018 18:49
@jezdez jezdez force-pushed the master branch 2 times, most recently from 4ae2fe6 to 80d9ab6 Compare March 5, 2018 21:35
@washort washort force-pushed the remote_user-auth0 branch from c5f3043 to 3c5f58b Compare March 14, 2018 17:55
…ser groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
@washort washort force-pushed the remote_user-auth0 branch from 3c5f58b to a84ec1e Compare March 14, 2018 17:57
@rafrombrc rafrombrc modified the milestones: 13, 14 Mar 21, 2018
@washort washort merged commit 5f501f5 into master Mar 23, 2018
emtwo pushed a commit that referenced this pull request May 25, 2018
Extend the Remote User Auth backend with the ability to pass remote user groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
@jezdez jezdez deleted the remote_user-auth0 branch June 27, 2018 14:16
washort pushed a commit that referenced this pull request Jul 25, 2018
Extend the Remote User Auth backend with the ability to pass remote user groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
washort pushed a commit that referenced this pull request Jul 30, 2018
Extend the Remote User Auth backend with the ability to pass remote user groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
jezdez added a commit that referenced this pull request Aug 16, 2018
Extend the Remote User Auth backend with the ability to pass remote user groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
jezdez added a commit that referenced this pull request Sep 6, 2018
Extend the Remote User Auth backend with the ability to pass remote user groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
jezdez added a commit that referenced this pull request Sep 6, 2018
Extend the Remote User Auth backend with the ability to pass remote user groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
jezdez added a commit that referenced this pull request Sep 6, 2018
Extend the Remote User Auth backend with the ability to pass remote user groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
jezdez added a commit that referenced this pull request Nov 1, 2018
Extend the Remote User Auth backend with the ability to pass remote user groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
jezdez added a commit that referenced this pull request Dec 12, 2018
Extend the Remote User Auth backend with the ability to pass remote user groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
jezdez added a commit that referenced this pull request Dec 17, 2018
Extend the Remote User Auth backend with the ability to pass remote user groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
jezdez added a commit that referenced this pull request Dec 19, 2018
Extend the Remote User Auth backend with the ability to pass remote user groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
jezdez added a commit that referenced this pull request Jan 25, 2019
Extend the Remote User Auth backend with the ability to pass remote user groups via a configurable request header similar to the REMOTE_USER header.

Refs #37.

If enabled the feature allows checks the header value against a configured list of group names, including the ability to use UNIX shell-style wildcards.
jezdez added a commit to mozilla/redash-stmo that referenced this pull request Mar 22, 2019
jezdez added a commit to mozilla/redash-stmo that referenced this pull request Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants