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

Security API enhancements #2 #393

Open
vicmosin opened this issue Mar 19, 2024 · 0 comments
Open

Security API enhancements #2 #393

vicmosin opened this issue Mar 19, 2024 · 0 comments

Comments

@vicmosin
Copy link

vicmosin commented Mar 19, 2024

Hi there,
I already had a similar question but now requirements a bit different..
What I need to achieve is the hasRole(roleA, roleB) functionality, meaning both roles must present in the token. And I wonder if we should inspire from spring-security and have something like:

override fun configure(builder: GrpcSecurity) {
   builder.authorizeRequests()
      .services(SomeServiceGrpc.getServiceDescriptor())
      .authentication { auth: Authentication ->
         auth.roles.containsAll(roleA, roleB)
      }
}

Any thoughts?

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

No branches or pull requests

1 participant