Some tools use cleartext passwords, which can pose a security risk. The security risk is even greater if you use LDAP or other external authentication, since you expose your SSO password in cleartext and that password is likely to be used for other services, not just Artifactory.
For example, Maven uses cleartext passwords in the
settings.xml file by default.
Using Maven's built-in support for encrypted passwords and generating passwords on the client side does not overcome the security risks for the following reasons:
- The login password is decrypted on the client side and ends up as cleartext in memory, and then transmitted over the wire (unless forcing SSL too).
- The master password used for decryption is stored in clear text on the file system.
- Password encryption is left to the good will of the end-user and there is no way to centrally mandate it.
Artifactory provides a unique solution to this problem by generating encrypted passwords for users based on secret keys stored in Artifactory. You can ensure users' shared passwords are never stored or transmitted as clear text.
You can set a central policy for using or accepting encrypted passwords in the Admin tab under Security | General by setting the Password Encryption Policy field.
The behavior according to the Password Encryption Policy setting is as follows:
|Artifactory can receive requests with encrypted password (default).|
|Artifactory requires an encrypted password for every authenticated request.|
|Artifactory will reject requests with encrypted password.|
Using Your Secure Password
To secure your password:
- Open your profile page (click on your login name on the upper-right corner), type-in your password in the Current Password field and click Unlock.
- Your password is in the Encrypted Password field and can also be seen in the Maven Settings section at the bottom.
- Copy this value or use the sample server xml snippet in your
settings.xml(you must change the server name to match the ID of your repository).
Different encryption mechanisms
The encryption mechanisms of the Oracle and IBM JDKs are not identical. Switching from one to another will make your encrypted password obsolete
IBM JDK Encryption Restrictions
Some of the IBM JRE/JDK are shipped with a restriction on the encryption key size (mostly for countries outside the US); This restriction can be officially removed by downloading unrestricted policy files from IBM and overriding the existing ones:
- Register and download the unrestricted JCE policy files from the IBM website.
- Select the correct zip that matches your JAVA version.
- The downloaded zip file contains 2 jar files -
US_export_policy.jar. Backup the existing files in
$IBM_JDK_HOME/jre/lib/securityand extract the jars from the zip file to this location
- Restart Artifactory