Skip to content

Security API enhancements #296

Closed
Closed
@vicmosin

Description

@vicmosin

Hi there,
I wonder whether we could have something like

override fun configure(builder: GrpcSecurity) {
        builder.authorizeRequests()
            .services(SomeServiceGrpc.getServiceDescriptor()).hasAnyRole(user) // fallback
            .methods(SomeServiceGrpc.getMethod1()).hasAnyRole(admin, user)
            .methods(SomeServiceGrpc.getMethod2()).hasAnyRole(superAdmin, user)
}

Idea is to have a fallback restriction to service's methods if one forgot to define the method restriction in configuration. Right now such approach doesn't seem to work. For example, the snippet above will set all the methods of the SomeServiceGrpc to have at least user role even if it's not explicitly specified in the configuration

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions