fix(docker): Fixing dev docker and quickstart (#5550)

This commit is contained in:
John Joyce 2022-08-02 15:02:01 -07:00 committed by GitHub
parent 2a18c6a2f6
commit 4e0da5de29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 8 additions and 21 deletions

View File

@ -87,7 +87,7 @@ public class AppConfigResolver implements DataFetcher<CompletableFuture<AppConfi
authConfig.setTokenAuthEnabled(_authenticationConfiguration.isEnabled());
final PoliciesConfig policiesConfig = new PoliciesConfig();
policiesConfig.setEnabled(Boolean.TRUE.equals(_authorizationConfiguration.getDefaultAuthorizer().getEnabled()));
policiesConfig.setEnabled(_authorizationConfiguration.getDefaultAuthorizer().isEnabled());
policiesConfig.setPlatformPrivileges(com.linkedin.metadata.authorization.PoliciesConfig.PLATFORM_PRIVILEGES
.stream()

View File

@ -70,4 +70,4 @@ UI_INGESTION_DEFAULT_CLI_VERSION=0.8.41
# SECRET_SERVICE_ENCRYPTION_KEY=<your-AES-encryption-key>
# Uncomment to increase concurrency across Kafka consumers
# KAFKA_LISTENER_CONCURRENCY=2
# KAFKA_LISTENER_CONCURRENCY=2

View File

@ -28,7 +28,7 @@ services:
env_file: datahub-gms/env/docker-without-neo4j.env
environment:
- DATAHUB_SERVER_TYPE=${DATAHUB_SERVER_TYPE:-quickstart}
- DATAHUB_TELEMETRY_ENABLED=${DATAHUB_TELEMETRY_ENABLED}
- DATAHUB_TELEMETRY_ENABLED=${DATAHUB_TELEMETRY_ENABLED:-true}
depends_on:
- mysql
volumes:

View File

@ -41,10 +41,6 @@ services:
- SKIP_ELASTICSEARCH_CHECK=false
- DATAHUB_SERVER_TYPE=${DATAHUB_SERVER_TYPE:-dev}
- DATAHUB_TELEMETRY_ENABLED=${DATAHUB_TELEMETRY_ENABLED:-true}
- AUTH_POLICIES_ENABLED=${AUTH_POLICIES_ENABLED}
- RANGER_AUTHORIZER_ENABLED=${RANGER_AUTHORIZER_ENABLED}
- RANGER_USERNAME=${RANGER_USERNAME}
- RANGER_PASSWORD=${RANGER_PASSWORD}
volumes:
- ./datahub-gms/start.sh:/datahub/datahub-gms/scripts/start.sh
- ./datahub-gms/jetty.xml:/datahub/datahub-gms/scripts/jetty.xml

View File

@ -32,10 +32,6 @@ services:
environment:
- DATAHUB_SERVER_TYPE=${DATAHUB_SERVER_TYPE:-quickstart}
- DATAHUB_TELEMETRY_ENABLED=${DATAHUB_TELEMETRY_ENABLED:-true}
- AUTH_POLICIES_ENABLED=${AUTH_POLICIES_ENABLED}
- RANGER_AUTHORIZER_ENABLED=${RANGER_AUTHORIZER_ENABLED}
- RANGER_USERNAME=${RANGER_USERNAME}
- RANGER_PASSWORD=${RANGER_PASSWORD}
volumes:
- ${HOME}/.datahub/plugins/:/etc/datahub/plugins
- ${HOME}/.datahub/plugins/auth/resources/:/etc/datahub/plugins/auth/resources

View File

@ -64,7 +64,7 @@ services:
- mysql
environment:
- DATAHUB_SERVER_TYPE=${DATAHUB_SERVER_TYPE:-quickstart}
- DATAHUB_TELEMETRY_ENABLED=${DATAHUB_TELEMETRY_ENABLED}
- DATAHUB_TELEMETRY_ENABLED=${DATAHUB_TELEMETRY_ENABLED:-true}
- DATASET_ENABLE_SCSI=false
- EBEAN_DATASOURCE_USERNAME=datahub
- EBEAN_DATASOURCE_PASSWORD=datahub

View File

@ -66,10 +66,6 @@ services:
environment:
- DATAHUB_SERVER_TYPE=${DATAHUB_SERVER_TYPE:-quickstart}
- DATAHUB_TELEMETRY_ENABLED=${DATAHUB_TELEMETRY_ENABLED:-true}
- AUTH_POLICIES_ENABLED=${AUTH_POLICIES_ENABLED}
- RANGER_AUTHORIZER_ENABLED=${RANGER_AUTHORIZER_ENABLED}
- RANGER_USERNAME=${RANGER_USERNAME}
- RANGER_PASSWORD=${RANGER_PASSWORD}
- DATASET_ENABLE_SCSI=false
- EBEAN_DATASOURCE_USERNAME=datahub
- EBEAN_DATASOURCE_PASSWORD=datahub

View File

@ -12,7 +12,7 @@ public class AuthorizerConfiguration {
/**
* Whether to enable this authorizer
*/
private Boolean enabled = false;
private boolean enabled;
/**
* A fully-qualified class name for the {@link Authorizer} implementation to be registered.
*/

View File

@ -8,7 +8,7 @@ public class DefaultAuthorizerConfiguration {
/**
* Whether authorization via DataHub policies is enabled.
*/
private Boolean enabled;
private boolean enabled;
/**
* The duration between policies cache refreshes.
*/

View File

@ -56,7 +56,7 @@ public class AuthorizerChainFactory {
// Extract + initialize customer authorizers from application configs.
final List<Authorizer> authorizers = new ArrayList<>(initCustomAuthorizers(ctx));
if (Boolean.TRUE.equals(configurationProvider.getAuthorization().getDefaultAuthorizer().getEnabled())) {
if (configurationProvider.getAuthorization().getDefaultAuthorizer().isEnabled()) {
this.dataHubAuthorizer.init(Collections.emptyMap(), ctx);
log.info("Default DataHubAuthorizer is enabled. Appending it to the authorization chain.");
authorizers.add(this.dataHubAuthorizer);
@ -81,8 +81,7 @@ public class AuthorizerChainFactory {
for (AuthorizerConfiguration authorizer : authorizerConfigurations) {
final String type = authorizer.getType();
// continue if authorizer is not enabled
// Boolean.FALSE.equals take care to map null to false and false to false
if (Boolean.FALSE.equals(authorizer.getEnabled())) {
if (!authorizer.isEnabled()) {
log.info(String.format("Authorizer %s is not enabled", type));
continue;
}