3

I would like to create a WLST script to create my Weblogic domain. However I'm having problems adding the LDAP config.

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

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

This is currently failing because at this point I don't seem to have a SecurityConfiguration object

No SecurityConfiguration object with name myDomain

Does this configuration have to be done online? Are there any other work arounds?

2 Answers 2

1

From what I've found, this configuration has to be done using WLST Online.

The script I have created looks something like this

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")
Sign up to request clarification or add additional context in comments.

Comments

0

I always use online, but WLST offline will work with security providers that come with WebLogic, but not with custom providers. Of course, the NovelAuthenticator comes with WebLogic, so it should work.

Try

realm = cmo.getSecurityConfiguration().getDefaultRealm()
myProvider = realm.createAuthenticationProvider("weblogic.security.providers.authentication.NovellAuthenticator")

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.