<@U06TM7M40RK> how datahub stores and retrieves secrets of ingestion source
DataHub provides a mechanism to securely store and retrieve secrets used in ingestion sources. Here’s a summary of how it works:
Storing Secrets
-
Creating Secrets: Secrets are created via the DataHub UI. Navigate to the Ingestion tab, then to the Secrets tab, and click Create new secret. You can provide a unique name for the secret along with the value to be encrypted and an optional description. This process securely stores the secret within DataHub’s storage layer.
Example:
source: type: mysql config: host_port: 'localhost:3306' database: my_db username: ${MYSQL_USERNAME} password: ${MYSQL_PASSWORD} include_tables: true include_views: true profiling: enabled: true sink: type: datahub-rest config: server: 'http://datahub-gms:8080'
In this example,
${MYSQL_USERNAME}
and${MYSQL_PASSWORD}
are placeholders for secrets that have been created and stored securely.
Retrieving Secrets
- Referencing Secrets: Once a secret is created, it can be referenced in your ingestion recipes using variable substitution. When the ingestion source executes, DataHub resolves these secrets by substituting the placeholders with their decrypted values.
Security Considerations
- Storage: Secrets are stored securely within DataHub’s storage layer and are not persisted to disk beyond execution time.
- Access Control: Only DataHub users with the
Manage Secrets
platform privilege can retrieve plaintext secret values using the GraphQL API. - Environment Variables: For production use cases, sensitive configuration values can be hidden from plain view within your ingestion recipe by using environment variables.
Example Use Case
For example, if you are integrating with Looker, you would create secrets for LOOKER_CLIENT_ID
and LOOKER_CLIENT_SECRET
and reference them in your ingestion recipe as follows:
source:
type: looker
config:
base_url: 'https://<your-looker-instance>.cloud.looker.com'
client_id: ${LOOKER_CLIENT_ID}
client_secret: ${LOOKER_CLIENT_SECRET}
Additional Resources
- <https://github.com/datahub-project/datahub/blob/master/docs/ui-ingestion.md|DataHub UI Ingestion Documentation>
- <https://github.com/datahub-project/datahub/blob/master/docs/quick-ingestion-guides/looker/configuration.md|Looker Configuration Guide>
Would you like more detailed steps or have any specific questions about this process?
Sources:
- <https://github.com/datahub-project/datahub/blob/master/docs/ui-ingestion.md|DataHub UI Ingestion Documentation>
- <https://github.com/datahub-project/datahub/blob/master/docs/quick-ingestion-guides/looker/configuration.md|Looker Configuration Guide>
- <https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/create-secret.png|Creating a Secret>
Hey there! Make sure your message includes the following information if relevant, so we can help more effectively!
- Are you using UI or CLI for ingestion?
- Which DataHub version are you using? (e.g. 0.12.0)
- What data source(s) are you integrating with DataHub? (e.g. BigQuery)
<@U06TM7M40RK> Can you help with the questions in this thread?
We’re experimenting with a new AI assistant for questions in the <#CUMUWQU66> channel to help you track down helpful resources more quickly. Keep in mind that responses may not always be spot-on; feel free to ask it follow-up questions and don’t forget to provide its responses a or so other folks in the Community know if you’re still looking for help on the topic!
Hello! I’m here to help with questions specifically about DataHub. Could you please provide more details about your query? Specifically:
- Are you using the UI or CLI for ingestion?
- Which DataHub version are you using? (e.g., 0.12.0)?
- What data source(s) are you integrating with DataHub? (e.g., BigQuery)?
This information will help me assist you more effectively. 0 button 0 button Hint: Mention @runllm in the thread for followups.
- <https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/guides/looker/looker-client-id-secret.png|Referencing Secrets> Image-1 Image-2 0 button 0 button Hint: Mention @runllm in the thread for followups.