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

question: ACL authorization based on custom token fields #30

Open
lukedirtwalker opened this issue Nov 7, 2022 · 2 comments
Open

question: ACL authorization based on custom token fields #30

lukedirtwalker opened this issue Nov 7, 2022 · 2 comments
Assignees
Labels
need triage question Further information is requested

Comments

@lukedirtwalker
Copy link
Contributor

A clear and concise description of what you want to accomplish.

Currently there is no way to do ACL authorization on custom fields. E.g on Auth0 it is not allowed to specify the roles field in a token so we put it in https://example.org/roles, but the ACL will not see this field. This is because there is a distinction in the User type. The fields in tkv are accessible in the ACL but fields in the mkv map not. (Authorization uses this

func (u *User) GetData() map[string]interface{} {
method).

Is there a specific reason to have this distinction? Couldn't we just expose the whole mkv for the authorization?
I would be happy to write a patch, but I'm not sure how to best solve this.

Thanks a lot for your feedback.

@lukedirtwalker lukedirtwalker added need triage question Further information is requested labels Nov 7, 2022
@lukedirtwalker
Copy link
Contributor Author

Digging deeper I realized that we can't really determine the data type in this case, and we would just fail to parse the ACL.
Not sure what's the best solution to this. It would be great if there would be someway to "rewrite" properties in the token before doing the ACLing. But not sure how this would be plugged in the nicest way.

@CrazyPython
Copy link

I would like to be able to map auth0 roles to caddy-security roles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need triage question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants