Class ManagedIdentityConfigHelper

java.lang.Object
com.atlassian.confluence.persistence.ManagedIdentityConfigHelper

@Internal @ReturnValuesAreNonnullByDefault public final class ManagedIdentityConfigHelper extends Object
Helper for detecting SQL Server Managed Identity (MSI) authentication configuration. Managed identity is detected solely from the JDBC URL — specifically the authentication=ActiveDirectoryManagedIdentity (or ActiveDirectoryMSI) parameter. This is because the Microsoft SQL Server JDBC driver requires the authentication type to be specified in the URL to trigger the correct connection handshake; passing it as a separate JDBC connection property is not sufficient.
Since:
9.2.21
  • Method Details

    • isManagedIdentityConfigured

      public static boolean isManagedIdentityConfigured(Properties hibernateProperties)
      Checks whether managed identity authentication is configured in the given Hibernate properties. Detects the authentication= parameter from the JDBC URL (hibernate.connection.url).
      Parameters:
      hibernateProperties - the Hibernate connection properties
      Returns:
      true if the JDBC URL indicates managed identity authentication
    • isManagedIdentityConfigured

      public static boolean isManagedIdentityConfigured(String jdbcUrl)
      Checks whether managed identity authentication is configured in the given JDBC URL. Parses the authentication= parameter from the URL.
      Parameters:
      jdbcUrl - the JDBC connection URL (may be null or blank)
      Returns:
      true if the URL indicates managed identity authentication
    • isManagedIdentityAuthentication

      public static boolean isManagedIdentityAuthentication(String authentication)
      Checks whether the given authentication value indicates managed identity.
      Parameters:
      authentication - the authentication type string
      Returns:
      true if the value is ActiveDirectoryManagedIdentity or ActiveDirectoryMSI