acryldata/datahub-helm

Create Datahub PAT programmatically

Closed this issue · 8 comments

Hi Team,

Is the given graphql API the only API currently available to generate a datahub token via API call(programmatically)? I am deploying datahub on a k8s instance and by default, since metadata_service_authentication is true in helm-chart, the graphql API to create a PAT itself fails with a 401 as in the screenshot.

Kindly let me know the answers to below queries.

  1. Is there a way to create a token via API (not via Datahub UI) even if metadata_service_authentication is set to true?
  2. If the only way to create the first Datahub token is via UI, and use that for subsequent API requests, is there any other APIs, or provision from Datahub side to ccreate at least a Basic auth clientId/secret programmatically and use that for subsequent requests to backend to ingest data, instead of a Bearer token?

I am aware that once metadata_service_authentication is set to false in helm chart, and I do a helm upgrade, there is no requirement for authentication, and hence the graphql API gives me a token as response. But I cannot use this as i need to re-enable metadata_service_authentication to true and again do helm upgarde, and in turn previous token is no longer valid.

This issue is stale because it has been open for 30 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io. For feature requests please use https://feature-requests.datahubproject.io

I am also having this same issue. I would like to run some integration tests and it's quite cumbersome to have to go through the UI to generate a token each time I spin up a test cluster.

Facing same issue. Please let us know if there's a way to create PAT while spinning up datahub in kubernetes cluster.

Do we have any progress on this issue? We have experienced it for a while now...

This issue is stale because it has been open for 30 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io. For feature requests please use https://feature-requests.datahubproject.io

People back from holidays? :)

Look for metadata_service_authentication options, in particular for system_client_secret which is documented as

The key of a secret containing the internal system secret that is used to communicate with DataHub GMS

Therefore the secret that can be used to make requests to DataHub GMS such as to create a PAT. The requests can be made using the "Basic" HTTP authentication scheme:

Authorization: Basic __datahub_system:<system_client_secret>