Kamyar
Kamyar

Reputation: 2694

Changing LDAP datastore config from OpenAM SDK

When changing datastore configuration using OpenAM SDK, anything works well except the password. The password resets to empty string, even if I give the related attributes "sun-idrepo-ldapv3-config-authpw". I tried many cases: removing the field from attributes, and giving a 'set' of strings. none of them made my password intact!

Here is part of my code:

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
}

Upvotes: 0

Views: 129

Answers (1)

Peter Major
Peter Major

Reputation: 2995

The ClientSDK and the OpenAM server must use the same encryption key (am.encryption.pwd property in AMConfig.properties on the ClientSDK side).

Please keep in mind that the ClientSDK is deprecated and its usage in new deployments is strongly discouraged.

Upvotes: 1

Related Questions