The "Enable Token Generation via API" feature allows users to authenticate using basic authentication to generate tokens using the API. This functionality is particularly advantageous for scenarios involving automated processes where basic user credentials are utilized.
There are two methods to e this feature:
-
Artifactory UI:
-
Navigate to Administration -> Security -> General.
-
Check the option labeled Enable Token Generation via API.
-
2. Backend Configuration:
-
Access Configuration: This option can be enabled directly through the backend by modifying the access configuration.
-
Helm Installation: During a Helm-based installation, this feature can be enabled by adding the parameter allow-basic-auth: true to the values.yaml file. Below is a snippet for reference:
access: allow-basic-auth: true
Sample Artifactory values.yaml:
postgresql: enabled: true postgresqlPassword: password databaseUpgradeReady: true unifiedUpgradeAllowed: true artifactory: masterKeySecretName: masterkey-secret joinKeySecretName: joinkey-secret license: secret: artifactory-cluster-license dataKey: art.lic primary: replicaCount: 1 node: replicaCount: 1 access: enabled: true accessConfig: security: tls: false token: default-expiry: 31536000 allow-basic-auth: true
After updating the values.yaml file, perform the helm upgrade using the below command:
helm upgrade --install artifactory jfrog/artifactory -f values.yaml -n artifactory
Once this change is applied, the option should appear as enabled in the Artifactory UI.