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

allow changing unauthorized-role flag #597

Open
xmlking opened this issue Dec 10, 2024 · 2 comments
Open

allow changing unauthorized-role flag #597

xmlking opened this issue Dec 10, 2024 · 2 comments

Comments

@xmlking
Copy link
Contributor

xmlking commented Dec 10, 2024

As per documentation here: Unauthenticated request definitions, we can use hasura environment variable to customize unauthorized role.

For example, if I want to grant SELECT permission of specific table to Unauthenticated users, we need to define permissions to a unauthorized role ( let's say incognito )

Then set HASURA_GRAPHQL_UNAUTHORIZED_ROLE or the --unauthorized-role to incognito for graphql-engine server.

currently HASURA_GRAPHQL_UNAUTHORIZED_ROLE=public preset in generated docker-compose.yaml by nhost cli and not customizable.

would be nice if we can customizable this flag in nhost.toml

[hasura.settings]
corsDomain = ['*']
devMode = true
unauthorizedRole = 'incognito'
@dbarrosop
Copy link
Member

dbarrosop commented Dec 16, 2024

Hello, thanks for the request, what is the difference between calling the role public or incognito though? what is the use case to be able to change the name?

@xmlking
Copy link
Contributor Author

xmlking commented Dec 16, 2024

  1. Not much deference , it would help retain consistency across environments. I actually want to use public, but be explicit
  2. My usecase Will be for store public data like : pricing data, blog comments, contact-us data etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants