File tree 2 files changed +6
-1
lines changed
api/src/main/java/io/kafbat/ui/config/auth
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public class LdapProperties {
20
20
21
21
@ Value ("${oauth2.ldap.activeDirectory:false}" )
22
22
private boolean isActiveDirectory ;
23
- @ Value ("${oauth2.ldap.activeDirectory.domain:@ null}" )
23
+ @ Value ("${oauth2.ldap.activeDirectory.domain:#{ null} }" )
24
24
private String activeDirectoryDomain ;
25
25
26
26
}
Original file line number Diff line number Diff line change 12
12
import java .util .stream .Stream ;
13
13
import lombok .RequiredArgsConstructor ;
14
14
import lombok .extern .slf4j .Slf4j ;
15
+ import org .apache .commons .lang3 .StringUtils ;
15
16
import org .springframework .beans .factory .annotation .Autowired ;
16
17
import org .springframework .boot .autoconfigure .condition .ConditionalOnProperty ;
17
18
import org .springframework .boot .context .properties .EnableConfigurationProperties ;
@@ -163,6 +164,10 @@ public SecurityWebFilterChain configureLdap(ServerHttpSecurity http) {
163
164
}
164
165
165
166
private ActiveDirectoryLdapAuthenticationProvider activeDirectoryProvider (LdapAuthoritiesPopulator populator ) {
167
+ if (StringUtils .isBlank (props .getActiveDirectoryDomain ())) {
168
+ throw new IllegalArgumentException ("Active Directory domain is required but not specified" );
169
+ }
170
+
166
171
ActiveDirectoryLdapAuthenticationProvider provider = new ActiveDirectoryLdapAuthenticationProvider (
167
172
props .getActiveDirectoryDomain (),
168
173
props .getUrls ()
You can’t perform that action at this time.
0 commit comments