VMware Cloud Community
promagnoli
VMware Employee
VMware Employee
Jump to solution

Requests are stuck - invalid credentials

Hi Team,

I just integrated my vRA 7.3 with Istanbul SNOW instance using plug-in 3.0. I am able to request (and approve) services from the vRA catalog, however requests are stuck. See screenshot below.

Screen Shot 2018-02-20 at 12.15.45.png

In the plugin log I can see the following error message, however I am not able to identify what are the invalid credentials.

REST call error found inside VRASNRequestUtil.getTemplateViaRest: Method failed: (/catalog-service/api/consumer/entitledCatalogItems/94748c1b-40fa-4ec0-a239-6ef0807b73c6/requests/template) with code: 401 - Invalid username/password combo

Thanks

Paolo

Reply
0 Kudos
1 Solution

Accepted Solutions
CalsoftTechie
Enthusiast
Enthusiast
Jump to solution

Hi draymond​,

we don't think issue is tenant related, because the script you are referring to [ validateToken : function(token,refresh) ] is already successfully passed and user has experienced error in later one script [ getTemplateViaRest: function(a,userToken) ]

View solution in original post

Reply
0 Kudos
12 Replies
draymond10
Enthusiast
Enthusiast
Jump to solution

Are you using the default tenant (vsphere.local)? vsphere.local is hard-coded in one or more of the functions (validateToken I believe is one of them)

var ep = this.endPoint+"/SAAS/t/vsphere.local/API/1.0/REST/auth/token?attribute=isValid";

We tweaked the code to add a "tenant" variable; and reference the variable while setting the endpoint.

VMware please confirm a fix for this in the next release.  Thanks.

Reply
0 Kudos
promagnoli
VMware Employee
VMware Employee
Jump to solution

Hi,

first of all thanks for getting back to me, it is really appreciated here.

I did not configured the default tenant, actually I configured the plug-in "Basic Configuration" to integrate a user defined tenant.

Can you share the changes you created to add the tenant variable?

Thanks,

Paolo

Reply
0 Kudos
shaikabdul
Contributor
Contributor
Jump to solution

Hi,

Manish is looking into it, He will update you.

Regards

ABDUL

Reply
0 Kudos
CalsoftTechie
Enthusiast
Enthusiast
Jump to solution

Hi Paolo,

Can you check vRA if this request is landed there or not?

We  update ServiceNow request status later once it is succeeded/failed at vRA.

Regards,

Manish Patil

Reply
0 Kudos
promagnoli
VMware Employee
VMware Employee
Jump to solution

The request did not landed on vRA. The Request in ServiceNow is still in the same situation depicted in my screenshot.

Reply
0 Kudos
draymond10
Enthusiast
Enthusiast
Jump to solution

Manish, From the thread... They aren't using the default tenant (vsphere.local)

The REST call that gets the Blueprint template VRASNRequestUtil.getTemplateViaRest: Method failed:

Thus....this will never make it into vRA, since its failing to even pull back the blueprint template

The issue is with the validateToken function on the VRASNRequestUtil script include where vsphere.local is hard-coded.

validateToken : function(token,refresh) {

try{ VRASNLogger.debug('Inside  VRASNRequestUtil.validateToken: used for validate the users token'); var ep = this.endPoint+"/SAAS/t/vsphere.local/API/1.0/REST/auth/token?attribute=isValid";

Reply
0 Kudos
promagnoli
VMware Employee
VMware Employee
Jump to solution

Hi draymond10,

thanks for your assistance.

In the plugin xml I can see the defualt tenant "vsphere.local" is reported 5 times.

What if I do simply replace the dafault tenant with my tenant name in the xml and than reimport it? I know this is not elegant, this would solve my issue. Alternatively, I do understand you were able to create a better solution using variables. Can you share it?

Thanks

Paolo

Reply
0 Kudos
CalsoftTechie
Enthusiast
Enthusiast
Jump to solution

Hi draymond​,

we don't think issue is tenant related, because the script you are referring to [ validateToken : function(token,refresh) ] is already successfully passed and user has experienced error in later one script [ getTemplateViaRest: function(a,userToken) ]

Reply
0 Kudos
kumar6384
Enthusiast
Enthusiast
Jump to solution

Hi,

Kindly refer below details.

Request Bearer Token

Name

Value

Endpoint

https://${vRA}/identity/api/tokens

Method

POST

Header

NA

Body

NA

MID Server

vRAServer

Notes

Identify Token in response “id”

Get Template Request

Name

Value

Endpoint

https://${vRA}/catalog-service/api/consumer/entitledCatalogItems/${catalogId}/requests/template

Method

GET

Header

Authorization: Bearer ${tokenId}

Body

NA

MID Server

vRAServer

Notes

  • Modify Values from response
  • Location value on VRA is mapped

I hope that the above answers your questions satisfaction.

Reply
0 Kudos
draymond10
Enthusiast
Enthusiast
Jump to solution

So going back to the original question then...where can we find info regarding the following?  It's obviously using some authtoken that doesnt work. REST call error found inside VRASNRequestUtil.getTemplateViaRest: Method failed: (/catalog-service/api/consumer/entitledCatalogItems/94748c1b-40fa-4ec0-a239-6ef0807b73c6/requests/template) with code: 401 - Invalid username/password combo

Reply
0 Kudos
promagnoli
VMware Employee
VMware Employee
Jump to solution

Guys, to be honest my issue was trivial.

In my browser I was logged in vRA in a tab, in anew tab I logged in SNOW. For some reason I was not redirected in vRA for user authentication (I guess it was sharing first tab session). This was, for some, reason not mapping correctly my SNOW users on vRA entitlement. For some reason everyday I was always repeating this pattern (login first in vRA and then in SNOW).

Manish (thanks a lot!!!) told me to close my browser, first login in SNOW (this triggered request to login in vRA) and than request a vRA service from SNOW catalog. This worked.

Thanks

Paolo

Reply
0 Kudos
CalsoftTechie
Enthusiast
Enthusiast
Jump to solution

Thanks @promagnoli

I think we should close this thread now. Users with similar issue may find this thread useful.

Reply
0 Kudos