#
# Copyright 2024 Apollo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ldap sample for apache ds, need to rename this file to application-ldap.yml to make it effective
spring:
  ldap:
    base: "dc=example,dc=com"
    username: "uid=admin,ou=system" # 配置管理员账号，用于搜索、匹配用户
    password: "password"
    search-filter: "(uid={0})"  # 用户过滤器，登录的时候用这个过滤器来搜索用户
    urls:
    - "ldap://localhost:10389"

ldap:
  mapping: # 配置 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
#    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
