From d8861641867b2c4ad1f3f8ae4420d6bce02ca64d Mon Sep 17 00:00:00 2001 From: yangzl Date: Sun, 27 Oct 2024 20:10:01 +0800 Subject: [PATCH] refactor: Configuration files uniformly use Kebab style (#5262) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: Configuration files uniformly use Kebab style * fix: misspelling * fix:add CHANGES.md --- CHANGES.md | 1 + .../application-database-discovery.properties | 2 +- .../src/main/resources/application.yml | 6 +- .../src/test/resources/application.yml | 4 +- .../application-database-discovery.properties | 4 +- .../src/main/resources/application.yml | 12 ++-- .../application-database-discovery.properties | 4 +- .../src/main/resources/application.yml | 12 ++-- .../src/test/resources/application.yml | 4 +- ...pplication-ldap-activedirectory-sample.yml | 8 +-- .../application-ldap-apacheds-sample.yml | 18 +++--- .../application-ldap-openldap-sample.yml | 18 +++--- docs/en/client/java-sdk-user-guide.md | 10 +-- .../distributed-deployment-guide.md | 8 +-- ...al-how-to-implement-user-login-function.md | 64 +++++++++---------- docs/zh/client/java-sdk-user-guide.md | 10 +-- .../distributed-deployment-guide.md | 8 +-- ...al-how-to-implement-user-login-function.md | 64 +++++++++---------- 18 files changed, 129 insertions(+), 128 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 81d5936d2bf..8dc0dea8d05 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,7 @@ Apollo 2.4.0 * [Feature add limit for items count per namespace](https://github.com/apolloconfig/apollo/pull/5227) * [Feature: Add ConfigService cache record stats function](https://github.com/apolloconfig/apollo/pull/5247) * [RefreshAdminServerAddressTask supports dynamic configuration of time interval](https://github.com/apolloconfig/apollo/pull/5248) +* [Refactor: Configuration files uniformly use Kebab style](https://github.com/apolloconfig/apollo/pull/5262) ------------------ All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/15?closed=1) diff --git a/apollo-adminservice/src/main/resources/application-database-discovery.properties b/apollo-adminservice/src/main/resources/application-database-discovery.properties index 5f5324acef8..e0c37241d53 100644 --- a/apollo-adminservice/src/main/resources/application-database-discovery.properties +++ b/apollo-adminservice/src/main/resources/application-database-discovery.properties @@ -18,5 +18,5 @@ spring.cloud.discovery.enabled=false apollo.service.registry.enabled=true apollo.service.registry.cluster=default -apollo.service.registry.heartbeatIntervalInSecond=10 +apollo.service.registry.heartbeat-interval-in-second=10 diff --git a/apollo-adminservice/src/main/resources/application.yml b/apollo-adminservice/src/main/resources/application.yml index fde29be9b44..e1b1595c351 100644 --- a/apollo-adminservice/src/main/resources/application.yml +++ b/apollo-adminservice/src/main/resources/application.yml @@ -38,17 +38,17 @@ logging: eureka: instance: hostname: ${hostname:localhost} - preferIpAddress: true + prefer-ip-address: true status-page-url-path: /info health-check-url-path: /health client: - serviceUrl: + service-url: # This setting will be overridden by eureka.service.url setting from ApolloConfigDB.ServerConfig or System Property # see com.ctrip.framework.apollo.biz.eureka.ApolloEurekaClientConfig defaultZone: http://${eureka.instance.hostname}:8080/eureka/ healthcheck: enabled: true - eurekaServiceUrlPollIntervalSeconds: 60 + eureka-service-url-poll-interval-seconds: 60 management: health: diff --git a/apollo-adminservice/src/test/resources/application.yml b/apollo-adminservice/src/test/resources/application.yml index 73b9a647ce6..d1f2e0bd8e9 100644 --- a/apollo-adminservice/src/test/resources/application.yml +++ b/apollo-adminservice/src/test/resources/application.yml @@ -23,11 +23,11 @@ server: eureka: instance: hostname: ${hostname:localhost} - preferIpAddress: true + prefer-ip-address: true status-page-url-path: /info health-check-url-path: /health client: - serviceUrl: + service-url: defaultZone: http://${eureka.instance.hostname}:8090/eureka/ healthcheck: enabled: true diff --git a/apollo-assembly/src/main/resources/application-database-discovery.properties b/apollo-assembly/src/main/resources/application-database-discovery.properties index dcdb6f1ab62..ae0ba072030 100644 --- a/apollo-assembly/src/main/resources/application-database-discovery.properties +++ b/apollo-assembly/src/main/resources/application-database-discovery.properties @@ -19,8 +19,8 @@ spring.cloud.discovery.enabled=false apollo.service.registry.enabled=true apollo.service.registry.cluster=default -apollo.service.registry.heartbeatIntervalInSecond=10 +apollo.service.registry.heartbeat-interval-in-second=10 apollo.service.discovery.enabled=true # health check by heartbeat, heartbeat time before 61s ago will be seemed as unhealthy -apollo.service.discovery.healthCheckIntervalInSecond = 61 +apollo.service.discovery.health-check-interval-in-second = 61 diff --git a/apollo-assembly/src/main/resources/application.yml b/apollo-assembly/src/main/resources/application.yml index ec41aca538a..e25af6fde1b 100644 --- a/apollo-assembly/src/main/resources/application.yml +++ b/apollo-assembly/src/main/resources/application.yml @@ -42,22 +42,22 @@ management: eureka: instance: hostname: ${hostname:localhost} - preferIpAddress: true + prefer-ip-address: true status-page-url-path: /info health-check-url-path: /health server: - peerEurekaNodesUpdateIntervalMs: 60000 - enableSelfPreservation: false + peer-eureka-nodes-update-interval-ms: 60000 + enable-self-preservation: false client: - serviceUrl: + service-url: # This setting will be overridden by eureka.service.url setting from ApolloConfigDB.ServerConfig or System Property # see com.ctrip.framework.apollo.biz.eureka.ApolloEurekaClientConfig defaultZone: http://${eureka.instance.hostname}:8080/eureka/ healthcheck: enabled: true - eurekaServiceUrlPollIntervalSeconds: 60 + eureka-service-url-poll-interval-seconds: 60 fetch-registry: false - registerWithEureka: false + register-with-eureka: false server: compression: diff --git a/apollo-configservice/src/main/resources/application-database-discovery.properties b/apollo-configservice/src/main/resources/application-database-discovery.properties index dcdb6f1ab62..ae0ba072030 100644 --- a/apollo-configservice/src/main/resources/application-database-discovery.properties +++ b/apollo-configservice/src/main/resources/application-database-discovery.properties @@ -19,8 +19,8 @@ spring.cloud.discovery.enabled=false apollo.service.registry.enabled=true apollo.service.registry.cluster=default -apollo.service.registry.heartbeatIntervalInSecond=10 +apollo.service.registry.heartbeat-interval-in-second=10 apollo.service.discovery.enabled=true # health check by heartbeat, heartbeat time before 61s ago will be seemed as unhealthy -apollo.service.discovery.healthCheckIntervalInSecond = 61 +apollo.service.discovery.health-check-interval-in-second = 61 diff --git a/apollo-configservice/src/main/resources/application.yml b/apollo-configservice/src/main/resources/application.yml index 357feec362e..986a8b91f38 100644 --- a/apollo-configservice/src/main/resources/application.yml +++ b/apollo-configservice/src/main/resources/application.yml @@ -38,22 +38,22 @@ logging: eureka: instance: hostname: ${hostname:localhost} - preferIpAddress: true + prefer-ip-address: true status-page-url-path: /info health-check-url-path: /health server: - peerEurekaNodesUpdateIntervalMs: 60000 - enableSelfPreservation: false + peer-eureka-nodes-update-interval-ms: 60000 + enable-self-preservation: false client: - serviceUrl: + service-url: # This setting will be overridden by eureka.service.url setting from ApolloConfigDB.ServerConfig or System Property # see com.ctrip.framework.apollo.biz.eureka.ApolloEurekaClientConfig defaultZone: http://${eureka.instance.hostname}:8080/eureka/ healthcheck: enabled: true - eurekaServiceUrlPollIntervalSeconds: 60 + eureka-service-url-poll-interval-seconds: 60 fetch-registry: false - registerWithEureka: false + register-with-eureka: false management: health: diff --git a/apollo-configservice/src/test/resources/application.yml b/apollo-configservice/src/test/resources/application.yml index b911ad4719e..0e8c9321db5 100644 --- a/apollo-configservice/src/test/resources/application.yml +++ b/apollo-configservice/src/test/resources/application.yml @@ -23,11 +23,11 @@ server: eureka: instance: hostname: ${hostname:localhost} - preferIpAddress: true + prefer-ip-address: true status-page-url-path: /info health-check-url-path: /health client: - serviceUrl: + service-url: defaultZone: http://${eureka.instance.hostname}:8080/eureka/ healthcheck: enabled: true diff --git a/apollo-portal/src/main/resources/application-ldap-activedirectory-sample.yml b/apollo-portal/src/main/resources/application-ldap-activedirectory-sample.yml index 797366b7315..32bb833ae74 100644 --- a/apollo-portal/src/main/resources/application-ldap-activedirectory-sample.yml +++ b/apollo-portal/src/main/resources/application-ldap-activedirectory-sample.yml @@ -19,15 +19,15 @@ spring: base: "dc=example,dc=com" username: "admin" # 配置管理员账号,用于搜索、匹配用户 password: "password" - searchFilter: "(sAMAccountName={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 + search-filter: "(sAMAccountName={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 urls: - "ldap://1.1.1.1:389" ldap: mapping: # 配置 ldap 属性 - objectClass: "user" # ldap 用户 objectClass 配置 - loginId: "sAMAccountName" # ldap 用户惟一 id,用来作为登录的 id - userDisplayName: "cn" # ldap 用户名,用来作为显示名 + object-class: "user" # ldap 用户 objectClass 配置 + login-id: "sAMAccountName" # ldap 用户惟一 id,用来作为登录的 id + user-display-name: "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 的用户访问 diff --git a/apollo-portal/src/main/resources/application-ldap-apacheds-sample.yml b/apollo-portal/src/main/resources/application-ldap-apacheds-sample.yml index 6d92be468f3..b02c21fc38b 100644 --- a/apollo-portal/src/main/resources/application-ldap-apacheds-sample.yml +++ b/apollo-portal/src/main/resources/application-ldap-apacheds-sample.yml @@ -19,19 +19,19 @@ spring: base: "dc=example,dc=com" username: "uid=admin,ou=system" # 配置管理员账号,用于搜索、匹配用户 password: "password" - searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 + search-filter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 urls: - "ldap://localhost:10389" ldap: mapping: # 配置 ldap 属性 - objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置 - loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id - rdnKey: "cn" # ldap rdn key,可选项,如需启用group search需要配置 - userDisplayName: "displayName" # ldap 用户名,用来作为显示名 + object-class: "inetOrgPerson" # ldap 用户 objectClass 配置 + login-id: "uid" # ldap 用户惟一 id,用来作为登录的 id + rdn-key: "cn" # ldap rdn key,可选项,如需启用group search需要配置 + user-display-name: "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 +# object-class: "groupOfNames" # 配置groupClassName +# group-base: "ou=group" # group search base +# group-search: "(&(cn=dev))" # group filter +# group-membership: "member" # group memberShip eg. member or memberUid diff --git a/apollo-portal/src/main/resources/application-ldap-openldap-sample.yml b/apollo-portal/src/main/resources/application-ldap-openldap-sample.yml index cfb3e32bde6..31a9d2cbb2c 100644 --- a/apollo-portal/src/main/resources/application-ldap-openldap-sample.yml +++ b/apollo-portal/src/main/resources/application-ldap-openldap-sample.yml @@ -19,19 +19,19 @@ spring: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" # 配置管理员账号,用于搜索、匹配用户 password: "password" - searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 + search-filter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 urls: - "ldap://localhost:389" ldap: mapping: # 配置 ldap 属性 - objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置 - loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id - rdnKey: "uid" # ldap rdn key,可选项,如需启用group search需要配置 - userDisplayName: "cn" # ldap 用户名,用来作为显示名 + object-class: "inetOrgPerson" # ldap 用户 objectClass 配置 + login-id: "uid" # ldap 用户惟一 id,用来作为登录的 id + rdn-key: "uid" # ldap rdn key,可选项,如需启用group search需要配置 + user-display-name: "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 +# object-class: "posixGroup" # 配置groupClassName +# group-base: "ou=group" # group search base +# group-search: "(&(cn=dev))" # group filter +# group-membership: "memberUid" # group memberShip eg. member or memberUid diff --git a/docs/en/client/java-sdk-user-guide.md b/docs/en/client/java-sdk-user-guide.md index 2f2d887ef77..8eae4a9b848 100644 --- a/docs/en/client/java-sdk-user-guide.md +++ b/docs/en/client/java-sdk-user-guide.md @@ -1105,13 +1105,13 @@ server.port = 8080 logging.level = ERROR -eureka.client.serviceUrl.defaultZone = http://127.0.0.1:8761/eureka/ +eureka.client.service-url.defaultZone = http://127.0.0.1:8761/eureka/ eureka.client.healthcheck.enabled=true -eureka.client.registerWithEureka = true -eureka.client.fetchRegistry = true -eureka.client.eurekaServiceUrlPollIntervalSeconds = 60 +eureka.client.register-with-eureka = true +eureka.client.fetch-registry = true +eureka.client.eureka-service-url-poll-interval-seconds = 60 -eureka.instance.preferIpAddress = true +eureka.instance.prefer-ip-address = true ``` ![text-mode-spring-boot-config-sample](https://cdn.jsdelivr.net/gh/apolloconfig/apollo@master/doc/images/text-mode-spring-boot-config-sample.png ) diff --git a/docs/en/deployment/distributed-deployment-guide.md b/docs/en/deployment/distributed-deployment-guide.md index ff820d62869..2331ac68d2f 100644 --- a/docs/en/deployment/distributed-deployment-guide.md +++ b/docs/en/deployment/distributed-deployment-guide.md @@ -1302,14 +1302,14 @@ config: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" password: "password" - searchFilter: "(uid={0})" + search-filter: "(uid={0})" urls: - "ldap://xxx.somedomain.com:389" ldap: mapping: - objectClass: "inetOrgPerson" - loginId: "uid" - userDisplayName: "cn" + object-class: "inetOrgPerson" + login-id: "uid" + user-display-name: "cn" email: "mail" ``` diff --git a/docs/en/extension/portal-how-to-implement-user-login-function.md b/docs/en/extension/portal-how-to-implement-user-login-function.md index 13610b4ea9b..258c622dc4f 100644 --- a/docs/en/extension/portal-how-to-implement-user-login-function.md +++ b/docs/en/extension/portal-how-to-implement-user-login-function.md @@ -48,15 +48,15 @@ spring: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" # Configure administrator account for searching and matching users password: "password" - searchFilter: "(uid={0})" # user filter, use this filter to search for users when logging in + search-filter: "(uid={0})" # user filter, use this filter to search for users when logging in urls: - "ldap://localhost:389" ldap: mapping: # Configure the ldap attribute - objectClass: "inetOrgPerson" # ldap user objectClass configuration - loginId: "uid" # ldap user unique id, used as the login id - userDisplayName: "cn" # ldap user name, used as display name + object-class: "inetOrgPerson" # ldap user objectClass configuration + login-id: "uid" # ldap user unique id, used as the login id + user-display-name: "cn" # ldap user name, used as display name email: "mail" # ldap mailbox attribute ``` @@ -70,15 +70,15 @@ spring: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" # Configure admin account for searching and matching users password: "password" - searchFilter: "(uid={0})" # user filter, use this filter to search for users when logging in + search-filter: "(uid={0})" # user filter, use this filter to search for users when logging in urls: - "ldap://localhost:389" ldap: mapping: # Configure the ldap attribute - objectClass: "inetOrgPerson" # ldap user objectClass configuration - loginId: "uid" # ldap user unique id, used as the login id - userDisplayName: "cn" # ldap user name, used as display name + object-class: "inetOrgPerson" # ldap user objectClass configuration + login-id: "uid" # ldap user unique id, used as the login id + user-display-name: "cn" # ldap user name, used as display name email: "mail" # ldap mailbox attribute filter: # Configuration filter, currently only memberOf is supported memberOf: "cn=ServiceDEV,ou=DEV,dc=example,dc=org|cn=WebDEV,ou=DEV,dc=example,dc=org" # Only allow users with memberOf attribute of ServiceDEV and WebDEV to access @@ -94,22 +94,22 @@ spring: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" # Configure admin account for searching and matching users password: "password" - searchFilter: "(uid={0})" # user filter, use this filter to search for users when logging in + search-filter: "(uid={0})" # user filter, use this filter to search for users when logging in urls: - "ldap://localhost:389" ldap: mapping: # Configure the ldap attribute - objectClass: "inetOrgPerson" # ldap user objectClass configuration - loginId: "uid" # ldap user unique id, used as login id + object-class: "inetOrgPerson" # ldap user objectClass configuration + login-id: "uid" # ldap user unique id, used as login id rdnKey: "uid" # ldap rdn key - userDisplayName: "cn" # ldap user name, used as display name + user-display-name: "cn" # ldap user name, used as display name email: "mail" # ldap mailbox attribute group: # enable group search, only users of a specific group can login to apollo after enabling - objectClass: "posixGroup" # Configure groupClassName - groupBase: "ou=group" # group search base - groupSearch: "(&(cn=dev))" # group filter - groupMembership: "memberUid" # group memberShip eg. member or memberUid + object-class: "posixGroup" # Configure groupClassName + group-base: "ou=group" # group search base + group-search: "(&(cn=dev))" # group filter + group-membership: "memberUid" # group memberShip eg. member or memberUid ``` #### 1.2 Configure `startup.sh` @@ -138,15 +138,15 @@ spring: base: "dc=example,dc=com" username: "admin" # Configure administrator account for searching and matching users password: "password" - searchFilter: "(sAMAccountName={0})" # user filter, use this filter to search for users when logging in + search-filter: "(sAMAccountName={0})" # user filter, use this filter to search for users when logging in urls: - "ldap://1.1.1.1:389" ldap: mapping: # Configure the ldap attribute - objectClass: "user" # ldap user objectClass configuration - loginId: "sAMAccountName" # the unique id of the ldap user, used as the login id - userDisplayName: "cn" # ldap user name, used as display name + object-class: "user" # ldap user objectClass configuration + login-id: "sAMAccountName" # the unique id of the ldap user, used as the login id + user-display-name: "cn" # ldap user name, used as display name email: "userPrincipalName" # ldap mailbox attribute filter: # optional, configure filter, currently only support memberOf memberOf: "CN=ServiceDEV,OU=test,DC=example,DC=com|CN=WebDEV,OU=test,DC=example,DC=com" # Only allow users with memberOf attribute of ServiceDEV and WebDEV to access @@ -178,15 +178,15 @@ spring: base: "dc=example,dc=com" username: "uid=admin,ou=system" # Configure administrator account for searching and matching users password: "password" - searchFilter: "(uid={0})" # user filter, use this filter to search for users when logging in + search-filter: "(uid={0})" # user filter, use this filter to search for users when logging in urls: - "ldap://localhost:10389" ldap: mapping: # Configure the ldap attribute - objectClass: "inetOrgPerson" # ldap user objectClass configuration - loginId: "uid" # ldap user unique id, used as the login id - userDisplayName: "displayName" # ldap user name, used as display name + object-class: "inetOrgPerson" # ldap user objectClass configuration + login-id: "uid" # ldap user unique id, used as the login id + user-display-name: "displayName" # ldap user name, used as display name email: "mail" # ldap mailbox attribute ``` @@ -200,22 +200,22 @@ spring: base: "dc=example,dc=com" username: "uid=admin,ou=system" # Configure admin account for searching and matching users password: "password" - searchFilter: "(uid={0})" # user filter, use this filter to search for users when logging in + search-filter: "(uid={0})" # user filter, use this filter to search for users when logging in urls: - "ldap://localhost:10389" ldap: mapping: # Configure the ldap attribute - objectClass: "inetOrgPerson" # ldap user objectClass configuration - loginId: "uid" # ldap user unique id, used as the login id + object-class: "inetOrgPerson" # ldap user objectClass configuration + login-id: "uid" # ldap user unique id, used as the login id rdnKey: "cn" # ldap rdn key - userDisplayName: "displayName" # ldap user name, used as display name + user-display-name: "displayName" # ldap user name, used as display name email: "mail" # ldap mailbox attribute group: # Configure ldap group, only users of specific group can login apollo after enabled - objectClass: "groupOfNames" # Configure groupClassName - groupBase: "ou=group" # group search base - groupSearch: "(&(cn=dev))" # group filter - groupMembership: "member" # group memberShip eg. member or memberUid + object-class: "groupOfNames" # Configure groupClassName + group-base: "ou=group" # group search base + group-search: "(&(cn=dev))" # group filter + group-membership: "member" # group memberShip eg. member or memberUid ``` #### 3.2 Configuring `startup.sh` diff --git a/docs/zh/client/java-sdk-user-guide.md b/docs/zh/client/java-sdk-user-guide.md index 4250c2bdb9b..db9c405d0b8 100644 --- a/docs/zh/client/java-sdk-user-guide.md +++ b/docs/zh/client/java-sdk-user-guide.md @@ -1051,13 +1051,13 @@ server.port = 8080 logging.level = ERROR -eureka.client.serviceUrl.defaultZone = http://127.0.0.1:8761/eureka/ +eureka.client.service-url.defaultZone = http://127.0.0.1:8761/eureka/ eureka.client.healthcheck.enabled = true -eureka.client.registerWithEureka = true -eureka.client.fetchRegistry = true -eureka.client.eurekaServiceUrlPollIntervalSeconds = 60 +eureka.client.register-with-eureka = true +eureka.client.fetch-registry = true +eureka.client.eureka-service-url-poll-interval-seconds = 60 -eureka.instance.preferIpAddress = true +eureka.instance.prefer-ip-address = true ``` ![text-mode-spring-boot-config-sample](https://cdn.jsdelivr.net/gh/apolloconfig/apollo@master/doc/images/text-mode-spring-boot-config-sample.png) diff --git a/docs/zh/deployment/distributed-deployment-guide.md b/docs/zh/deployment/distributed-deployment-guide.md index 85779395a0c..0b02d288a21 100644 --- a/docs/zh/deployment/distributed-deployment-guide.md +++ b/docs/zh/deployment/distributed-deployment-guide.md @@ -1251,14 +1251,14 @@ config: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" password: "password" - searchFilter: "(uid={0})" + search-filter: "(uid={0})" urls: - "ldap://xxx.somedomain.com:389" ldap: mapping: - objectClass: "inetOrgPerson" - loginId: "uid" - userDisplayName: "cn" + object-class: "inetOrgPerson" + login-id: "uid" + user-display-name: "cn" email: "mail" ``` diff --git a/docs/zh/extension/portal-how-to-implement-user-login-function.md b/docs/zh/extension/portal-how-to-implement-user-login-function.md index ae8d996517b..da8dbc6c7a8 100644 --- a/docs/zh/extension/portal-how-to-implement-user-login-function.md +++ b/docs/zh/extension/portal-how-to-implement-user-login-function.md @@ -44,15 +44,15 @@ spring: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" # 配置管理员账号,用于搜索、匹配用户 password: "password" - searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 + search-filter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 urls: - "ldap://localhost:389" ldap: mapping: # 配置 ldap 属性 - objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置 - loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id - userDisplayName: "cn" # ldap 用户名,用来作为显示名 + object-class: "inetOrgPerson" # ldap 用户 objectClass 配置 + login-id: "uid" # ldap 用户惟一 id,用来作为登录的 id + user-display-name: "cn" # ldap 用户名,用来作为显示名 email: "mail" # ldap 邮箱属性 ``` @@ -66,15 +66,15 @@ spring: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" # 配置管理员账号,用于搜索、匹配用户 password: "password" - searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 + search-filter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 urls: - "ldap://localhost:389" ldap: mapping: # 配置 ldap 属性 - objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置 - loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id - userDisplayName: "cn" # ldap 用户名,用来作为显示名 + object-class: "inetOrgPerson" # ldap 用户 objectClass 配置 + login-id: "uid" # ldap 用户惟一 id,用来作为登录的 id + user-display-name: "cn" # ldap 用户名,用来作为显示名 email: "mail" # ldap 邮箱属性 filter: # 配置过滤,目前只支持 memberOf memberOf: "cn=ServiceDEV,ou=DEV,dc=example,dc=org|cn=WebDEV,ou=DEV,dc=example,dc=org" # 只允许 memberOf 属性为 ServiceDEV 和 WebDEV 的用户访问 @@ -90,22 +90,22 @@ spring: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" # 配置管理员账号,用于搜索、匹配用户 password: "password" - searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 + search-filter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 urls: - "ldap://localhost:389" ldap: mapping: # 配置 ldap 属性 - objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置 - loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id + object-class: "inetOrgPerson" # ldap 用户 objectClass 配置 + login-id: "uid" # ldap 用户惟一 id,用来作为登录的 id rdnKey: "uid" # ldap rdn key - userDisplayName: "cn" # ldap 用户名,用来作为显示名 + user-display-name: "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 + object-class: "posixGroup" # 配置groupClassName + group-base: "ou=group" # group search base + group-search: "(&(cn=dev))" # group filter + group-membership: "memberUid" # group memberShip eg. member or memberUid ``` #### 1.2 配置`startup.sh` @@ -134,15 +134,15 @@ spring: base: "dc=example,dc=com" username: "admin" # 配置管理员账号,用于搜索、匹配用户 password: "password" - searchFilter: "(sAMAccountName={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 + search-filter: "(sAMAccountName={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 urls: - "ldap://1.1.1.1:389" ldap: mapping: # 配置 ldap 属性 - objectClass: "user" # ldap 用户 objectClass 配置 - loginId: "sAMAccountName" # ldap 用户惟一 id,用来作为登录的 id - userDisplayName: "cn" # ldap 用户名,用来作为显示名 + object-class: "user" # ldap 用户 objectClass 配置 + login-id: "sAMAccountName" # ldap 用户惟一 id,用来作为登录的 id + user-display-name: "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 的用户访问 @@ -174,15 +174,15 @@ spring: base: "dc=example,dc=com" username: "uid=admin,ou=system" # 配置管理员账号,用于搜索、匹配用户 password: "password" - searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 + search-filter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 urls: - "ldap://localhost:10389" ldap: mapping: # 配置 ldap 属性 - objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置 - loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id - userDisplayName: "displayName" # ldap 用户名,用来作为显示名 + object-class: "inetOrgPerson" # ldap 用户 objectClass 配置 + login-id: "uid" # ldap 用户惟一 id,用来作为登录的 id + user-display-name: "displayName" # ldap 用户名,用来作为显示名 email: "mail" # ldap 邮箱属性 ``` @@ -196,22 +196,22 @@ spring: base: "dc=example,dc=com" username: "uid=admin,ou=system" # 配置管理员账号,用于搜索、匹配用户 password: "password" - searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 + search-filter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 urls: - "ldap://localhost:10389" ldap: mapping: # 配置 ldap 属性 - objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置 - loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id + object-class: "inetOrgPerson" # ldap 用户 objectClass 配置 + login-id: "uid" # ldap 用户惟一 id,用来作为登录的 id rdnKey: "cn" # ldap rdn key - userDisplayName: "displayName" # ldap 用户名,用来作为显示名 + user-display-name: "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 + object-class: "groupOfNames" # 配置groupClassName + group-base: "ou=group" # group search base + group-search: "(&(cn=dev))" # group filter + group-membership: "member" # group memberShip eg. member or memberUid ``` #### 3.2 配置`startup.sh`