我想创建一个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在线完成。

我已经创建的脚本看起来像这样

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")

其他提示

我永远在线使用,但WLST脱机版将附带WebLogic安全提供商合作,而不是与自定义提供。当然,NovelAuthenticator自带WebLogic中,所以它应该工作。

尝试

realm = cmo.getSecurityConfiguration().getDefaultRealm()
myProvider = realm.createAuthenticationProvider("weblogic.security.providers.authentication.NovellAuthenticator")
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top