Using Canned Policy with Weblogic Server.

SimpleWS.java package demo; import weblogic.jws.WLHttpTransport; import weblogic.jws.Policies; import weblogic.jws.Policy; import javax.jws.WebService; import javax.jws.WebMethod; import javax.jws.soap.SOAPBinding; @WebService(name=”SimpleWSPortType”, serviceName=”SimpleWSService”, targetNamespace=”http://www.oracle.com”) @SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL,

Continue reading

Import and Export users from Embedded LDAP using WLST

Export connect(‘weblogic’,’weblogic’, ‘t3://localhost:8003′) domainRuntime() cd(‘/DomainServices/DomainRuntimeService/DomainConfiguration/DomainA/SecurityConfiguration/DomainA/DefaultRealm/myrealm/AuthenticationProviders/DefaultAuthenticator’) cmo.exportData(‘DefaultAtn’,’c:/export.ldif’, Properties()) Import connect(‘weblogic’,’weblogic’, ‘t3://localhost:8003′) domainRuntime() cd(‘/DomainServices/DomainRuntimeService/DomainConfiguration/DomainB/SecurityConfiguration/DomainB/DefaultRealm/myrealm/AuthenticationProviders/DefaultAuthenticator’) cmo.importData(‘DefaultAtn’,’c:/export.ldif’, Properties())

Continue reading

Create Active Directory Authentication Provider from WLST

connect(‘weblogic’,’weblogic’,’t3://localhost:7001′) edit() startEdit(-1,-1,’false’) cmo.getSecurityConfiguration().getDefaultRealm().createAuthenticationProvider(‘ADAuthenticator’, ‘weblogic.security.providers.authentication.ActiveDirectoryAuthenticator’) cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider(‘ADAuthenticator’).setControlFlag(‘OPTIONAL’) cd(‘/SecurityConfiguration’) cd(‘base_domain’) cd(‘Realms/myrealm/AuthenticationProviders’) cd(‘ADAuthenticator’) cmo.setGroupBaseDN(‘CN=Users,DC=faisal,DC=bea,DC=com’) cmo.setUserBaseDN(‘CN=Users,DC=faisal,DC=bea,DC=com’) cmo.setAllGroupsFilter(‘(objectclass=group)’) cmo.setPrincipal(‘CN=Administrator,CN=Users,DC=faisal,DC=bea,DC=com’) cmo.setCredential(‘Passw0rd’) cmo.setPort(389) cmo.setHost(‘localhost’) save() activate()

Continue reading