Thanks Brian for the response.
Here are the details:
ThingWorx version: 7.0.0
OS: Ubuntu (x86_64 x86_64 x86_64 GNU/Linux)
Tomcat version: 8.0.24
Postgres version: 9.4
We created a java extension for authenticator using the eclipse plugin.
The java class, as part of this extension, extends com.thingworx.security.authentication.CustomAuthenticator
The authenticate method just redirects the user to our SSO. This is only minimal code. We will add more code if the authenticator is successfully imported.
Below is the metadata.xml file. Made sure the class name, package name, jar file name exactly match.
Please let me know if you need any other information.
description="Authentication against UAA"
<FileResource type="JAR" file="thingworxsecurityext.jar" description="GE UAA Authenticator extension JAR file" />
description="Authenticator that connects to GE UAA"
Not sure if you can share your Java based Authenticator, but that would be helpful too.
Here are some general tips to keep in mind with custom Authenticators:
- Authenticators require you to add a servlet-api jar to your extension project for compilation only. You can copy a servlet-api.jar file into the twx-libs folder of your project(it is hidden inside Eclipse so use a file browser to do this). This jar is provided by tomcat at runtime.
- Make sure to set aspect.isEditableExtensionObject="true" in metadata.xml so you can edit the entity after you import.
- The enabled property is overridden on import so it doesn't interfere with the currently configured authenticator.
Got it. Thank you!
At first it looked like you were getting a ClassDefNotFound exception, but digging deeper it was actually an initialization error. Your Date format is not valid so when the UAAAuthenticator class was being initialized, that static piece was blowing up on you. Fix the format and it should import. Your extension is built properly, it's just the code that has issues.
In general, if you experience issues you can't figure out, try to be as minimal as possible in your implementation. Even though the logic was simple in your Authenticator, it still had properties and logic that could cause runtime errors. So stripping out as much as possible can help hone in if you have a problem with the extension structure or the java file.