Skip to content

Security API enhancements #2 #393

@vicmosin

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions