Step 1: Implement the Custom User Plugin

ARTIFACTORY: How to log the Client IP address of an Upload request in Artifactory

AuthorFullName__c
Shisiya Sebastian
articleNumber
000005775
ft:sourceType
Salesforce
FirstPublishedDate
2023-06-08T19:27:56Z
lastModifiedDate
2023-06-08
VersionNumber
1
To capture the client IP address, follow the steps below to use a custom user plugin

Locate the directory: "/var/opt/jfrog/artifactory/etc/artifactory/plugins/"
Create a file named "ip.groovy" and open it.
Copy and paste the following script into the "ip.groovy" file:
import org.artifactory.request.Request
import org.artifactory.repo.RepoPath
import org.artifactory.request.RequestThreadLocal;

upload {
    beforeUploadRequest { Request request, RepoPath repoPath ->
        String remoteClientAddress = RequestThreadLocal.getClientAddress();
        log.warn "UPLOAD REQUEST for remoteClientAddress variable: IP={$remoteClientAddress}"
    }
}