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

Disha Meswania
2018-06-07 23:06

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

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

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)