0

Here is information about our technical environment:

  • Hasura GraphQL Current server version: v2.6.2-pro.1
  • Hasura CLI version 2.15.0
  • We log onto the Hasura GraphQL Web UI Console using our Windows Active Directory Login (essentially Single-SignOn SSO) (therefore, we do not have an admin secret)

However, the official Hasura GraphQL Technical Tutorial Guide only gives examples showing the admin secret being supplied in the Hasura CLI command line console arguments (https://hasura.io/docs/latest/migrations-metadata-seeds/migrations-metadata-setup/)

hasura init demo-project --endpoint https://docs-demo.hasura.app --admin-secret mySecret

How can I go about using Hasura CLI to export metadata via Windows Active Directory Login? (I would be interested in Hasura CLI command line examples).

halfer
  • 19,824
  • 17
  • 99
  • 186
crazyTech
  • 1,379
  • 3
  • 32
  • 67

1 Answers1

1

as of now you’ll have to set an admin secret via environment variables and use that via the CLI. Please file a feature request via Github if you need this so we can get it tracked and prioritized.

Arjun Yelamanchili
  • 577
  • 1
  • 3
  • 16
  • However, our DevOps Platform team has configured our Hasura GraphQL Web UI Console in such a way that Only Windows Active Directory Login (essentially Single-SignOn SSO) works ( i.e, No --admin-secret ) – crazyTech Nov 09 '22 at 15:26
  • 1
    You would set the admin secret via the `HASURA_GRAPHQL_ADMIN_SECRET` environment variable on Hasura. As of now you'd need an admin secret to do the CLI command. You can also export the metadata via the Console but thats not the same as the init command https://hasura.io/docs/latest/migrations-metadata-seeds/manage-metadata/#export-metadata – Arjun Yelamanchili Nov 09 '22 at 15:46
  • However, in order to execute "hasura metadata export" , Would I need to some how provide some sort of login credentials so that we can log on to our Hasura GraphQL Server ( via the endpoint url )? ( Essentially, providing some kind of Windows Active Directory Login credentials. ) How would I do that? – crazyTech Nov 09 '22 at 15:52
  • 1
    You can use the console to export and import metadata, this link has a console tab you can click https://hasura.io/docs/latest/migrations-metadata-seeds/manage-metadata/#export-metadata – Arjun Yelamanchili Nov 09 '22 at 15:55
  • @crazyTech I've been told we have something called personal access tokens https://hasura.io/docs/latest/api-reference/cloud-api-reference/#authentication that you can use to login to the pro console, it may be be able to allow exporting metadata as well https://hasura.io/docs/latest/hasura-cli/hasurapro-cli/#authentication-with-the-hasura-pro-cli – Arjun Yelamanchili Nov 18 '22 at 14:55