@Configuration @ConditionalOnProperty(value="spring.cloud.gcp.security.iap.enabled") @ConditionalOnClass(value=<error>) @AutoConfigureBefore(value=org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration.class) @EnableConfigurationProperties(value=IapAuthenticationProperties.class) public class IapAuthenticationAutoConfiguration extends Object
The following conditions must be present for this configuration to take effect:
spring.cloud.gcp.security.iap.enabled property is true. Note that a missing property is treated as
false. Because there is no custom code beyond what Spring Security OAuth provides, no dependency can be
used as a consistent signal for using IAP authentication, making an explicit property necessary.
If these conditions are met, a custom BearerTokenResolver and an ES256 web registry-based JWT token
decoder beans are provided.
If a custom WebSecurityConfigurerAdapter is present, it must add .oauth2ResourceServer().jwt()
customization to org.springframework.security.config.annotation.web.builders.HttpSecurity object. If no
custom WebSecurityConfigurerAdapter is found,
Spring Boot's default OAuth2ResourceServerWebSecurityConfiguration will add this customization.
| Constructor and Description |
|---|
IapAuthenticationAutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
JwtDecoder |
iapJwtDecoder(IapAuthenticationProperties properties) |
BearerTokenResolver |
iatTokenResolver(IapAuthenticationProperties properties) |
@Bean @ConditionalOnMissingBean public JwtDecoder iapJwtDecoder(IapAuthenticationProperties properties)
@Bean @ConditionalOnMissingBean public BearerTokenResolver iatTokenResolver(IapAuthenticationProperties properties)
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.