Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure AD/Entra authentication for passwordless connection to HASURA_GRAPHQL_DATABASE_URL using postgres databases #10228

Open
guidooliveira opened this issue May 8, 2024 · 1 comment
Labels
k/enhancement New feature or improve an existing feature s/triaged This has been reviewed by Hasura v2

Comments

@guidooliveira
Copy link

Is your proposal related to a problem?

When deploying Hasura on azure as either a container app or a Kubernetes deployment, we still have to have a username and password when connecting to postgres databases. Adding support for hasura to initialize the GRAPHQL and METADATA DBs using azure Managed Identities or Workload Identity for passwordless connections.
This would greatly simplify management of local users and passwords and their lifecycle while also improving on security.

Describe the solution you'd like

native support for Azure AD authentication using DefaultCredential (supports Workload Identity, System Assigned managed identity, azure cli, etc) for the database connection.

Describe alternatives you've considered

Proxy application that hasura connects to and handles the azure AD token lifecycle instead of hasura.
Sidecar container that writes the connectionstring to a file and refreshes it every x minutes that the hasura contrainer reads with the dynamic-file

@guidooliveira guidooliveira added the k/enhancement New feature or improve an existing feature label May 8, 2024
@manasag
Copy link
Contributor

manasag commented May 22, 2024

Hi @guidooliveira,

This is supported using the Dynamic secrets feature as documented here https://hasura.io/docs/latest/security/dynamic-secrets/ . With this feature, you can set secrets that are short lived in nature via a mounted file in Hasura container. The secret need to be a full postgres URL for it to integrate with Hasura. Some of our users have written their sidecar containers for exactly the same purpose and integrated well with this feature.

Please do note that as per documentation, the configuration for setting the file location is a bit different for Metadata Database and GraphQL database.

@manasag manasag added s/triaged This has been reviewed by Hasura v2 labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k/enhancement New feature or improve an existing feature s/triaged This has been reviewed by Hasura v2
Projects
None yet
Development

No branches or pull requests

2 participants