Skip to content

Commit 2777df6

Browse files
committed
BAEL-315 Adding spring session as mechanism for sharing authentication tokens created by the edge service.
1 parent 59d2f78 commit 2777df6

20 files changed

Lines changed: 15573 additions & 21 deletions

‎spring-cloud/spring-cloud-bootstrap/application-config/gateway.properties‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@ server.port=8080
44
eureka.client.region = default
55
eureka.client.registryFetchIntervalSeconds = 5
66

7+
management.security.sessions=always
8+
79
zuul.routes.resource.path=/resource/**
8-
zuul.routes.resource.sensitiveHeaders=Set-Cookie,Authorization,Cookie
9-
hystrix.command.resource.execution.isolation.thread.timeoutInMilliseconds: 5000
10+
zuul.routes.resource.sensitive-headers=Set-Cookie,Authorization
11+
hystrix.command.resource.execution.isolation.thread.timeoutInMilliseconds=600000
1012

11-
spring.redis.host=localhost
12-
spring.redis.port=6379
13+
zuul.routes.discovery.path=/discovery/**
14+
zuul.routes.discovery.sensitive-headers=Set-Cookie,Authorization
15+
hystrix.command.discovery.execution.isolation.thread.timeoutInMilliseconds=600000
1316

17+
logging.level.org.springframework.web.=debug
18+
logging.level.org.springframework.security=debug
19+
logging.level.org.springframework.cloud.netflix.zuul=debug
20+
21+
spring.redis.host=localhost
22+
spring.redis.port=6379

‎spring-cloud/spring-cloud-bootstrap/application-config/resource.properties‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@ resource.admin.returnString=hello cloud admin
88
eureka.client.region = default
99
eureka.client.registryFetchIntervalSeconds = 5
1010

11+
management.security.sessions=never
12+
13+
logging.level.org.springframework.web.=debug
14+
logging.level.org.springframework.security=debug
15+
1116
spring.redis.host=localhost
1217
spring.redis.port=6379

‎spring-cloud/spring-cloud-bootstrap/gateway/src/main/java/com/baeldung/spring/cloud/bootstrap/gateway/SecurityConfig.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ protected void configure(HttpSecurity http) throws Exception {
2424
http
2525
.authorizeRequests()
2626
.antMatchers("/resource/hello/cloud").permitAll()
27+
.antMatchers("/static/eureka/**").hasRole("ADMIN")
2728
.anyRequest().authenticated()
2829
.and()
2930
.formLogin()

‎spring-cloud/spring-cloud-bootstrap/gateway/src/main/resources/bootstrap.properties‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,4 @@ spring.cloud.config.discovery.enabled=true
44
spring.cloud.config.username=configUser
55
spring.cloud.config.password=configPassword
66

7-
eureka.client.serviceUrl.defaultZone=http://discUser:discPassword@localhost:8082/eureka/
8-
9-
management.security.sessions=always
10-
11-
zuul.routes.resource.path=/resource/**
12-
zuul.routes.resource.sensitive-headers=Set-Cookie,Authorization
13-
zuul.routes.resource.retryable=true
14-
hystrix.command.resource.execution.isolation.thread.timeoutInMilliseconds=600000
15-
16-
logging.level.org.springframework.web.=debug
17-
logging.level.org.springframework.security=debug
18-
logging.level.org.springframework.cloud.netflix.zuul=debug
7+
eureka.client.serviceUrl.defaultZone=http://discUser:discPassword@localhost:8082/eureka/

0 commit comments

Comments
 (0)