我想创建一个wlst脚本来创建我的weblogic域。但是我在添加ldap配置时遇到问题。
cd("/SecurityConfiguration/myDomain")
cmo.createRealm("myrealm")
cd("/SecurityConfiguration/myDomain/Realms/myrealm")
cmo.createAuthenticationProvider("myLDAP", "weblogic.security.providers.authentication.NovellAuthenticator")
当前失败,因为此时我似乎没有securityconfiguration对象
No SecurityConfiguration object with name myDomain
此配置必须在线完成吗?还有别的办法吗?
最佳答案
根据我的发现,这个配置必须使用wlst online完成。
我创建的脚本看起来像这样
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")