ARTIFACTORY: Monitoring changes to users, groups and permission targets

AuthorFullName__c
Elina Floim Alper
articleNumber
000005341
FirstPublishedDate
2022-07-20T11:39:23Z
lastModifiedDate
2022-07-20

ARTIFACTORY: Monitoring changes to users, groups and permission targets

Introduction

Artifactory administrators may want to have the possibility to monitor changes that the platform users execute, such as changes to user passwords and group associations within the platform, and utilize this for their audit records. In this article, we will review different log entries that are logged in the $JFROG_HOME/artifactory/var/log/access-security-audit.log as part of users, groups, or permission targets configuration changes. 

Note: The following is aimed at monitoring internal users/groups, however, some entries may be useful as well for monitoring changes across external entities as well. 

Changes to user passwords:

When a user’s password is being changed, the change will be logged and will look similar to this:

2022-06-16T11:25:29.368Z|1ee50b7cdd06468e|<IP>|admin|jfrt@01g5hbxxfg4xwd179vje260z|test|U|USR|{"added":{"customData.gen_password_key":"*","customData.private_key":"*","customData.public_key":"*"},"updated":{"password":{"oldEntry":"*","newEntry":"*"}}}

This entry indicates that the custom data has been changed, and specifically, the password has been updated from the previous value (oldEntry) to a new value (newEntry). This entry contains some additional information:

  • The time and date in which the password was changed
  • The IP from which the change was performed
  • The user who performed the change (in this case, the admin user)
  • The user whose password has been changed (in this case, a user named test)
User’s group associations:

In addition, this log file will contain entries indicating that a user has been added or removed from a group. For instance:

2022-07-19T10:29:41.246Z|5621061bc473eb5e|<IP>|admin|jfrt@01g85htp1s1d621kfxkk310d|test|U|USR|{"removed":{"groups.readers":"UserGroupImpl(name=readers, realm=internal)"}}
2022-07-19T10:29:51.079Z|7fe4790e8baa40bc|<IP>|admin|jfrt@01g85htp1s1d621kfxkk310d|test|U|USR|{"added":{"groups.readers":"UserGroupImpl(name=readers, realm=internal)"}

In the above entries, the admin user has removed the “test” user from the “readers” group, then added him back to that group.

Changes to permission targets:

When a permission target is created or modified, the log contains an entry similar to the one below:

2022-07-19T10:40:37.457Z|37d38d12c9ed079f|UNKNOWN|UNKNOWN|admin|all-repos|C|PRM|{"added":{"actions.readers(GROUP):ANNOTATE":"readers(GROUP):ANNOTATE","customData.includePattern":"**","displayName":"all-repos","actions.readers(GROUP):READ":"readers(GROUP):READ","customData.repoKeys":"[ANY LOCAL, ANY REMOTE]","name":"jfac@01g85ht2kfeg9e1e8ye5xr0y:bf1279f6-76eb-486e-b1d8-cf8a203d55","customData.excludePattern":"","actions.test(USER):DEPLOY":"test(USER):DEPLOY","serviceId":"jfac@01g85ht2kfeg9e1e8ye5xr0y","actions.test(USER):ANNOTATE":"test(USER):ANNOTATE","actions.test(USER):READ":"test(USER):READ","resourceType":"REPO"}}


The log contains information about: 

  • The user who created the permissions target (admin) 
  • The groups that were added (readers) 
  • The permissions they were granted (read and annotate) 
  • The permission target name (“all-repos”)
  • The included repositories and builds (in this case, any local and any remote repository)
  • The permission granted to the users (read permissions for the “test” user)