Skip to content

Can not configure custom authorization at pg_hba.conf because of more global rule #1132

@EugenKon

Description

@EugenKon

docker-entrypoint.sh sets up host all all all scram-sha-256 into pg_hba.conf file.

printf 'host all all all %s\n' "$POSTGRES_HOST_AUTH_METHOD"

For my database located in trusted network I wan to configure trusted authentication, but can not, because first list matched first:

...
host all all all scram-sha-256
host db user 172.16.0.0/12 trust

My /docker-entrypoint-initdb.d/000-trust.sh script is:

echo "host db user 172.16.0.0/12 trust" >> "${PGDATA}/pg_hba.conf"

It would be nice if this catch-all rule you will add later after processing init files

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