Fix #5275: OpenMetadata database driver should be configurable via Env (#5402)

This commit is contained in:
Sriharsha Chintalapani 2022-06-09 21:02:32 -07:00 committed by GitHub
parent 5611ed7767
commit 1923591a94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -34,5 +34,5 @@ public class AuthConfiguration {
@Getter @Setter private CustomOIDCSSOClientConfig customOidc;
@Getter @Setter private OpenMetadataJWTClientConfig openMetadataJWTClientConfig;
@Getter @Setter private OpenMetadataJWTClientConfig openMetadataJWT;
}

View File

@ -85,7 +85,7 @@ public final class OpenMetadataClientSecurityUtil {
openMetadataServerConnection.setSecurityConfig(customOIDCSSOClientConfig);
break;
case OPENMETADATA:
OpenMetadataJWTClientConfig openMetadataJWTClientConfig = authConfig.getOpenMetadataJWTClientConfig();
OpenMetadataJWTClientConfig openMetadataJWTClientConfig = authConfig.getOpenMetadataJWT();
checkAuthConfig(openMetadataJWTClientConfig, authProvider);
checkRequiredField(JWT_TOKEN, openMetadataJWTClientConfig.getJwtToken(), authProvider);
openMetadataServerConnection.setSecurityConfig(openMetadataJWTClientConfig);

View File

@ -115,12 +115,12 @@ logging:
database:
# the name of the JDBC driver, mysql in our case
driverClass: com.mysql.cj.jdbc.Driver
driverClass: ${DB_DRIVER_CLASS:com.mysql.cj.jdbc.Driver}
# the username and password
user: ${MYSQL_USER:-openmetadata_user}
password: ${MYSQL_USER_PASSWORD:-openmetadata_password}
# the JDBC URL; the database is called openmetadata_db
url: jdbc:mysql://${MYSQL_HOST:-localhost}:${MYSQL_PORT:-3306}/${MYSQL_DATABASE:-openmetadata_db}?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC
url: jdbc:${DB_SCHEME:-mysql}://${MYSQL_HOST:-localhost}:${MYSQL_PORT:-3306}/${MYSQL_DATABASE:-openmetadata_db}?allowPublicKeyRetrieval=true&useSSL=${DB_USE_SSL:-false}&serverTimezone=UTC
migrationConfiguration:
path: "./bootstrap/sql"
@ -196,6 +196,8 @@ airflowConfiguration:
clientId: ${OM_AUTH_AIRFLOW_CUSTOM_OIDC_CLIENT_ID:-""}
secretKey: ${OM_AUTH_AIRFLOW_CUSTOM_OIDC_SECRET_KEY_PATH:-""}
tokenEndpoint: ${OM_AUTH_AIRFLOW_CUSTOM_OIDC_TOKEN_ENDPOINT_URL:-""}
openMetadataJWT:
jwtToken: ${OM_AUTH_JWT_TOKEN:-""}
slackEventPublishers:
- name: "slack events"