Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Question: resource protection with "any of" role requirements #385

Closed
narerkrit-dotography opened this issue Jun 29, 2018 · 4 comments
Closed
Assignees

Comments

@narerkrit-dotography
Copy link

narerkrit-dotography commented Jun 29, 2018

Hello,

About resource protection, setting multiple roles in a resource means requiring all of the roles.

# requires both roles `foo` and `bar`
- uri: /xx/xx
  roles:
    - foo
    - bar

Is there any way to set the role requirement to be any of the roles? Either globally or resource specific?
i.e. having only role foo is enough to access the resource.

Thank you very much.

@narerkrit-dotography narerkrit-dotography changed the title Question: role requirements logic "OR" Question: resource protection with "any of" role requirements Jun 29, 2018
@gambol99 gambol99 self-assigned this Jul 2, 2018
@gambol99
Copy link
Contributor

gambol99 commented Jul 2, 2018

hi @narerkrit-dotography ... at the moment it requires all roles specified .. https://github.com/gambol99/keycloak-proxy/blob/master/utils.go#L206 .. I guess we could add another option default to and but allowing those to override with a or operation

@gambol99
Copy link
Contributor

gambol99 commented Jul 3, 2018

fixed in #389

@gambol99
Copy link
Contributor

gambol99 commented Jul 5, 2018

gonna mark this a fixed for now, feel free to reopen to you hit an issue though

@gambol99 gambol99 closed this as completed Jul 5, 2018
@narerkrit-dotography
Copy link
Author

Thank you so much.

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

No branches or pull requests

2 participants