Private vs Public
You can choose to make your Hasura DDN API public or private.
Private
A private
Hasura DDN API is only accessible to collaborators on your project.
Queries to a private Hasura DDN API must include a special reserved header x-hasura-ddn-token
with a valid JWT token
which the Hasura console generates and regenerates every hour. Currently this token is only available in the console.
If a private
API is also set to JWT or Webhook mode, rather than noAuth
mode, queries must also include the JWT
or webhook authentication values to be successful in addition to the x-hasura-ddn-token
header.
Projects set to private
mode are not meant to be used in production.
Public
A public Hasura DDN API is accessible to everyone.
If a public
API is also set to JWT or Webhook mode, rather than noAuth
mode, queries must include the JWT or webhook
authentication values to be successful.
Queries to a public Hasura DDN API do not require the x-hasura-ddn-token
header.
If set to public
with noAuth
mode, queries do not require any authentication and the API is fully public.
Changing the API mode
DDN CLI
Set to private
mode:
ddn project set-api-access-mode private
Set to public
mode:
ddn project set-api-access-mode public
Hasura console
Click on the Settings
gear icon in the bottom left of the sidebar navigation and then the Summary
tab to access the
API access mode toggle at https://console.hasura.io/project/<your-project-id>/settings/project-summary
.