Skip to content

Security API enhancements #2 #393

Description

@vicmosin

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions