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

Add an AssertionHandler to the middleware #509

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

kevcoxe
Copy link

@kevcoxe kevcoxe commented Mar 22, 2023

I have been using this repo in addition to itzg/saml-auth-proxy but I wanted to add some extra functionality where on login take the assertion from the SAML provider and add RBAC to Grafana.

To do this I added a AssertionHandler to samlsp middleware. Inside of the ServeACS function before creating the session I call the AssertionHandler.HandleAssertion function and give it the assertion.

This way you can create your own AssertionHandler and have it do whatever you want, in my case add RBAC to opensource Grafana.

Let me know if there is something I should change. I am currently using a fork for my purpose but would love to see this added upstream.

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.

1 participant