Hi. We tried to enable Token-based authentication ...
# troubleshoot
e
Hi. We tried to enable Token-based authentication today, so we needed to add token to ingest recipies, if I understand correctly from documentation. I generated a token and added this to recipe:
sink:
type: datahub-rest
config:
server: '<https://datahub-stage.XXX.XX/gms>'
token: '<[my token]!>'
But I still get autharization error in ingest logs:
Copy code
'[2023-02-17 14:50:02,607] INFO    {datahub.ingestion.run.pipeline:196} - Source configured successfully.\n'
           '[2023-02-17 14:50:02,609] INFO    {datahub.cli.ingest_cli:120} - Starting metadata ingestion\n'
           '[2023-02-17 14:50:02,724] ERROR   {datahub.ingestion.run.pipeline:62} - failed to write record with workunit '
           "urn:li:container:ba0a76bc8027a651a2a4c28d02d447d8-containerProperties with ('Unable to emit metadata to DataHub GMS', {'message': '401 "
           "Client Error: Unauthorized for url: <https://datahub-stage.XXX.XX/gms/aspects?action=ingestProposal>', 'id': "
           "'urn:li:container:ba0a76bc8027a651a2a4c28d02d447d8'}) and info {'message': '401 Client Error: Unauthorized for url: "
           "<https://datahub-stage.XXX.XX/gms/aspects?action=ingestProposal>', 'id': 'urn:li:container:ba0a76bc8027a651a2a4c28d02d447d8'}\n"
           '[2023-02-17 14:50:02,730] ERROR   {datahub.ingestion.run.pipeline:62} - failed to write record with workunit '
           "urn:li:container:ba0a76bc8027a651a2a4c28d02d447d8-status with ('Unable to emit metadata to DataHub GMS', {'message': '401 Client Error: "
           "Unauthorized for url: <https://datahub-stage.XXX.XX/gms/aspects?action=ingestProposal>', 'id': "
           "'urn:li:container:ba0a76bc8027a651a2a4c28d02d447d8'}) and info {'message': '401 Client Error: Unauthorized for url: "
What am I doing wrong? PS. We're on 0.9.6.1 if it's relevant
s
I did this yesterday for querying GQL. Just to make sure, u did set
METADATA_SERVICE_AUTH_ENABLED=true
on both
datahub-gms
and
datahub-frontend-react
right?
e
Just asked our DevOps - yes, it was set on both
okay, problem solved, I made a really stupid mistake in the recipe, it works now 😅