Hello everyone, We have deployed Datahub v0.8.41 u...
# all-things-deployment
e
Hello everyone, We have deployed Datahub v0.8.41 using Kubernetes and we would like to customize the default datahub user login credentials. We found the information related linked here. However, we were wondering if there is any documentation about how to proceed with it in Kubernetes. Thank you in advance!
1
a
I have the same question too.
only thing that change here is
user.props
file will have entry for datahub user like
datahub:<new password>
and
mountPath: /etc/datahub/plugins/frontend/auth/user.props
changes to
mountPath: /datahub-frontend/conf/user.props
in value.yaml
e
Thanks for the answer @bumpy-needle-3184. Do I need to update the
extraVolumeMounts
section in
chart/datahub-frontend/values.yaml
and then deploy again? I tried before to update
user.props
using
kubectl cp
but it didn't work
b
yes
e
Hi again Navin, thanks for your time. However, I'm facing some difficulties with your suggestion. I encountered the following error while updating the
values.yaml
Copy code
cannot patch "datahub-datahub-frontend" with kind Deployment: Deployment.apps "datahub-datahub-frontend" is invalid: spec.template.spec.containers[0].volumeMounts[0].name: Not found: "pass"
And here is the edition I made in the file:
Copy code
extraVolumes: []
  # - name: extras
  #   emptyDir: {}

extraVolumeMounts:
   - name: pass
     mountPath: /datahub-frontend/conf/user.props
     readOnly: true
Thank you in advance!
b
the error says you need to define volume with name "paas" first which you can then mount in mountPath. i see there is no volume defined under "extraVolumes"
the idea is to create secret containing datahub user and password , define volume using that secret under
extraVolumes
and mount that volume at path /datahub-frontend/conf/user.props under
extraVolumeMounts
e
Thanks for the tip, Navin. Now, I'm a bit lost about the secret, do you mean to create a kubectl secret? I tried to replace the
user.props
manually by the command
kubectl cp
but it didn't works. I'm sorry for all the questions but this is kinda new for me 😅
a
@bumpy-needle-3184 I tried the steps here. Now my new password worked, but the old datahub/datahub also still worked. How can we get rid of the old username/password combo? Below is what I have done. 1. Create a yaml values file with below content
Copy code
datahub-frontend:
  extraVolumes:
    - name: datahub-users
      secret:
        defaultMode: 0444
        secretName: datahub-users-secret
  extraVolumeMounts:
    - name: datahub-users
      mountPath: /etc/datahub/plugins/frontend/auth/user.props
      subPath: user.props
2. Run helm upgrade on an existing release.
Copy code
helm upgrade datahub datahub/datahub --values <path to the values.yaml file above>
3. Confirmed that the secret is stored correctly. Redacted the actual password and its hash.
Copy code
$ kubectl get secret datahub-users-secret -o jsonpath='{.data}'
{"user.props":"XXXXX"}

$ echo 'XXXXX' | base64 --decode
datahub:XXXXX
I just tried to uninstall and then reinstall
prerequisites
and
datahub
with the custom values file and got the same result.
b
Thanks @able-evening-90828 for sharing detailed steps
one thing, i would like to correct in above value.yaml file is that you need to change
mountPath: /etc/datahub/plugins/frontend/auth/user.props
to
mountPath:/datahub-frontend/conf/user.props
Copy code
datahub-frontend:
  extraVolumes:
    - name: datahub-users
      secret:
        defaultMode: 0444
        secretName: datahub-users-secret
  extraVolumeMounts:
    - name: datahub-users
      mountPath: /datahub-frontend/conf/user.props
      subPath: user.props
default 'datahub' user is created and stored in config file
/datahub-frontend/conf/user.props
, so this is the file that we are trying to overwrite. https://datahubproject.io/docs/authentication/guides/add-users/#changing-the-default-datahub-user
a
Thank you @bumpy-needle-3184! I can confirm that it worked well. I was also able to change the default username to something else other than
datahub
. Afterwards, only my new username/password combo worked. However, when I logged in using the new username, the settings page still shows the username for the DataHub user to be
datahub
, which is confusing. I expected to see the username I chose.
e
Thank you both @bumpy-needle-3184 and @able-evening-90828, I tested on my side too and it worked.
teamwork 1
b
i think default username is hard-coded to be 'datahub'. @square-activity-64562 could you confirm on this ?
s
The user list has nothing to do with the login user name for JaaS based authentication (user.props). The user list shows metadata for users who are ingested. In case you ingested sample data that must have added the datahub user. You can delete it by urn
a
Thank you @square-activity-64562, I didn't ingest any users. So it must be bootstrapped automatically somewhere. Any pointers for where this bootstrapping takes place?
@bumpy-needle-3184 I just noticed that the new default root account cannot invite new users. The "Invite Users" button on the settings page is grayed out. Do you know what configuration I need to do to enable it?