No permissions for postgres extensions in CosmosDB for PostgreSQL

Gabriel Chaney 10 Reputation points
2023-07-06T01:27:56.67+00:00

I am using CosmosDB for PostgreSQL and I need permissions to pgcrypto pg extension with the default "citus" user but don't. I can't give myself access because I can't log in as the "postgres" user in CosmosDB for PostgreSQL. If I don't have permissions for extensions, then aren't these docs completely wrong? https://learn.microsoft.com/en-us/azure/cosmos-db/postgresql/reference-extensions

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,672 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GeethaThatipatri-MSFT 29,477 Reputation points Microsoft Employee
    2023-07-10T14:11:27.4433333+00:00

    Hi @Gabriel Chaney Let me correct my above comment on referring to the documentation

    on your first question, you can create pgcrypto by using the below command and then you should be able to use the extension.

    CREATE EXTENSION pgcrypto;
    

    Regarding your second question thanks for sharing the additional information

    User's image

    This is absolutely fine, it skipped GRANTS for all managed schemas you will never be able to connect as "postgres" user, as it's not exposed to the end user

    I hope this information helps.

    Regards

    Geetha


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.