We encountered inconsistent behavior on the vCD ssoLogin which return unauthorized error.
Following is the test scenario we performed
1) single SAML Assertion with multiple vCloudClient SDK instance
- obtained the authenticated SAML assertion
- base64 encoded + gzip to form the authorization header for vCloud API sso login for Federation session.
- spawn 5 threads, each created a new vCloudClient instance and feed with the same set of data
- use the vCloudClient's ssoLogin() method to perfromed login and invoke the get Org API
The result:
Try #1 | Try #2 | Try #3 | Try #4 | Try #5 | |
---|---|---|---|---|---|
Thread 1 | ok | ok | ok | ok | error |
Thread 2 | error | ok | ok | ok | ok |
Thread 3 | error | ok | ok | ok | ok |
Thread 4 | error | ok | ok | ok | ok |
Thread 5 | ok | ok | error | ok | ok |
overall success ratio | 2/5 | 5/5 | 4/5 | 5/5 | 4/5 |
ok: successfully login and followed by get org API call
The error returned is quite generic:
com.vmware.vcloud.sdk.exception.UnauthorizedAccessException: Unauthorized
at com.vmware.vcloud.sdk.RestUtil.login(RestUtil.java:296)
at com.vmware.vcloud.sdk.VcloudClient.ssoLogin(VcloudClient.java:416)
The does not seems to have any consistent pattern on the error response from vCD.
Any ideas where could be gone wrong?