Showing posts with label validation. Show all posts
Showing posts with label validation. Show all posts

Tuesday, April 7, 2015

Authenticator is not instantiated via the properties constructor

I am triggering a SOAP request from SOAP UI to a custom gateway of cordys environment which accepts user credentials in SOAP header.

For Ex :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns="http://corp.alahli.com/middlewareservices/header/1.0/" xmlns:ns1="http://corp.alahli.com/middlewareservices/test/1.0/">
<soapenv:Header>
<oas:Security>
<oas:UsernameToken>
<oas:Username>${#Project#username}</oas:Username>
<oas:Password>${#Project#password}</oas:Password>
</oas:UsernameToken>
</oas:Security>
</soapenv:Header>
<soapenv:Body>
<!-- Main SOAP Request which is connected to service group SG1-->
</soapenv:Body>
</soapenv:Envelope>

Content which is shown in green color is the security information which I am passing from SOAP UI. I hope people are well aware what ${#Project#username} stands for (i.e., I am reading credentials from properties of SOAP Project).

Let's say the request is targeted to service group SG1 in this case. 

As we know that any cordys service is served using SAMLArt. In this case the SAMLArt will be provided by the custom gateway to the application container. Now when the custom gateway tries to get the SAMLArt it uses the property of the application container. If it does not find the property it might throw you an error which was my case.

I encountered an exception which says something like this,

com.eibus.security.authentication.InvalidAuthenticatorException: Authenticator is not instantiated through the properties constructor.
at com.eibus.security.authentication.AuthenticatorFactory.getAuthenticator(AuthenticatorFactory.java:78)
at com.eibus.security.identity.WSSecurityUsernameTokenIdentityType.validate(WSSecurityUsernameTokenIdentityType.java:64)
at com.eibus.soap.SOAPTransaction.<init>(SOAPTransaction.java:349)
at com.eibus.soap.SOAPTransaction.<init>(SOAPTransaction.java:175)
at com.eibus.soap.Processor.onReceive(Processor.java:970)
at com.eibus.soap.Processor.onReceive(Processor.java:943)
at com.eibus.connector.nom.Connector.onReceive(Connector.java:417)
at com.eibus.transport.Middleware$NonTransactionalWorkerThreadBody.run(Middleware.java:1758)
at com.eibus.util.threadpool.WorkerThread.run(WorkerThread.java:64)

Now I found out the property that was missing i.e., the authenticator class. We need to add the authenticator property to the service group that was implementing my service. This should be done by using LDAP explorer,

The property which is to be added is below,

<authenticator implementation="com.eibus.security.authentication.CARSAuthenticator" /> 

Since I am using CARSAuthenticator in my case. This should be added to the service group SG1 (in the above explained scenario). An example of such updation can be found below,



 

Friday, March 28, 2014

Unable to connect to database using JDBC driver


I was trying to connect to a database from Cordys using jdbc driver. It gives an exception called "Configuration Validation was not successful". Please note below




When I expand that error I could understand the reason was "Unable to locate the path of the driver" basically "ClassNotFound" exception.





The solution to this would be to set the CLASSPATH environment variable to the required jar path. Here in this case it would be ojdbc14.jar which holds the necessary class files. It would be done in the below mentioned steps

Step 1 : Locate ojdbc14.jar file. If you have oracleXE installed in your environment it would be present in the below given location but if you don't have oracleXE installed then you would have to download this jar and copy the path from the explorer.



Step 2 : Set the environment variables using the jar path from step 1.

Since the above environment variables belong to system you might have to restart your system. However I have read at many places saying Windows 7 would not need a restart to have this environment variables to be set, but I did not want to take a chance and I restarted. It worked.


Monday, December 16, 2013

Cordys : Failed connecting to Oracle Schema from Cordys

Possible Reasons :

·         Configuration details are indeed wrong or
·         Missing oracle driver.
Missing oracle driver :
Give <<ojdbc14.jar>> (For oracle 10 g this works may be for oracle 11i something other jar would be used i guess).

Configure "classpath" variable of "Environment Variables" in the machine and restart the system.