subzerocloud / subzero-cli

Tooling to aid development of subZero/PostgREST based backend APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing authenticator role when generating init migration script using subzero

kamimanzoor opened this issue · comments

Hi,

I am using postgres-starter-kit and it seems like authenticator role gets missing when I try to generate init migration script via subzero. The script only creates anonymous, api and webuser roles. However, the role membership section does seem to use authenticator role which makes the init script to fail while executing.
Steps to reproduce:

  • executing subzero-base-project and choosing postgres-starter-kit
  • executing the stack using docker-compose up -d
  • generating init script using: subzero-migrations init --with-roles --with-privileges --debug
    image

@ruslantalpa could you please have a look into the above issue as it is hindering in my POC?

this is the intended behavior.
authenticator role is a special case since it's the user used by postgrest to login to the database (needs a password) and as such, can not be contained in a migration file.

you need to create that user manually in your database.

@ruslantalpa makes sense. Thanks a lot for your prompt response. On a side note, it seems like the subzero documentation such as https://docs.subzero.cloud/managing-migrations/ needs to be updated since the commands are missing flags like --with-privileges and it could take quite some time for someone who is following the mentioned tutorial :)

yes, i added some improvements but did not get to document them,
some comments on the reasoning and the features here #55