From d887ad08c5ca90e47434f673a063922b0dd25eca Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Thu, 26 Aug 2021 12:19:44 +0100 Subject: [PATCH] proxy backend to take care of encoding sonar token Signed-off-by: Brian Fletcher --- plugins/sonarqube/README.md | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/plugins/sonarqube/README.md b/plugins/sonarqube/README.md index d0251e91ef..87242f6788 100644 --- a/plugins/sonarqube/README.md +++ b/plugins/sonarqube/README.md @@ -45,10 +45,9 @@ proxy: '/sonarqube': target: https://sonarcloud.io/api allowedMethods: ['GET'] - headers: - Authorization: Basic ${SONARQUBE_AUTH} - # Content: 'base64(":")' <-- note the trailing ':' - # Example: bXktYXBpLWtleTo= + auth: '${SONARQUBE_TOKEN}:' + # Environmental variable: SONARQUBE_TOKEN + # Fetch the sonar-auth-token from https://sonarcloud.io/account/security/ ``` **SonarQube** @@ -58,20 +57,15 @@ proxy: '/sonarqube': target: https://your.sonarqube.instance.com/api allowedMethods: ['GET'] - headers: - Authorization: Basic ${SONARQUBE_AUTH} - # Environmental variable: SONARQUBE_AUTH - # Value: 'base64(":")' - # Encode the ":" string using base64 encoder. - # Note the trailing colon (:) at the end of the token. - # Example environmental config: SONARQUBE_AUTH=bXktYXBpLWtleTo= - # Fetch the sonar-auth-token from https://sonarcloud.io/account/security/ + auth: '${SONARQUBE_TOKEN}:' + # Environmental variable: SONARQUBE_TOKEN + # Fetch the sonar-auth-token from https://sonarcloud.io/account/security/ sonarQube: baseUrl: https://your.sonarqube.instance.com ``` -4. Get and provide `SONARQUBE_AUTH` as an env variable (https://sonarcloud.io/account/security or https://docs.sonarqube.org/latest/user-guide/user-token/) +4. Get and provide `SONARQUBE_TOKEN` as an env variable (https://sonarcloud.io/account/security or https://docs.sonarqube.org/latest/user-guide/user-token/) 5. Run the following commands in the root folder of the project to install and compile the changes.