Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #3551 and optimize ldap samples #3561

Merged
merged 1 commit into from
Feb 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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