【发布时间】:2023-03-18 13:14:01
【问题描述】:
我在 ECS 中部署了一个 Spring Boot 应用程序,我正在尝试将 Okta 与 AWS ECS 集成。我有 2 个ECS tasks,因此 Okta 验证失败并显示“无效凭据”。 ECS 任务数为 1 时有效。
我在属性文件中指定了这些参数: okta.oauth2.issuer、okta.oauth2.clientId、okta.oauth2.clientSecret、okta.oauth2.scopes、spring.security.oauth2.client.registration.okta.redirect-uri
下面是WebSecurityConfiguration:
@Profile({"qual", "cert", "prod"})
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/health")
.permitAll()
.anyRequest()
.authenticated()
.and().oauth2Client()
.and().oauth2Login();
}
}
我希望我的用户能够通过 Okta 成功重定向到应用程序。
【问题讨论】:
标签: authorization integration saml amazon-ecs okta