8000 Why are migrations not always run as the root user/why does graphile-migrate require multiple users? · Issue #215 · graphile/migrate · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Why are migrations not always run as the root user/why does graphile-migrate require multiple users? #215
@FelixZY

Description

@FelixZY

Summary

My initial experimentation with grahile-migrate has had me run into a few issues with permissions (for example, see the discussion in #214 ). More specifically:

  • I'm having trouble running CREATE EXTENSION statements because they sometimes require superuser access.
  • graphile-migrate uses the DATABASE_URL credentials to apply migrations. However, the documentation explicitly uses another user than ROOT_DATABASE_URL for this connection called appuser. However, I do not want my application user to run CREATE TABLE/DROP TABLE etc..

So far, this has led to me creating a "special" graphile_migrate user with permissions to apply changes. However, given the constant permission issues, this user is essentially becoming another superuser to secure. Therefore, I'm thinking of just switching DATABASE_URL to use the same admin user as ROOT_DATABASE_URL instead.

My question is why DATABASE_URL is documented to use an appuser rather than root/postgres? Are there specific reasons graphile-migrate requires multiple users or security concerns with using the root/postgres user?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0