首页 > 解决方案 > 如何将 springboot 应用程序与 AWS 云上的 Active Directory 集成?

问题描述

https://medium.com/@viraj.rajaguru/how-to-use-spring-security-to-authenticate-with-microsoft-active-directory-1caff11c57f2

我发现这篇文章显示了将 springboot 与 AD 集成的以下代码示例。

 @Configuration
  @Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)
  protected static class SecurityConfiguration extends WebSecurityConfigurerAdapter {
    @Override
    protected void configure(HttpSecurity http) throws Exception {
      http
        .httpBasic().and()
        .logout().and()
        .authorizeRequests()
        .antMatchers("/index.html", "/", "/home", "/login", "/assets/**").permitAll()
        .anyRequest().authenticated()
        .and()
        .csrf()
        .csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse());
    }

    @Bean
    public ActiveDirectoryLdapAuthenticationProvider activeDirectoryLdapAuthenticationProvider() {
      ActiveDirectoryLdapAuthenticationProvider activeDirectoryLdapAuthenticationProvider = new
        ActiveDirectoryLdapAuthenticationProvider("pizzashop.com.us", "ldap://10.100.100.100:389/");
      return activeDirectoryLdapAuthenticationProvider;
    }
  }

我在 AWS 中部署了一个 springboot 应用程序。我需要将此应用程序与 AD 集成。

不过,我对此有几个问题。

AD 如何在 AWS 上部署?它是 AWS 服务吗?上面显示的代码示例 - 即使它在 AWS 云上,它是否有助于(springboot 应用程序的)AD 集成?

任何进一步的输入或代码示例都会对我有所帮助。

标签: amazon-web-servicesspring-bootactive-directory

解决方案


推荐阅读