From d887ad08c5ca90e47434f673a063922b0dd25eca Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Thu, 26 Aug 2021 12:19:44 +0100 Subject: [PATCH 1/2] 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. From 38fd73fb5b9af863a6c7530e00ed23b4ba0498cf Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Thu, 26 Aug 2021 17:23:18 +0100 Subject: [PATCH 2/2] add changeset Signed-off-by: Brian Fletcher --- .changeset/sweet-jars-travel.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/sweet-jars-travel.md diff --git a/.changeset/sweet-jars-travel.md b/.changeset/sweet-jars-travel.md new file mode 100644 index 0000000000..83fcd13623 --- /dev/null +++ b/.changeset/sweet-jars-travel.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-sonarqube': patch +--- + +Update README to show a simpler proxy configuration.