Hi there,
I am attempting to run a workflow via REST, but so far I am unable to get past SSO authentication.
My code is as follows:
VcoSessionFactory sessionFactory = new DefaultVcoSessionFactory(new URI("https://<Server>:8281/api"));
Authentication authentication = null;
try
{logger.log(3, "Before SSO Auth");
SsoAuthenticator authenticator = new SsoAuthenticator(new URI("https://<auth server>:7444/ims/STSService?wsdl"), sessionFactory, 1800);
logger.log(3, "Got past SSO Suth");
authentication = authenticator.createSsoAuthentication("uname", "pass");
}
catch(IOException e)
{
logger.log(3, e.toString());
throw new RuntimeException("unable to authenticate to SSO", e);
}
catch(URISyntaxException e)
{
logger.log(3, "Danger will robinson DANGER");
}
logger.log(3,authentication.toString());
VcoSession session = sessionFactory.newSession(authentication);
logger.log(3,session.toString());
With the following error:
java.lang.RuntimeException: SSO server error
at com.vmware.o11n.sdk.rest.client.impl.SsoTokenServiceAdaptor.handleSso
Exception(SsoTokenServiceAdaptor.java:105)
at com.vmware.o11n.sdk.rest.client.impl.SsoTokenServiceAdaptor.acquireHo
kToken(SsoTokenServiceAdaptor.java:56)
at com.vmware.o11n.sdk.rest.client.SsoAuthenticator.createSsoAuthenticat
ion(SsoAuthenticator.java:154)
at doppler_API.firstRest(doppler_API.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.nimsoft.nimbus.NimProbeBase.activateOnTimer(NimProbeBase.java:425
)
at com.nimsoft.nimbus.NimProbeBase.activateOnTimer(NimProbeBase.java:392
)
at com.nimsoft.nimbus.NimProbe.doForever(NimProbe.java:409)
at doppler_API.doit(doppler_API.java:107)
at doppler_API.main(doppler_API.java:62)
Caused by: com.vmware.vim.sso.client.exception.InternalError: Cannot sign reques
t message
at com.vmware.vim.sso.client.impl.SecurityTokenServiceImpl$RequestRespon
seProcessor.executeRoundtrip(SecurityTokenServiceImpl.java:601)
at com.vmware.vim.sso.client.impl.SecurityTokenServiceImpl.acquireToken(
SecurityTokenServiceImpl.java:116)
at com.vmware.o11n.sdk.rest.client.impl.SsoTokenServiceAdaptor.acquireHo
kToken(SsoTokenServiceAdaptor.java:54)
... 11 more
Caused by: com.vmware.vim.sso.client.impl.exception.SignatureException: Error wh
ile creating SOAP request signature
at com.vmware.vim.sso.client.impl.signature.WsSecuritySignatureImpl.sign
(WsSecuritySignatureImpl.java:140)
at com.vmware.vim.sso.client.impl.SecurityTokenServiceImpl$RequestRespon
seProcessor.executeRoundtrip(SecurityTokenServiceImpl.java:591)
... 13 more
Caused by: java.security.NoSuchAlgorithmException: unsupported algorithm
at org.jcp.xml.dsig.internal.dom.DOMXMLSignatureFactory.newSignatureMeth
od(Unknown Source)
at com.vmware.vim.sso.client.impl.signature.WsSecuritySignatureImpl.getS
ignatureMethod(WsSecuritySignatureImpl.java:217)
at com.vmware.vim.sso.client.impl.signature.WsSecuritySignatureImpl.sign
(WsSecuritySignatureImpl.java:113)
... 14 more
Perhaps someone could provide an example of successful authentication.
Thanks for your assistance.