You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -17,6 +17,8 @@ PostgREST's built-in Row Level Security based on users JWT relies either on [rol
17
17
18
18
Due to connection pooling, Serverless SQL Databases currently only support transaction-scoped settings and requires using a single PostgreSQL role for all queries (the internal `role_readwrite` in PostgreSQL).
19
19
20
+
<Macroid="requirements" />
21
+
20
22
- A Scaleway account logged into the [console](https://console.scaleway.com)
21
23
-[Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization
22
24
-[Created a Serverless SQL Database](/serverless/sql-databases/how-to/create-a-database/)
Row-Level Security is a database security mechanism that allows access only to specific rows of a table based on a user's role or permissions.
17
17
18
-
RowLevel Security can be actived with Serverless SQL Databases for a maximum of two different roles, having both read and write permissions. This can be used to restrict access to a subset of users with frameworks or tools such as [PostgREST](https://docs.postgrest.org/en/v12/).
18
+
Row-Level Security can be activated with Serverless SQL Databases for a maximum of two different roles, having both read and write permissions. This can be used to restrict access to a subset of users with frameworks or tools such as [PostgREST](https://docs.postgrest.org/en/v12/).
19
19
20
20
This requires setting up different [IAM permissions sets](/identity-and-access-management/iam/reference-content/permission-sets/) for each role (**ServerlessSQLDatabaseFullAccess** or **ServerlessSQLDatabaseReadWrite** for one role, and **ServerlessSQLDatabaseDataReadWrite** for the other).
21
21
@@ -38,7 +38,7 @@ This requires setting up different [IAM permissions sets](/identity-and-access-m
38
38
INSERT INTO pets VALUES ('Stuart','role_admin',1),('Nemo','role_admin',2),('Alfie','role_readwrite',3),('Peanut','role_readwrite',4);
39
39
```
40
40
41
-
3. Run the command below to enable **RowLevel Security**:
41
+
3. Run the command below to enable **Row-Level Security**:
42
42
```sql
43
43
ALTERTABLE pets ENABLE row level security;
44
44
```
@@ -55,7 +55,7 @@ This requires setting up different [IAM permissions sets](/identity-and-access-m
55
55
All the data contained in the database displays, as you are connected with `role_admin`.
56
56
57
57
<Messagetype="tip">
58
-
You can verify the current role your are connected with using the following command:
58
+
You can verify the current role you are connected with using the following command:
59
59
```sql
60
60
SELECTcurrent_user;
61
61
```
@@ -83,7 +83,7 @@ This requires setting up different [IAM permissions sets](/identity-and-access-m
83
83
Only the pets with a `keeper` column value of `role_readwrite` display. Your new application can now only access a specific subset of rows based on its permissions.
84
84
85
85
<Messagetype="tip">
86
-
Rowlevel security and policies can be created or deleted by a table owner. In this example, you can check table owner with the following command:
86
+
Row-level security and policies can be created or deleted by a table owner. In this example, you can check the table owner with the following command:
0 commit comments