ARTIFACTORY: How to get the list of users who added an SSH key under the user profile page
In this article, we will explore the process of utilizing a database query to obtain the list of users who added an SSH key under the user profile page.
Problem statement:Currently, there is no direct approach to retrieve the list of users who added SSH keys.
Example user profile page with SSH key added:
The user names can be retrieved from the "access_users_custom_data" table with the following query.
SELECT username FROM access_users WHERE user_id IN (SELECT distinct user_id FROM access_users_custom_data WHERE prop_key like '%sshPublicKey%' and prop_value is not null);
Sample Query and the Output.