hongming 你好,我这边ks的版本是:v3.4.0,如下配置了ldap:
authentication:
jwtSecret: ""
maximumClockSkew: 10s
multipleLogin: true
oauthOptions:
accessTokenInactivityTimeout: 30m
accessTokenMaxAge: 1h
identityProviders:
- mappingMethod: auto
name: LDAP
provider:
host: 192.168.1.1:389
loginAttribute: uid
mailAttribute: mail
managerDN: cn=xx,dc=xx,dc=com
managerPassword: xgdasssdf
userSearchBase: dc=xx,dc=com
type: LDAPIdentityProvider
然后请求/kapi得到如下:
{
"issuer": "kubesphere",
"identityProviders": [
{
"name": "LDAP",
"mappingMethod": "auto",
"disableLoginConfirmation": false,
"type": "LDAPIdentityProvider",
"provider": {
"host": "192.168.1.1:389",
"loginAttribute": "uid",
"mailAttribute": "mail",
"managerDN": "cn=xx,dc=xx,dc=com",
"userSearchBase": "dc=xx,dc=com"
}
}
],
"clients": [
{
"name": "kubesphere",
"redirectURIs": [
"\*"
]
}
],
"accessTokenMaxAge": 3600000000000,
"accessTokenInactivityTimeout": 1800000000000
}
结果是:console页面登录用户,一直提示账号密码错误,ks-apiserver无相关日志,console有如下日志:
<– POST /login 2023/10/13T10:38:04.310
{
code: 400,
error: ‘invalid_grant’,
error_description: ‘incorrect password’,
statusText: ‘Bad Request’
}
–> POST /login 200 3ms 81b 2023/10/13T10:38:04.313
想请教,我应该当如何才能正确接入ldap,感谢