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

feat: token authentication for api access; fix #44 #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hahahannes
Copy link

This Pr adds the feature of validating an OAuth/OIDC access token in the Authorization header for authentication. First the presence of a token is checked, then its validity. In case of failure, the original basic auth check is performed. At the moment, I tested it with Keycloak as the Identity Provider and RS256 signed tokens and the public keys that are exposed by keyloack under /protocol/openid-connect/certs

@hahahannes hahahannes changed the title check access token for group attribute as well; fix #43 feat: check access token for group attribute as well; fix #43 Oct 24, 2024
@hahahannes hahahannes force-pushed the token_authentication branch from 12e057c to a6e2b5e Compare October 24, 2024 12:06
@hahahannes hahahannes force-pushed the token_authentication branch from a6e2b5e to c7af7b7 Compare October 25, 2024 12:31
@hahahannes hahahannes changed the title feat: check access token for group attribute as well; fix #43 feat: token authentication for api access; fix #44 Oct 25, 2024
@hahahannes
Copy link
Author

@kharkevich Let me know what you think. I tried to make it as generic as possible but it needs more testing for the full feature. Could definitely also add some unittest.

Copy link

@malleshasc malleshasc left a comment

Choose a reason for hiding this comment

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

Approving request, this code would help us.

@kharkevich
Copy link
Member

@hahahannes thanks for inspiring me to make this feature real, could you please check #54 probably it will work for you. Otherwise, please update your PR in accordance with the new project structure

@hahahannes
Copy link
Author

Awesome! I will try to test it soon

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.

3 participants