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

Regex in conf file table name ? #306

Open
sylviefiat opened this Issue Jun 19, 2018 · 3 comments

Comments

3 participants
@sylviefiat

sylviefiat commented Jun 19, 2018

  • pREST version (or commit ref): v0.3.0 docker image used is tagged "latest" build tag is "bqytgrmsvgssx5knetvabq8" but there is no commit ref sorry
  • pREST endpoint: intern
  • PostgreSQL version: 9.6.3
  • Operating system: Centos 7
  • Go version: none
  • Log gist:

Description

Hi, I would like to limit access to certain type of tables to READ only so I tried to pass a regex to table name in access configuration in conf file prest.toml.. I have tried multiple things with no luck

[access]
restrict = true  # can access only the tables listed below

    [[access.tables]]
    name = 'TABLE_PREFIX_*'
    permissions = ["read"]
    fields = ["id","name"] 

Is there a way to do that ?
Thanks

@felipeweb

This comment has been minimized.

Member

felipeweb commented Jun 19, 2018

@sylviefiat

This comment has been minimized.

sylviefiat commented Jun 19, 2018

I tried using * for all with not luck either is it this syntax :

 [access]
 restrict = true  # can access only the tables listed below

   [[access.tables]]
    name = '*'
    permissions = ["read"]
    fields = ["id","name"] 

Otherwise do you have guidelines to open a feature request ?

@felipeweb

This comment has been minimized.

Member

felipeweb commented Jun 19, 2018

@avelino avelino added the question label Jun 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment