【问题标题】:How to integrate AWS ECS with Okta如何将 AWS ECS 与 Okta 集成
【发布时间】: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


    【解决方案1】:

    通过在负载均衡器上启用粘性解决了这个问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-29
      • 2016-09-04
      • 2020-11-15
      • 2020-12-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多