Solution

ARTIFACTORY: How to Resolve the "Public Key Retrieval is Not Allowed" error in Artifactory when configuring MySQL Database

AuthorFullName__c
Kajaal R
articleNumber
000006112
ft:sourceType
Salesforce
FirstPublishedDate
2024-05-30T11:09:13Z
lastModifiedDate
2024-05-30
VersionNumber
1
To resolve this issue, you need to modify the jdbc url in the system.yaml file located in the $JFROG_HOME/var/etc directory as mentioned below

Step 1: Open your system.yaml file(present in $JFROG_HOME/var/etc)
Step 2: Add the properties, “allowPublicKeyRetrieval=true” and “useSSL=false” to the jdbc url as shown below

User-added image

These settings will permit the client to request the public key from the server automatically. However, be aware that enabling allowPublicKeyRetrieval could expose your system to MITM attacks, as it allows a potentially malicious proxy to intercept and retrieve the plaintext password.

By making these changes, you should be able to establish a connection between Artifactory and your MySQL database without encountering the public key retrieval error. When you enable this option, please always make sure that your network and environment are secure.

Note: Enabling TLS in the database is recommended to avoid having this issue. Enabling TLS also eliminates the need to set `allowPublicKeyRetrieval=true`.