1

I have a doubt about superusers and single-user mode.

I want to restrict the access to a certain database, in a way that only those users which I gave privileges can see the structure of my database. To achieve that, I had to erase the superuser, since it bypasses all permission checks. But then I found that if I have access to the computer, I can enter in "single-user mode" and grant superuser privileges or even creating new users.

My question

Can I disallow permanently the use of superusers and single-user mode?

asked Jul 11, 2019 at 20:04
1
  • 1
    Why do people have access to the server? Why do non DBAs have the superuser's passeord? Commented Jul 11, 2019 at 20:28

1 Answer 1

2

You will find that you need superuser access for certain tasks, e.g. CREATE EXTENSION.

Vieving database metadata is not a security problem. Just because you know that there is a column with credit card data doesn't get you any closer to accessing it.

There is no way to keep somebody with shell access as PostgreSQL OS user from doing anything they want. Whoever can read the data files has access to all information.

Rather than spending effort on breaking PostgreSQL, invest in proper security:

  • Restrict shell access to the database machine.

  • Don't allow remote superuser access.

  • Encrypt connections.

  • Use an external, centralized authentication provider.

  • Grant object permissions as restrictive as possible.

answered Jul 11, 2019 at 21:25
1
  • Thank you very much for your answer and advise. It has really clarify my doubt. Commented Jul 12, 2019 at 15:41

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.