Skip to content

Mutli-Tenancy Support using JWT claims #1

Open
@InventorSingh

Description

@InventorSingh

Hi Greg, Thank you for the great work. I was trying this example and trying to add mutli-tenancy support in spring boot hello world application from netifi examples. I am using netifi community edition broker.

Below is my Rsocket Security Configuration:

@configuration
@EnableRSocketSecurity
public class RsocketSecurityConfig {

@Bean
PayloadSocketAcceptorInterceptor rsocketInterceptor(RSocketSecurity rsocket) {
    return rsocket
            .authorizePayload(authorize ->
                    authorize
                            .route("*").hasRole("ROLE_ADMIN")
                            .anyRequest().authenticated()
                            .anyExchange().authenticated()
            )
            .jwt(Customizer.withDefaults()).build();
}

@Bean
ReactiveJwtDecoder jwtDecoder() {
    return ReactiveJwtDecoders
            .fromIssuerLocation("http://localhost:7475/auth/realms/devnation");
}

}

But somehow security is not applied to my application. I am still able to call the hello-service form hello-client. How could I secure my services defined in protobuff with spring security rsocket?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions