ARTIFACTORY: How to Authenticate Command-Line Tools When Using the SAML SSO to Access Artifactory

ARTIFACTORY: How to Authenticate Command-Line Tools When Using the SAML SSO to Access Artifactory

AuthorFullName__c
Amith Kumar Mutakari
articleNumber
000004138
ft:sourceType
Salesforce
FirstPublishedDate
2018-06-07T23:06:43Z
lastModifiedDate
2024-03-10T07:47:19Z
VersionNumber
7

If you use SAML with Artifactory, by design the SAML 2.0 standard allows SAML users access to the Artifactory UI via SAML SSO. However, command-line tools require separate authentication methods to achieve this access.

To login to Artifactory via clients such as Docker, npm, and Maven, you can generate an API key for SAML SSO users by doing the following:

  1. Login to the Artifactory UI using SAML (Note: Be sure to tick the SAML configuration->Auto Create Artifactory Users and Allow Created Users Access to Profile Page checkboxes first.)
  2. After the first login, the SAML user's UserID will be saved in Artifactory. Thereafter, the SAML user may generate an API key through the UI or via the use of the Create API Key REST API.
This now works with an "Identity Token" as well, which can be generated through the UI in the "Edit Profile" section under the Welcome User tab.

Once an API key or Identity Token has been generated, it can be used instead of a password or instead of both a UserID and a password. Be aware, however, that this will require a dedicated REST API header.