Continue

Continue

API Key Integration in Your ProGet Instance

Migrating from Artifactory to ProGet
Step-by-Step Guide & Best Practices

API Key Integration in Your ProGet Instance

API Keys are essential tools used across platforms like Maven, Visual Studio, and npm, for accessing packages and content in repositories, instead of storing usernames or passwords in configuration files.

ProGet API keys are used to manage feeds, packages, SCA and other features. When migrating to ProGet, you can migrate your Artifactory keys and use them with similar permissions, without the need to generate new ones.

In this article, we’ll cover:

API Key Integration from Artifactory to ProGet

Artifactory API keys are created when setting up profiles, or by administrators as needed. These API keys are stored as hashes, so you can’t extract or import them directly. They are often stored elsewhere, or called in scripts that use them.

When you’re creating API keys in ProGet you have the option of entering keys as text yourself. If you do have your Artifactory keys on hand, you can recreate them in ProGet with similar permissions, meaning you won’t need to replace keys you’re already using in your scripts and automation.

Creating API Keys in ProGet

Creating and managing API Keys can be done in either ProGet’s UI, CLI with pgutil, or as an HTTP API request.

ProGet uses three main types of API Keys:

  • System API Keys: These give you control or specific permissions in ProGet. They are used to automate ProGet configurations and access packages, containers, and assets:
  • Feed API Keys: These are for managing capabilities per feed or group. They are usually restricted to specific feeds or groups, offering limited access to associated packages, containers, and assets:
  • Personal API Keys: The privileges of these are based on the user’s security attributes. They are managed by ProGet end-users and will mimic user access. These are similar to the API keys created in the user profile in Artifactory:

Users can create and manage their own personal keys, which Admins can also see and manage as well:

Migrating Artifactory Keys to ProGet

To add existing API keys with permissions to ProGet, start by navigating to the API Keys page and creating a new key:

ProGet also offers information on how secure your keys are. In the screenshot above it shows that custom API keys are allowed, which will let you use your Artifactory API keys in ProGet.

From here you’ll give a name to the key, specify its type (System, Feed, or Personal), and configure the necessary permissions based on your Artifactory setup.

If you had an an API key for the user “J.Smith” with all of their associated permissions, in ProGet you can create the same permissions by creating a User API Key and selecting “J.Smith” from the list of users.

Finally, just copy across this user’s Artifactory API key into the text box, save it, and you’re done!

Conclusion

ProGet supports API keys for feeds, packages, and security access. These can be created for administration, feed management, and for individual users, who can also create and manage their own personal keys, and can be migrated from Artifactory along with similar permissions.

Like your API keys, your feed replication configuration can be migrated to ProGet, explained in the following article, Setting Up and Managing Replication.