2008-11-26 32 views
3

我想創建一個WLST腳本來創建我的Weblogic域。不過,我在添加LDAP配置時遇到問題。可以使用WLST Offline將NovellAuthenticators(LDAP)添加到Weblogic中嗎?

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 

這是否配置有可在線?還有其他的解決方法嗎?

回答

1

從我發現的情況來看,此配置必須使用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") 
0

我永遠在線使用,但WLST脫機版將附帶WebLogic安全提供商合作,而不是與自定義提供。當然,NovelAuthenticator自帶了WebLogic,所以它應該可以工作。

嘗試

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