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

Use Keycloak roles for endpoint permissions #45

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

Conversation

Carifio24
Copy link
Member

This PR modifies our endpoint permissions to look for particular Keycloak roles via some new middleware. The basic idea is that we can check the incoming request to see whether it has the relevant role for a given task. I've retained the superuser account setting in the config, and so the middleware that we end up using for these endpoints will accept a superuser request as well.

permissions.ts Outdated Show resolved Hide resolved
permissions.ts Outdated Show resolved Hide resolved
permissions.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@pkgw pkgw left a comment

Choose a reason for hiding this comment

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

This looks good to go, but it'll probably be a little bit before I merge this since I'll want to have a block of time to check out the Keycloak configuration in production and check if it all seems to be working in practice as intended.

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.

None yet

2 participants