jfrog / artifactory-maven-plugin

A Maven plugin to resolve artifacts from Artifactory, deploy artifacts to Artifactory, capture and publish build info.
https://www.jfrog.com/confluence/display/JFROG/Maven+Artifactory+Plugin
Apache License 2.0
24 stars 26 forks source link

Support Encrypted Password #54

Open marcandre-larochelle opened 1 year ago

marcandre-larochelle commented 1 year ago

Is your feature request related to a problem? Please describe.

This is a security enhancement request and follows the way other official plugins do it.

Describe the solution you'd like to see

Enable specifying the server.id to read from for the credentials (username and password)

In settings.xml:

<settings>
  ...
  <servers>
    <server>
      <id>artifactory</id>
      <username>username</username>
      <password>encrypted_password</password>
    </server>
  </servers>
  ...
</settings>

In artifactory-maven-plugin:

<publisher>
  <contextUrl>https://<artifactory-instance-url>/artifactory</contextUrl>
  <serverCredentials>artifactory</serverCredentials>
</publisher>

The property from the artifactory-maven-plugin must match the server id found in the settings.xml.

Documentation on Maven Password Encryption:

Examples of how other official plugins do it:

How sql-maven-plugin reads the settings:

Describe alternatives you've considered

Access tokens, but it is still stored in plain text in the settings.xml or pom.xml.

Additional context

No response