How can I authenticate commandline tools to Artifactory, when I used SAML SSO for accessing Artifactory UI?

Subject
If you use SAML with Artifactory, SAML users will be able to access Artifactory UI using SAML SSO, but command line tools need separate authentication methods for accessing Artifactory

Description
SAML is used for UI access by design by SAML 2.0 standard.

Resolution
For logging into Artifactory via clients like Docker, npm, maven, you can generate API Key for SAML SSO user by using following steps.

  1. Login to Artifactory UI using SAML (Make sure to enable “Auto Create Artifactory Users” and “Allow Created Users Access To Profile Page” checkboxes in SAML configuration first) –
  2. After the first login, the SAML user’s User ID will be saved in Artifactory. Then the user may generate an API key and associate it with the user by via UI or REST API
  3. Once the API Key is generated, you can use it instead of a password or instead of both userID and password (requires a dedicated REST API Header)