使用OpenAM SDK更改數據存儲區配置時,除密碼之外的任何操作都可以正常運行。即使我給出相關屬性「sun-idrepo-ldapv3-config-authpw」,密碼也會重置爲空字符串。我嘗試了很多情況:從屬性中刪除字段,並給出一組字符串。他們都沒有讓我的密碼完好無損!從OpenAM SDK更改LDAP數據存儲區配置
這裏是我的代碼部分:
fun setDataStoreConfig(realmName: String, storeName: String, newAttrs: Map<*,*>) {
val srvConf = ServiceConfigManager(IdConstants.REPO_SERVICE, getUserSSOToken())
val orgConf = srvConf.getOrganizationConfig(realmName, null)
val subConf = orgConf.getSubConfig(storeName)
val attrs = subConf.attributes
attrs.putAll(newAttrs)
attrs["sun-idrepo-ldapv3-config-authpw"]=setOf("*********")
subConf.attributes = attrs
}
顯然,將這些信息保存到目錄服務時,會添加一些鹽!我不確定這些鹽是由OpenAM還是OpenDJ本身添加的!請幫幫我! – Kamyar