Re: GRANT CONNECT ON DATABASE

Поиск
Список
Период
Сортировка
От Norbert Poellmann
Тема Re: GRANT CONNECT ON DATABASE
Дата
Msg-id ZmbcriGHk23NPkMN@mail.ibu.de
обсуждение исходный текст
Ответ на GRANT CONNECT ON DATABASE  (Edwin UY <edwin.uy@gmail.com>)
Ответы Re: GRANT CONNECT ON DATABASE
Список pgsql-admin
On Mon, Jun 10, 2024 at 12:09:14PM +1200, Edwin UY wrote:
> Hi,
> 
> A role was created as below:
> CREATE ROLE [blah] WITH NOLOGIN NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE
> NOREPLICATION VALID UNTIL 'infinity';
> 
> Doesn't the following SQLs supposed to give the role login access?
> 
> ALTER ROLE [blah] WITH ENCRYPTED PASSWORD 'blahpassword' ;
> GRANT CONNECT ON DATABASE [blahdb] TO [blahuser] ;
> 
> We're trying to take the minimalist approach for a user access to have
> access to only the tables he has created and only to a specific database
> and schema.

Hi, 

I would suggest, additionally, the strictest doorman for your database 
is a record in ${data_directory}/pg_hba.conf, example:

# TYPE  DATABASE        USER            ADDRESS                 METHOD
hostssl   blahdb       blahuser       1.2.3.4/32            scram-sha-256

changes followed by a server reload.

cheers
Norbert Poellmann

> 
> Regards,
> Ed



В списке pgsql-admin по дате отправления:

Предыдущее
От: Muhammad Ikram
Дата:
Сообщение: Re: How to find the view modified date and time and user name
Следующее
От: Edwin UY
Дата:
Сообщение: Re: GRANT CONNECT ON DATABASE