NovellAuthenticators (LDAP) peut-il être ajouté à Weblogic à l’aide de WLST Offline?

StackOverflow https://stackoverflow.com/questions/320355

  •  11-07-2019
  •  | 
  •  

Question

J'aimerais créer un script WLST pour créer mon domaine Weblogic. Cependant, je ne parviens pas à ajouter la configuration LDAP.

cd("/SecurityConfiguration/myDomain")
cmo.createRealm("myrealm")

cd("/SecurityConfiguration/myDomain/Realms/myrealm")
cmo.createAuthenticationProvider("myLDAP", "weblogic.security.providers.authentication.NovellAuthenticator")

Cela échoue actuellement car je ne semble pas avoir d'objet SecurityConfiguration

No SecurityConfiguration object with name myDomain

Cette configuration doit-elle être effectuée en ligne? Y a-t-il d'autres solutions?

Était-ce utile?

La solution

D'après ce que j'ai découvert, cette configuration doit être effectuée à l'aide de WLST Online.

Le script que j'ai créé ressemble à ceci

connect("username", "password", "t3://ip:port");

edit()
startEdit()

create_AuthenticationProvider_54("/SecurityConfiguration/myDomain/Realms/myrealm", "value")
cd("/SecurityConfiguration/myDomain/Realms/myrealm")
cmo.createAuthenticationProvider("myLDAP", "weblogic.security.providers.authentication.NovellAuthenticator")

cd("/SecurityConfiguration/myDomain/Realms/myrealm/AuthenticationProviders/myLDAP")
set("GroupBaseDN", "value")
set("UserNameAttribute", "value")
set("StaticGroupObjectClass", "value")
set("UserBaseDN", "value")
set("UserObjectClass", "value")
set("AllGroupsFilter", "value")
set("Principal", "value")
set("UseRetrievedUserNameAsPrincipal", "value")
set("Host", "value")
set("StaticGroupDNsfromMemberDNFilter", "value")
set("StaticMemberDNAttribute", "value")
set("ControlFlag", "value")
set("UserFromNameFilter", "value")
set("Credential", "value")
set("GroupFromNameFilter", "value")

startEdit()
save()
activate(block="true")

Autres conseils

J'utilise toujours en ligne, mais WLST hors connexion fonctionnera avec les fournisseurs de sécurité fournis avec WebLogic, mais pas avec les fournisseurs personnalisés. Bien entendu, NovelAuthenticator est fourni avec WebLogic et devrait donc fonctionner.

Essayez

realm = cmo.getSecurityConfiguration().getDefaultRealm()
myProvider = realm.createAuthenticationProvider("weblogic.security.providers.authentication.NovellAuthenticator")
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top