Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public CompletableFuture<AppConfig> get(final DataFetchingEnvironment environmen
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()
Expand Down
2 changes: 1 addition & 1 deletion docker/datahub-gms/env/docker.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docker/docker-compose-without-neo4j.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions docker/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions docker/quickstart/docker-compose.quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected AuthorizerChain getInstance() {
// 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);
Expand All @@ -81,8 +81,7 @@ private List<Authorizer> initCustomAuthorizers(AuthorizerContext ctx) {
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;
}
Expand Down