Skip to content

Commit

Permalink
SONAR-24062 Remove documentation link from migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Nolwenn-cadic-sonarsource authored and sonartech committed Jan 7, 2025
1 parent 970efd7 commit 8497758
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ void execute_whenSignatureEnabledAndCertificateAndPrivateKey_doesNothing() throw
void execute_whenSignatureNotEnabledAndPrivateKeyAndNoCertificate_warns() throws Exception {
definePrivateKey();
underTest.execute();
assertThat(logTester.logs()).containsExactly("We detected an invalid SAML configuration that will prevent users to login with SAML: Service provider certificate is needed to decrypt SAML response." +
" Please refer to the documentation for more information: https://docs.sonarsource.com/sonarqube-server/2025.1/instance-administration/authentication/saml/overview/");
assertThat(logTester.logs()).containsExactly("We detected an invalid SAML configuration that will prevent users to login with SAML: Service provider certificate is needed to decrypt SAML response.");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ public class LogMessageIfInvalidSamlSetup extends DataChange {
@VisibleForTesting
static final String SERVICE_PROVIDER_PRIVATE_KEY = "sonar.auth.saml.sp.privateKey.secured";

private static final String SAML_DOC_URL = "https://docs.sonarsource.com/sonarqube-server/2025.1/instance-administration/authentication/saml/overview/";

public LogMessageIfInvalidSamlSetup(Database db) {
super(db);
}
Expand All @@ -63,8 +61,7 @@ protected void execute(Context context) throws SQLException {
// With oneLogin library, setting the private key was enough to decrypt the response
// With Spring security, both the private key and the certificate are needed to decrypt the response
if (serviceProviderPrivateKey && !serviceProviderCertificate) {
LOG.warn("We detected an invalid SAML configuration that will prevent users to login with SAML: Service provider certificate is needed to decrypt SAML response. " +
"Please refer to the documentation for more information: {}", SAML_DOC_URL);
LOG.warn("We detected an invalid SAML configuration that will prevent users to login with SAML: Service provider certificate is needed to decrypt SAML response.");
}
}

Expand Down

0 comments on commit 8497758

Please sign in to comment.