Skip to content

Simplify Configuring Realm Name for WebFlux Applications #6270

@tensberg

Description

@tensberg

Summary

I'd like to be able to change the HTTP BASIC Realm configured by the WebFlux ServerHttpSecurity http.httpBasic(). It looks to me like there is no way to get at the underlying HttpBasicSpec.entryPoint to change the default.

Actual Behavior

ServerHttpSecurity http.httpBasic() always uses the default realm Realm.

Expected Behavior

Add API ServerHttpSecurity http.httpBasic().realmName("myRealm") similar to HttpSecurity to change the realm.

Configuration

@Bean
    public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
        http
            .authorizeExchange()
                .anyExchange().authenticated()
                .and()
            .httpBasic()
        return http.build();
    }

Version

Spring Boot 2.1.1.RELEASE
Spring Security 5.1.2.RELEASE

Metadata

Metadata

Assignees

Labels

in: configAn issue in spring-security-config

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions