Quantcast
Channel: VMware Communities : All Content - VMware vCenter™
Viewing all articles
Browse latest Browse all 24426

VMware Orchestrator Java API SSL Cert issue

$
0
0

Hello everyone.  I am not sure if this is the right place to be asking this question, but I didn't see a discussion area for vco.  I am writing a Groovy/Grails web application that uses the VMware Orchestrator Java Client library to connect to vco and run workflows.  I am however having trouble authenticating against SSO so I can get back the tokens I need to use the API.  I am going to attach the stacktrace and the source code.  The stack trace complains about not finding the "keyUsage" field in the SSL cert during a call to generateCertificate.  I don't know if it's the server's cert it has a problem with or if it's trying to generate one and failing.  In any case, I will post the source code below.  I hope someone can help me, I have been stuck on this for a solid day now =(.  If this isn't the right place to ask this question, please let me know who I should ask.

 

Stacktrace:

 

Caused by: java.lang.NoSuchFieldError: keyUsage
at com.vmware.o11n.sdk.rest.client.SsoAuthenticator.generateCertificate(SsoAuthenticator.java:123)
at com.vmware.o11n.sdk.rest.client.SsoAuthenticator.<init>(SsoAuthenticator.java:75)
at com.pc.rackspace.vco.VcoTalkerService.auth(VcoTalkerService.groovy:14)
at com.pc.rackspace.vco.TestController.index(TestController.groovy:7)
... 5 more
Code:
package com.pc.rackspace.vco
import com.vmware.o11n.sdk.rest.client.DefaultVcoSessionFactory
import com.vmware.o11n.sdk.rest.client.SsoAuthenticator
import com.vmware.o11n.sdk.rest.client.VcoSession
import com.vmware.o11n.sdk.rest.client.authentication.SsoAuthentication
class VcoTalkerService {
    def grailsApplication
   
    def auth() {
        DefaultVcoSessionFactory sessionFactory = new DefaultVcoSessionFactory(new URI(grailsApplication.config.vco.uri))
        SsoAuthenticator sso = new SsoAuthenticator(new URI(grailsApplication.config.vco.sso.uri), sessionFactory, 1000)
       
        SsoAuthentication auth = sso.createSsoAuthentication(grailsApplication.config.vco.username, grailsApplication.config.vco.password)
        VcoSession session = sessionFactory.newSession(auth)
    }
}

Viewing all articles
Browse latest Browse all 24426

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>