Skip to content

Commit b0a3f6c

Browse files
committed
Update concepts-security.md
1 parent 4f3a072 commit b0a3f6c

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

articles/postgresql/flexible-server/concepts-security.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ However, the server admin account isn't part of the `azuresu` role, which has su
112112

113113

114114

115-
You can periodically audit the list of roles in your server. For example, you can connect using `psql` client and query the `pg_roles` table , which lists all the roles along with privileges such as create additional roles, create databases, replication etc.
115+
You can periodically audit the list of roles in your server. For example, you can connect using `psql` client and query the `pg_roles` table, which lists all the roles along with privileges such as create other roles, create databases, replication etc.
116116

117117
```sql
118118

@@ -134,13 +134,18 @@ oid | 24827
134134

135135
```
136136

137-
Important to note that number of **superuser only permissions**, such as creation of certain [implicit casts](https://www.postgresql.org/docs/current/sql-createcast.html), are **not available** with Azure Database for PostgreSQL - Flexible Server, since **`azure_pg_admin` role doesn't align to permissions of PostgreSQL superuser role**.
137+
> [!IMPORTANT]
138+
> Important to note that number of superuser only permissions, such as creation of certain **[binary-coercible implicit casts](https://www.postgresql.org/docs/current/sql-createcast.html)**, are not available with Azure Database for PostgreSQL - Flexible Server, since `azure_pg_admin` role doesn't align to permissions of PostgreSQL superuser role.
139+
> A **[binary-coercible cast](https://www.postgresql.org/docs/current/sql-createcast.html)** is a type of cast that does not require any function to perform the conversion, because the source and target types have the same internal representation
140+
> Non binary-coercible casts, including containing options WITH `IN OUT` and `WITH FUNCTION` are supported.
138141
139142

140143
[Audit logging in Azure Database for PostgreSQL - Flexible Server](concepts-audit.md) is also available with Azure Database for PostgreSQL - Flexible Server to track activity in your databases.
141144

142145

143146

147+
148+
144149
### Control schema access
145150

146151
Newly created databases in Azure Database for PostgreSQL - Flexible Server have a default set of privileges in the database's public schema that allow all database users and roles to create objects. To better limit application user access to the databases that you create on your Azure Database for PostgreSQL - Flexible Server instance, we recommend that you consider revoking these default public privileges. After doing so, you can then grant specific privileges for database users on a more granular basis. For example:
@@ -186,7 +191,7 @@ In this example, user *user1* can connect and has all privileges in our test dat
186191
### Public schema ownership changes in PostgreSQL 15
187192

188193
From Postgres version 15, ownership of the public schema has been changed to the new pg_database_owner role. It enables every database owner to own the database’s public schema.
189-
More information can be found in [PostgreSQL release notes](https://www.postgresql.org/docs/release/15.0/)
194+
More information can be found in [PostgreSQL release notes.](https://www.postgresql.org/docs/release/15.0/)
190195

191196
### PostgreSQL 16 changes with role based security
192197

@@ -223,7 +228,7 @@ You can drop a row security policy by using DROP POLICY command, as in his examp
223228

224229
DROP POLICY account_managers ON accounts;
225230
```
226-
Although you may have have dropped the policy, role manager is still not able to view any data that belong to any other manager. This is because the row-level security policy is still enabled on the accounts table. If row-level security is enabled by default, PostgreSQL uses a default-deny policy. You can disable row level security, as in example below:
231+
Although you may have dropped the policy, role manager is still not able to view any data that belong to any other manager. This is because the row-level security policy is still enabled on the accounts table. If row-level security is enabled by default, PostgreSQL uses a default-deny policy. You can disable row level security, as in example below:
227232

228233
```sql
229234
ALTER TABLE accounts DISABLE ROW LEVEL SECURITY;
@@ -234,8 +239,8 @@ ALTER TABLE accounts DISABLE ROW LEVEL SECURITY;
234239

235240
PostgreSQL has **BYPASSRLS** and **NOBYPASSRLS** permissions, which can be assigned to a role; NOBYPASSRLS is assigned by default.
236241
With **newly provisioned servers** in Azure Database for PostgreSQL - Flexible Server bypassing row level security privilege (BYPASSRLS) is implemented as follows:
237-
* For Postgres 16 and above versioned servers we follow [standard PostgreSQL 16 behavior](#postgresql-16-changes-with-role-based-security). Non-administrative users created by **azure_pg_admin** administrator role allows you to create roles with BYPASSRLS attribute\privilege as necessary.
238-
* For Postgres 15 and below versioned servers. , you can use **azure_pg_admin** user to do administrative tasks that require BYPASSRLS privilege, but can't create non-admin users with BypassRLS privilege, since administrator role has no superuser privileges, as common in cloud based PaaS PostgreSQL services.
242+
* For Postgres 16 and above versioned servers we follow [standard PostgreSQL 16 behavior](#postgresql-16-changes-with-role-based-security). Nonadministrative users created by **azure_pg_admin** administrator role allows you to create roles with BYPASSRLS attribute\privilege as necessary.
243+
* For Postgres 15 and below versioned servers. , you can use **azure_pg_admin** user to do administrative tasks that require BYPASSRLS privilege, but can't create nonadmin users with BypassRLS privilege, since administrator role has no superuser privileges, as common in cloud based PaaS PostgreSQL services.
239244

240245

241246
## Update passwords

0 commit comments

Comments
 (0)