Authentication Provider: SecurityProvider class name for XXXX is not specified in WL 12.1.3.0.0

I just created an authentication provider for WebLogic Server version 12.1.3.0.0 (the authentication provider adheres to the standard JAAS structure, structuring the authentication sequence on top of several JAAS custom logic modules.), But when I start Wl I have this error:

Here are the steps:

1) set ENV

%WL_HOME%/server/bin/setWLSEnv.cmd 

2) generate an MBean and stubs:

 java -cp %WL_HOME%/server/lib/* -verbose -DcreateStubs="true" \ weblogic.management.commo.WebLogicMBeanMaker -MDF WSAuthentication.xml \ -files C:\Development\Workspaces\Eclipse\WLAuthenticationProvider\src 

3) package the authentication provider and login module with the stub and MBI files created.

 java -DMJF=C:\Development\Workspaces\Eclipse\WLAuthenticationProvider\jar\WSAuthentication.jar \ -Dfiles=C:\Development\Workspaces\Eclipse\WLAuthenticationProvider\src weblogic.management.commo.WebLogicMBeanMaker 

4) add -DUseSunHttpHandler = true to run WebLogic.cmd

 weblogic.security.service.SecurityServiceRuntimeException: [Security:090877]Service Common JAASAuthenticationService unavailable, see exception text: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for MyAuthentication is not specified. at weblogic.security.service.PrincipalAuthenticator.initialize(PrincipalAuthenticator.java:155) at weblogic.security.service.PrincipalAuthenticator.<init>(PrincipalAuthenticator.java:315) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.doATN(CommonSecurityServiceManagerDelegateImpl.java:731) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.postInitializeRealm(CommonSecurityServiceManagerDelegateImpl.java:515) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.postLoadRealm(CommonSecurityServiceManagerDelegateImpl.java:861) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.postInitializeRealms(CommonSecurityServiceManagerDelegateImpl.java:927) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.postInitialize(CommonSecurityServiceManagerDelegateImpl.java:1109) at weblogic.security.service.SecurityServiceManager.postInitialize(SecurityServiceManager.java:943) at weblogic.security.SecurityService.start(SecurityService.java:159) at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:78) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1017) at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:388) at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:430) at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456) at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225) at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82) at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2488) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98) at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:606) at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77) at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:231) at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:254) at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:413) at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456) at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225) at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82) at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2488) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98) at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:606) at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77) at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:231) at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:254) at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:413) at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456) at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225) at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82) at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2488) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87) at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162) at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311) at weblogic.work.ExecuteThread.run(ExecuteThread.java:263) Caused by: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for TntWS2Authentication is not specified. at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:365) at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:315) at com.bea.common.engine.internal.ServiceEngineImpl.lookupService(ServiceEngineImpl.java:257) at com.bea.common.engine.internal.ServicesImpl.getService(ServicesImpl.java:72) at weblogic.security.service.CSSWLSDelegateImpl.getService(CSSWLSDelegateImpl.java:155) at com.bea.security.css.CSS.getService(CSS.java:123) at weblogic.security.service.PrincipalAuthenticator.initialize(PrincipalAuthenticator.java:132) ... 46 more Caused by: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for MyAuthentication is not specified. at com.bea.common.security.internal.legacy.service.SecurityProviderImpl.init(SecurityProviderImpl.java:42) at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:363) ... 52 more 

Here is my MyAuthentication.xml file (a simple MDF (MyAuthentication.xml) for the authentication provider). WebLogic Provider Architecture Based on MBean

 <?xml version="1.0" ?> <!DOCTYPE MBeanType SYSTEM "commo.dtd"> <MbeanType Name = "MyAuthentication" DisplayName = "MyAuthentication" Package = "fr.telecom.devices.ws.security.iap" Extends = "weblogic.management.security.authentication.Authenticator" PersistPolicy = "OnUpdate" > <MbeanAttribute Name = "ProviderClassName" Type = "java.lang.String" Writeable = "false" Default ="&quot;fr.telecom.devices.ws.security.iap.MyAuthenticationProviderImpl&quot;" /> <MbeanAttribute Name = "Description" Type = "java.lang.String" Writeable = "false" Default = "&quot;Traces Authentication Provider&quot;" /> <MBeanAttribute Name = "Version" Type = "java.lang.String" Writeable = "false" Default = "&quot;1.0&quot;" /> </MbeanType> 

and here is the META-INF \ binding-file.xml file:

 <?xml version="1.0" encoding="UTF-8"?> <ns:binding-config xmlns:ns="http://www.bea.com/ns/staxb/binding-config/90"> <ns:bindings> <ns:binding-type xsi:type="ns:by-name-bean" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns:xmlcomponent> t=tnt-ws2-authenticationType@http ://xmlns.oracle.com/weblogic/security/extension</ns:xmlcomponent> <ns:javatype>eu.cec.sanco.tracesnt.ws.security.iap.TntWS2AuthenticationMBeanImpl</ns:javatype> <ns:qname-property> <ns:xmlcomponent> t=string@http ://www.w3.org/2001/XMLSchema</ns:xmlcomponent> <ns:javatype>java.lang.String</ns:javatype> <ns:getter> <ns:method-name>getName</ns:method-name> </ns:getter> <ns:setter> <ns:method-name>setName</ns:method-name> <ns:param-type>java.lang.String</ns:param-type> </ns:setter> <ns:issetter> <ns:method-name>isNameSet</ns:method-name> </ns:issetter> <ns:qname xmlns:sec="http://xmlns.oracle.com/weblogic/security">sec:name</ns:qname> <ns:nillable>true</ns:nillable> </ns:qname-property> <ns:qname-property> <ns:xmlcomponent> t=string@http ://www.w3.org/2001/XMLSchema</ns:xmlcomponent> <ns:javatype>java.lang.String</ns:javatype> <ns:getter> <ns:method-name>getCompatibilityObjectName</ns:method-name> </ns:getter> <ns:setter> <ns:method-name>setCompatibilityObjectName</ns:method-name> <ns:param-type>java.lang.String</ns:param-type> </ns:setter> <ns:issetter> <ns:method-name>isCompatibilityObjectNameSet</ns:method-name> </ns:issetter> <ns:qname xmlns:sec="http://xmlns.oracle.com/weblogic/security">sec:compatibility-object-name</ns:qname> <ns:nillable>true</ns:nillable> </ns:qname-property> <ns:qname-property> <ns:xmlcomponent> t=string@http ://www.w3.org/2001/XMLSchema</ns:xmlcomponent> <ns:javatype>java.lang.String</ns:javatype> <ns:getter> <ns:method-name>getControlFlag</ns:method-name> </ns:getter> <ns:setter> <ns:method-name>setControlFlag</ns:method-name> <ns:param-type>java.lang.String</ns:param-type> </ns:setter> <ns:issetter> <ns:method-name>isControlFlagSet</ns:method-name> </ns:issetter> <ns:qname xmlns:sec="http://xmlns.oracle.com/weblogic/security">sec:control-flag</ns:qname> <ns:nillable>true</ns:nillable> </ns:qname-property> </ns:binding-type> <ns:binding-type xsi:type="ns:simple-document-binding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns:xmlcomponent> e=tnt-ws2-authentication@http ://xmlns.oracle.com/weblogic/security/extension</ns:xmlcomponent> <ns:javatype>eu.cec.sanco.tracesnt.ws.security.iap.TntWS2AuthenticationMBeanImpl</ns:javatype> <ns:type-of-element> t=tnt-ws2-authenticationType@http ://xmlns.oracle.com/weblogic/security/extension</ns:type-of-element> </ns:binding-type> </ns:bindings> <ns:xml-to-pojo> <ns:mapping> <ns:xmlcomponent> t=tnt-ws2-authenticationType@http ://xmlns.oracle.com/weblogic/security/extension</ns:xmlcomponent> <ns:javatype>eu.cec.sanco.tracesnt.ws.security.iap.TntWS2AuthenticationMBeanImpl</ns:javatype> </ns:mapping> <ns:mapping> <ns:xmlcomponent> e=tnt-ws2-authentication@http ://xmlns.oracle.com/weblogic/security/extension</ns:xmlcomponent> <ns:javatype>eu.cec.sanco.tracesnt.ws.security.iap.TntWS2AuthenticationMBeanImpl</ns:javatype> </ns:mapping> </ns:xml-to-pojo> <ns:xml-to-xmlobj/> <ns:java-to-xml> <ns:mapping> <ns:xmlcomponent> t=tnt-ws2-authenticationType@http ://xmlns.oracle.com/weblogic/security/extension</ns:xmlcomponent> <ns:javatype>eu.cec.sanco.tracesnt.ws.security.iap.TntWS2AuthenticationMBeanImpl</ns:javatype> </ns:mapping> </ns:java-to-xml> <ns:java-to-element> <ns:mapping> <ns:xmlcomponent> e=tnt-ws2-authentication@http ://xmlns.oracle.com/weblogic/security/extension</ns:xmlcomponent> <ns:javatype>eu.cec.sanco.tracesnt.ws.security.iap.TntWS2AuthenticationMBeanImpl</ns:javatype> </ns:mapping> </ns:java-to-element> </ns:binding-config> 

this is a project structure

enter image description here

+5
source share
3 answers

There may be many reasons, but I think this is a package problem. Make sure your resulting .jar provider contains a file called META-INF/binding-file.xml and check if this bindind node file bindind as follows:

 <ns:binding-type xsi:type="ns:by-name-bean" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns:xmlcomponent> t=custom-ldapdb-bean-apType@your.namespaces </ns:xmlcomponent> <ns:javatype>fr.telecom.devices.ws.security.iap.MyAuthenticationMBeanImpl</ns:javatype> 

your.namespace must be defined in build.xml in WebLogicMBeanMAker as the -target parameter.

Say also if your resulting .jar provider looks like this

 . β”œβ”€β”€ commo.dtd β”œβ”€β”€ MyAuthentication-Mbean.xml β”œβ”€β”€ fr β”‚  └── telecom β”‚  └── devices β”‚  └── ws β”‚   └── security β”‚   └── iap β”‚   β”œβ”€β”€ impl β”‚  β”‚  β”œβ”€β”€ MyAuthenticationProviderImpl.class β”‚   β”‚  β”œβ”€β”€ ... β”‚  β”‚ └── ... β”‚   └── mbeans β”‚   β”œβ”€β”€ MyAuthenticationImpl.class β”‚   β”œβ”€β”€ MyAuthenticationMBean.class β”‚   β”œβ”€β”€ MyAuthenticationImplBeanInfo.class β”‚   β”œβ”€β”€ MyAuthenticationMBeanImpl.class β”‚  β”œβ”€β”€ MyAuthentication$Helper.class β”‚  └── MyAuthentication$SchemaHelper2.class β”œβ”€β”€ META-INF β”‚  β”œβ”€β”€ beaninfofactory.txt β”‚  β”œβ”€β”€ binding-file.ser β”‚  β”œβ”€β”€ binding-file.xml β”‚  β”œβ”€β”€ binding-mapping-file.ser β”‚  β”œβ”€β”€ MANIFEST.MF β”‚  └── schemas β”‚  └── schema-0.xsd β”œβ”€β”€ schemacom_bea_xml β”‚  β”œβ”€β”€ element β”‚  β”‚  └── your_2Enamespace β”‚  β”‚  └── my_2Dauthentication_2Dap.xsb β”‚  β”œβ”€β”€ namespace β”‚  β”‚  └── your_2Enamespace β”‚  β”‚  └── xmlns.xsb β”‚  β”œβ”€β”€ system β”‚  β”‚  └── sED25F267F5545F2AED6F8F098FF3212F β”‚  β”‚  β”œβ”€β”€ myauthentication94aadoctype.xsb β”‚  β”‚  β”œβ”€β”€ myauthentication.xsb β”‚  β”‚  β”œβ”€β”€ myauthentication7480type.xsb β”‚  β”‚  β”œβ”€β”€ index.xsb β”‚  β”‚  └── TypeSystemHolder.class β”‚  └── type β”‚  └── es_2Esescam_2Eprovider β”‚  └── my_2Dauthentication2DapType.xsb └── weblogic β”œβ”€β”€ descriptor β”‚  └── SettableBean.class └── management └── security └── LDAP_DB_WLS12C_PROVIDER18595502884856BeanInfoFactory.class 

If you are missing something that I would like to know what it is.

Edit

I edit my answer in response to your comment and respond to the release.

I see that in META-INF\binding-file.xml there is no user namespace in the <ns:xmlcomponent> node.

To specify targetNamespace in the WebLogicMBeanMAker command, you can modify your command as follows (this is shown for clarity):

 java -DMJF=C:\...\...\WLAuthenticationProvider\jar\WSAuthentication.jar \ -Dfiles=C:\...\...\WLAuthenticationProvider\src \ -DtargetNameSpace= your.own.namespace \ weblogic.management.commo.WebLogicMBeanMaker 
+1
source

I also got this error when I am going to implement a custom authentication provider. Not very good tutorials for creating your own authentication providers. I tried with maven and it worked. I found this working tutorial on GitHub. Sample code can be cloned here

There is an e-book that you can use to get an idea of ​​creating your own weblogic authentication provider. Ebook link

You may need to change the file com.bea.core.common.security.api_1.1.0.0_6-2-0-0.jar to com.bea.core.common.security.api_1.1.0.0_6-2-0-0 .jar

+2
source

If you want to be compatible with WebLogic 12.2.x, you need to define Javadoc annotations "@default" for default values ​​and "@encrypted" Javadoc annotations for encrypted values ​​(passwords, ...)

 public interface LdapAuthenticatorMBean extends StandardInterface, DescriptorBean, AuthenticatorMBean { /** * @default "com.mycompany.LdapAuthenticatorProviderImpl" */ public String getProviderClassName(); /** * @no-default * @encrypted */ public String getTechPass(); 

and also define the setter and getters methods for each property (previously this was not strictly necessary).

+1
source

Source: https://habr.com/ru/post/1236164/


All Articles