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 Summary
Modifier and TypeMethodDescriptionstatic booleanisManagedIdentityAuthentication(String authentication) Checks whether the given authentication value indicates managed identity.static booleanisManagedIdentityConfigured(String jdbcUrl) Checks whether managed identity authentication is configured in the given JDBC URL.static booleanisManagedIdentityConfigured(Properties hibernateProperties) Checks whether managed identity authentication is configured in the given Hibernate properties.
-
Method Details
-
isManagedIdentityConfigured
Checks whether managed identity authentication is configured in the given Hibernate properties. Detects theauthentication=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
Checks whether managed identity authentication is configured in the given JDBC URL. Parses theauthentication=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
Checks whether the given authentication value indicates managed identity.- Parameters:
authentication- the authentication type string- Returns:
- true if the value is
ActiveDirectoryManagedIdentityorActiveDirectoryMSI
-