Skip to content

Add simpler permissions option to BasicAuthorizer GET APIs#7635

Merged
jon-wei merged 3 commits intoapache:masterfrom
jon-wei:auth_role_simple_output
May 15, 2019
Merged

Add simpler permissions option to BasicAuthorizer GET APIs#7635
jon-wei merged 3 commits intoapache:masterfrom
jon-wei:auth_role_simple_output

Conversation

@jon-wei
Copy link
Copy Markdown
Contributor

@jon-wei jon-wei commented May 10, 2019

This PR adds a ?simplifyPermissions option to the GET APIs for users and roles in the druid-basic-security authorization APIs.

The current output of these APIs can return a list of associated permissions. However, the output format of these permissions has an extra compiled regex field, and it does not match the input format for permissions used by the permissions update APIs. The compiled regex is redundant and is not useful for clients, it is stored internally to avoid recompiling the regex patterns.

This inconsistency complicates the use of these APIs for clients such as frontends for editing the authorization configuration, since they must deal with two different permissions formats.

Specifying ?simplifyPermissions will return consistent output.

This PR deprecates the old formats; in a later release the default output formats should be switched to match the output when ?simplifyPermissions is used.

jon-wei and others added 2 commits May 14, 2019 13:28
Co-Authored-By: Himanshu <g.himanshu@gmail.com>
Co-Authored-By: Himanshu <g.himanshu@gmail.com>
@jon-wei jon-wei merged commit e874da7 into apache:master May 15, 2019
jon-wei added a commit to implydata/druid-public that referenced this pull request May 20, 2019
* Add simpler permissions option to BasicAuthorizer GET APIs

* Adjust log message

Co-Authored-By: Himanshu <g.himanshu@gmail.com>

* Adjust log message

Co-Authored-By: Himanshu <g.himanshu@gmail.com>
gianm pushed a commit to implydata/druid-public that referenced this pull request Jul 3, 2019
* Add simpler permissions option to BasicAuthorizer GET APIs

* Adjust log message

Co-Authored-By: Himanshu <g.himanshu@gmail.com>

* Adjust log message

Co-Authored-By: Himanshu <g.himanshu@gmail.com>
@clintropolis clintropolis added this to the 0.16.0 milestone Aug 8, 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.

3 participants