Area: Deployment Issues
Sub-Area: Authentication and Authorization Configuration
Applies to: OSS
Issue
You enable authentication or view authorization on a self-hosted DataHub deployment with Helm. After you apply the change, METADATA_SERVICE_AUTH_ENABLED or VIEW_AUTHORIZATION_ENABLED is missing or has the wrong value in the pod environment.
You Might Be Asking
- Why doesn't VIEW_AUTHORIZATION_ENABLED appear in my GMS pod environment?
- How do I enable metadata service authentication and view authorization with Helm?
- What are the default values for METADATA_SERVICE_AUTH_ENABLED, AUTH_POLICIES_ENABLED and VIEW_AUTHORIZATION_ENABLED?
- How can I check that the settings reached the pods?
Cause
The Helm chart renders these variables from specific values under global.datahub:
-
global.datahub.metadata_service_authentication.enabledrendersMETADATA_SERVICE_AUTH_ENABLED=trueondatahub-gmsanddatahub-frontend. When it is not true, GMS getsMETADATA_SERVICE_AUTH_ENABLED=false. - On GMS,
VIEW_AUTHORIZATION_ENABLED=trueis rendered only when bothmetadata_service_authentication.enabledandview.authorization.enabledare true.
If view.authorization.enabled is not set to true, or metadata service authentication is not enabled, VIEW_AUTHORIZATION_ENABLED=true does not appear on GMS.
In OSS v1.9.0, the application defaults are:
-
METADATA_SERVICE_AUTH_ENABLED: true -
AUTH_POLICIES_ENABLED: true -
VIEW_AUTHORIZATION_ENABLED: false
The Metadata Service Authentication page calls metadata service authentication opt-in. The application default is now true. The Environment Variables Reference lists the current defaults.
Solution
- Set the Helm values in your
values.yaml:
global:
datahub:
metadata_service_authentication:
enabled: true
view:
authorization:
enabled: true
- Apply the change:
helm upgrade <release> <chart> -n <namespace> -f values.yaml
- Restart the deployments so they pick up the new configuration:
kubectl rollout restart deployment/<gms-deployment> -n <namespace>
kubectl rollout restart deployment/<frontend-deployment> -n <namespace>
- Check the environment variables on GMS:
kubectl exec -it deploy/<gms-deployment> -n <namespace> -- env | grep -E "(METADATA_SERVICE_AUTH_ENABLED|VIEW_AUTHORIZATION_ENABLED)"
You should see METADATA_SERVICE_AUTH_ENABLED=true and VIEW_AUTHORIZATION_ENABLED=true. Check the frontend the same way for METADATA_SERVICE_AUTH_ENABLED=true.
Related Documentation
- Environment Variables Reference
- Metadata Service Authentication
- Policies
- DataHub Authorization and Roles
Tags: authentication, authorization, deployment, helm, kubernetes, environment-variables, configuration, self-hosted