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:
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}" } }