升级完成后利用资源中心报错 IllegalArgumentException: Failed to specify server's Kerberos principal name
资源中心利用的HDFS,开启了kerberos认证 解决方法:
编辑 dolphinscheduler/api-server/conf/hdfs-site.xml 添加以下内容
# IF you set type `LDAP`, below config will be effective
ldap:
# ldap server config
urls: xxx
base-dn: xxx
username: xxx
password: xxx
user:
# admin userId when you use LDAP login
admin: xxx
identity-attribute: xxx
email-attribute: xxx
# action when ldap user is not exist (supported types: CREATE,DENY)
not-exist-action: CREATE
复制代码
要成功接入LDAP至少需要urls,base-dn,username,password,identity和email正确填写,不知道email字段名可以按下面的方式处置惩罚,email先空着
启动服务后用LDAP用户登录 解决办法:
LDAP 认证的代码在 dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/ldap/LdapService.java 的 ldapLogin()
[code]ctx = new InitialLdapContext(searchEnv, null);SearchControls sc = new SearchControls();sc.setReturningAttributes(new String[]{ldapEmailAttribute});sc.setSearchScope(SearchControls.SUBTREE_SCOPE);EqualsFilter filter = new EqualsFilter(ldapUserIdentifyingAttribute, userId);NamingEnumeration results = ctx.search(ldapBaseDn, filter.toString(), sc);if (results.hasMore()) { // get the users DN (distinguishedName) from the result SearchResult result = results.next(); NamingEnumeration