<@U0A71G31CDV> I wanna hash auditloader pass and h...
# questions-and-troubleshooting
z
@Rocky I wanna hash auditloader pass and how to do it remind me
r
To encrypt (hash) the password for the AuditLoader plugin in StarRocks, you use the
AES_ENCRYPT
function. This allows you to avoid storing the password in plaintext within the
plugin.conf
file. Steps to encrypt the password: 1. Generate the encrypted string: Run the following SQL command in StarRocks, replacing
your_password
with your actual password and
your_secret_key
with a custom key (maximum 16 bytes):
Copy code
sql
    SELECT TO_BASE64(AES_ENCRYPT('your_password','your_secret_key'));
Copy the resulting string. 2. Modify
plugin.conf
: Locate the
plugin.conf
file within your
auditloader.zip
package and update the following fields: * `secret_key`: Set this to the secret key you used in the SQL command above. * `password`: Paste the encrypted string (the output from the SQL command). 3. Re-package and Re-install: * Zip the files back into
auditloader.zip
. * If the plugin is already installed, you must uninstall it first:
UNINSTALL PLUGIN AuditLoader;
. * Install it again using the updated package:
Copy code
sql
        INSTALL PLUGIN FROM "/path/to/auditloader.zip";
Important Note: If the
secret_key
parameter is left empty in
plugin.conf
, AuditLoader will treat the
password
field as plaintext. Once you provide a
secret_key
, it expects the password to be encrypted using the method above method. References • administration/management/audit_loader.md • loading/Flink-connector-starrocks.md • administration/management/FE_configuration.md