Skip to content

Commit 0c7a14c

Browse files
mdanish98aaronzi
andauthored
Permits swagger API endpoints and APIs when auth is enabled (eclipse-basyx#576)
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de> Co-authored-by: Aaron Zielstorff <aaron.zi@web.de>
1 parent 224320a commit 0c7a14c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

basyx.common/basyx.authorization/src/main/java/org/eclipse/digitaltwin/basyx/authorization/CommonSecurityConfiguration.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
4949
.authorizeHttpRequests(authorize -> authorize
5050
.requestMatchers("/actuator/health/**").permitAll()
5151
.requestMatchers(HttpMethod.OPTIONS, "/**").permitAll()
52+
.requestMatchers("/swagger-ui/**").permitAll()
53+
.requestMatchers("/v3/**").permitAll()
54+
.requestMatchers("/api-docs/**").permitAll()
55+
.requestMatchers("api-docs/swagger-config/**").permitAll()
5256
.anyRequest().authenticated()
5357
)
5458
.oauth2ResourceServer(oauth2 -> oauth2

0 commit comments

Comments
 (0)