-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #498 from groldan/gateway_shared_auth_tests
Split gateway shared authentication filter into pre and post filters
- Loading branch information
Showing
15 changed files
with
990 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...in/java/org/geoserver/cloud/autoconfigure/gateway/GatewaySharedAuthAutoConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* (c) 2024 Open Source Geospatial Foundation - all rights reserved This code is licensed under the | ||
* GPL 2.0 license, available at the root application directory. | ||
*/ | ||
package org.geoserver.cloud.autoconfigure.gateway; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
|
||
import org.geoserver.cloud.security.gateway.sharedauth.GatewaySharedAuhenticationPostFilter; | ||
import org.geoserver.cloud.security.gateway.sharedauth.GatewaySharedAuhenticationPreFilter; | ||
import org.springframework.boot.autoconfigure.AutoConfiguration; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.context.annotation.Bean; | ||
|
||
import javax.annotation.PostConstruct; | ||
|
||
@AutoConfiguration | ||
@ConditionalOnProperty( | ||
name = "geoserver.security.gateway-shared-auth.enabled", | ||
havingValue = "true", | ||
matchIfMissing = true) | ||
@Slf4j | ||
public class GatewaySharedAuthAutoConfiguration { | ||
|
||
@PostConstruct | ||
void logEnabled() { | ||
log.info("gateway-shared-auth is enabled"); | ||
} | ||
|
||
@Bean | ||
GatewaySharedAuhenticationPreFilter gatewaySharedAuhenticationGlobalPreFilter() { | ||
return new GatewaySharedAuhenticationPreFilter(); | ||
} | ||
|
||
@Bean | ||
GatewaySharedAuhenticationPostFilter gatewaySharedAuhenticationGlobalPostFilter() { | ||
return new GatewaySharedAuhenticationPostFilter(); | ||
} | ||
} |
163 changes: 0 additions & 163 deletions
163
.../main/java/org/geoserver/cloud/gateway/filter/GatewaySharedAuhenticationGlobalFilter.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.