Skip to main content
5-Regular Member
August 18, 2023
Solved

Running a custom class file from windchill shell (SSO) getting "wt.method.AuthenticationException"

  • August 18, 2023
  • 2 replies
  • 2631 views

I am getting following error while running a custom class file as described in CS353022. Windchill is configured with SSO + OpenDJ.

What could be the possible issue?  .. Could CS294361 be causing it?

 

Custom class has following for auth and invoking a method within class, error is coming at invoke. 

RemoteMethodServer rms = RemoteMethodServer.getDefault();

rms.setUserName("wcadmin");

rms.setPassword("wcadmin");         

rms.invoke("Login1","ext.participant.Login",null,null,null);

 

 

Running windchill wt.auth.Authentication also returns error

 

wt.util.WTRemoteException: Unable to invoke remote method; nested exception is:

        wt.method.AuthenticationException

        at wt.method.RemoteMethodServer.invoke(RemoteMethodServer.java:918)

        at ext.siemens.pvp.Login.main(Login.java:36)

 

 

Best answer by HelesicPetr

Hi @ND_102012 

the issue is the SSO, method from windchill shell can not Authenticate . 

you need set that http server do not use the SSO for that function from the windchill shell

 

someone else can have a solution.

 

I would recommend an another method to run then windchill shell 

 try this method to run from a browser url address

 

package cz.custom.HELTest1;
public class Test1 implements RemoteAccess
{
		// http link to run this function
		// http://server.com/Windchill/servlet/WindchillAuthGW/cz.custom.HELTest1.Test1/runOwnMethod
		
	public static void runOwnMethod(HTTPRequest req, HTTPResponse resp) throws WTException, PropertyVetoException, IOException
	{
	//... your code
	}
}

 

PetrH

2 replies

HelesicPetr
22-Sapphire II
22-Sapphire II
August 18, 2023

Hi @ND_102012 

the issue is the SSO, method from windchill shell can not Authenticate . 

you need set that http server do not use the SSO for that function from the windchill shell

 

someone else can have a solution.

 

I would recommend an another method to run then windchill shell 

 try this method to run from a browser url address

 

package cz.custom.HELTest1;
public class Test1 implements RemoteAccess
{
		// http link to run this function
		// http://server.com/Windchill/servlet/WindchillAuthGW/cz.custom.HELTest1.Test1/runOwnMethod
		
	public static void runOwnMethod(HTTPRequest req, HTTPResponse resp) throws WTException, PropertyVetoException, IOException
	{
	//... your code
	}
}

 

PetrH

17-Peridot
August 18, 2023

You need to add an extra parameter

windchill --javaargs=-Dwt.auth.trustedAuth.username=<username> <package.java_class_name> <param1> <param2>...

 See also:

https://www.ptc.com/en/support/article/CS353022

HelesicPetr
22-Sapphire II
22-Sapphire II
August 18, 2023

Hi @BjoernRueegg 

Oh this is the SSO login bypass 😄 good to know 😄

PetrH