Skip to content

Commit

Permalink
fix #3551 and optimize ldap samples
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodyiam committed Feb 21, 2021
1 parent 8285504 commit 4f4f20d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ ldap:
loginId: "sAMAccountName" # ldap 用户惟一 id,用来作为登录的 id
userDisplayName: "cn" # ldap 用户名,用来作为显示名
email: "userPrincipalName" # ldap 邮箱属性
filter: # 可选项,配置过滤,目前只支持 memberOf
memberOf: "CN=ServiceDEV,OU=test,DC=example,DC=com|CN=WebDEV,OU=test,DC=example,DC=com" # 只允许 memberOf 属性为 ServiceDEV 和 WebDEV 的用户访问
# filter: # 可选项,配置过滤,目前只支持 memberOf
# memberOf: "CN=ServiceDEV,OU=test,DC=example,DC=com|CN=WebDEV,OU=test,DC=example,DC=com" # 只允许 memberOf 属性为 ServiceDEV 和 WebDEV 的用户访问
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ ldap:
rdnKey: "cn" # ldap rdn key,可选项,如需启用group search需要配置
userDisplayName: "displayName" # ldap 用户名,用来作为显示名
email: "mail" # ldap 邮箱属性
group: # 配置ldap group,可选配置,启用后只有特定group的用户可以登录apollo
objectClass: "groupOfNames" # 配置groupClassName
groupBase: "ou=group" # group search base
groupSearch: "(&(cn=dev))" # group filter
groupMembership: "member" # group memberShip eg. member or memberUid
# group: # 配置ldap group,可选配置,启用后只有特定group的用户可以登录apollo
# objectClass: "groupOfNames" # 配置groupClassName
# groupBase: "ou=group" # group search base
# groupSearch: "(&(cn=dev))" # group filter
# groupMembership: "member" # group memberShip eg. member or memberUid
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ ldap:
rdnKey: "uid" # ldap rdn key,可选项,如需启用group search需要配置
userDisplayName: "cn" # ldap 用户名,用来作为显示名
email: "mail" # ldap 邮箱属性
group: # 启用group search,可选配置,启用后只有特定group的用户可以登录apollo
objectClass: "posixGroup" # 配置groupClassName
groupBase: "ou=group" # group search base
groupSearch: "(&(cn=dev))" # group filter
groupMembership: "memberUid" # group memberShip eg. member or memberUid
# group: # 启用group search,可选配置,启用后只有特定group的用户可以登录apollo
# objectClass: "posixGroup" # 配置groupClassName
# groupBase: "ou=group" # group search base
# groupSearch: "(&(cn=dev))" # group filter
# groupMembership: "memberUid" # group memberShip eg. member or memberUid
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
import com.ctrip.framework.apollo.openapi.PortalOpenApiConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableAspectJAutoProxy
@Configuration
@EnableAutoConfiguration
@EnableAutoConfiguration(exclude = {LdapAutoConfiguration.class})
@EnableTransactionManagement
@ComponentScan(basePackageClasses = {ApolloCommonConfig.class,
PortalApplication.class, PortalOpenApiConfig.class})
Expand Down

0 comments on commit 4f4f20d

Please sign in to comment.