Loading

×Sorry to interrupt
Uncaught ReferenceError: addCTracking is not defined
throws at https://kb.vmware.com/resource/KM_TealiumTrackingJS?v=0.5:100:1

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

REST API calls using a vIDM user fail in NSX-T (75273)

Last Updated: 5/26/2022Categories: TroubleshootingTotal Views: 14616Language:
English

1 like this article

Subscribe to get an email
newsletter with new updates

1 people found this helpful Please provide article feedback:

Symptoms

With NSX-T it is possible to use vIDM for authentication the NSX-T manager.

When you try to use a vIDM user with the correct permissions to run REST API calls these may fail.

You are able to successfully log into the NSX-T manager with the same user you are using for REST API calls and make changes.

The NSX-T manager is configured to use vIDM, the vIDM setup is configured with a connector and a vIDM server.

Below is a sample REST API query and the results you may see:

# curl --header "Authorization: Remote bnN4YWRtaW5AY29ycC5sb2NhbDpWTXdhcmUxIQ==" --insecure -s --request GET https://<nsx-mgr>/api/v1/logical-ports

{

"module_name" : "common-services",

"error_message" : "The credentials were incorrect or the account specified has been locked.",

"error_code" : "403"

}

Cause

This happens when there is a separate connector server and a vIDM server configured.
The vIDM server does not trust the CA certificate of the connector server.

Resolution

To work around this issue you will need to make the vIDM server trust the CA from the connector server.

Workaround

Enable Outbound Mode for the Connector, this means the you will not need to trust the connector certificate.
Details on how to achieve this can be found in the following documentation:
https://docs.vmware.com/en/VMware-Identity-Manager/3.3/com.vmware.vidm-dmz-deployment/GUID-C97A4D37-8F1F-4B24-9A97-1A25A0033999.html

https://docs.vmware.com/en/VMware-Identity-Manager/3.3/com.vmware.vidm-dmz-deployment/GUID-FE124219-1322-43B2-9F41-9DE941FCD012.html

If this still having issues after setting Enable Outbound Mode for the Connector, you may need to manually trust the connector certificate in vIDM:
Run the following commands from a Linux shell:

openssl s_client -connect your-connector-ip:443

Where your-connector-ip is either your connector IP address or resolvable hostname.
This should return a long output which includes the certificate.
Select everything between the below lines, include the BEGIN and END lines of the certificate and copy to your clipboard:

-----BEGIN CERTIFICATE-----
MIIG....XdvA0
-----END CERTIFICATE-----

To install this certificate on vIDM:

In the vIDM server, login to the Admin Portal

Then go to Appliance Settings

Click on Manage configuration

Enter your vIDM system admin password

Select the Install SSL Certificates option on the left side bar

Select the Trusted CAs tab

Paste the connector certificate copied to the clipboard earlier in the Root or Intermediate Certificate text box

Then click Add.

Your will be presented with a warning:

Note: THIS OPERATION WILL RESTART YOUR VIDM SERVER SO MAY AFFECT CURRENT LOGGED IN USERS !

Click Ok.

Once the service restart is complete, the spinning wheel on the page should go away.

Please retry NSX-T API again.

Related Information

Another possible cause for this behavior is if the NSX Manager date is behind the vIDM date.
Check /var/log/proxy/reverse-proxy.log on the NSX Manager at time of failed authentication.

Example logging if NSX date is behind vIDM date:

2022-05-10T17:00:00.688Z  INFO https-jsse-nio-<IP>-443-exec-2 VidmTokenServices 30035 - [nsx@6876 comp="nsx-manager" level="INFO" subcomp="http"] Fetch information from vIDM Discovery Endpoint https://{vIDM hostname}/SAAS/auth/.well-known/openid-configuration
2022-05-10T17:00:00.778Z  INFO https-jsse-nio-<IP>-443-exec-2 NsxTrustManager 30035 SYSTEM [nsx@6876 comp="nsx-manager" level="INFO" subcomp="http"] Trust thumbprint of CN=XXXXXXXXXXXX,OU=XXXXXX,O=XXX Inc.,C=XX
2022-05-10T17:00:00.862Z  INFO https-jsse-nio-<IP>-443-exec-2 VidmTokenServices 30035 - [nsx@6876 comp="nsx-manager" level="INFO" subcomp="http"] Fetch public key from https://{vIDM hostname}/SAAS/API/1.0/REST/auth/token?attribute=publicKey&format=pem
2022-05-10T17:00:00.904Z  INFO https-jsse-nio-<IP>-443-exec-2 VidmTokenServices 30035 - [nsx@6876 comp="nsx-manager" level="INFO" subcomp="http"] Validate access token locally: <token info>
2022-05-10T17:00:00.905Z  WARN https-jsse-nio-<IP>-443-exec-2 CustomOidcAuthorizationCodeAuthenticationProvider 30035 - [nsx@6876 comp="nsx-manager" level="WARNING" subcomp="http"] password grant flow authentication failed
2022-05-10T17:00:00.905Z ERROR https-jsse-nio-<IP>-443-exec-2 NsxBasicAuthenticationFilter 30035 - [nsx@6876 comp="nsx-manager" errorCode="MP60204" level="ERROR" subcomp="http"] error
org.springframework.security.authentication.BadCredentialsException: Could not obtain user details from token
.
.
.
Caused by: org.springframework.security.oauth2.common.exceptions.InvalidTokenException: Token has been issued in the future: <UNIX timestamp>

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

KB
•
Download and Install VMware Fusion (2014097)

Results 1-2 of 2

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware Identity Manager

Related Versions:

VMware NSX-T

Take Our Survey

Support Assistant