Creating an "Admin" user that can create databases and auth with a password

(Matthew Macdonald-Wallace) #1

Hey folks, I’m new to CockroachDB and I’m struggling with the docs

I can’t find how to setup an “admin” user that can create and grant access to databases in community edition (company policy dictactes we can’t use “root” for anything, it has to be a dedicated account).

This user also must authenticate via a password over an encrypted connection (Many reasons, but the use of Ansible as our configuration management solution is one of them - it insists on a password as part of the postgres_* providers!), but I’m starting to think that’s not how CockroachDB works!

Is anyone able to point me in the right direction for setting up a user like this?

(Ron Arévalo) #2

Hey @mbcosultinguk,

By default the only admin user is root, we do have a feature which allows you to add users to the admin role, however this is an enterprise feature only. You can read more about it here.

Please let me know if you have any other questions.

Thanks,

Ron

(Matthew Macdonald-Wallace) #3

Thanks, I couldn’t see how to set a password for the root user, only cert-based auth. Is it possible to set the “root” password?

(Jesse) #4

Hi @mbcosultinguk. It’s not possible to use use password auth with root. Only cert-based auth is allowed in that case. Since root is required to create a database, and ansible doesn’t support password-based auth, I don’t see a clear workaround. But I’ve asked @rolandcrosb, the Product Manager for this area of our product, to investigate further. He’ll post if he finds anything.