From 7223a51e56b0449fab57d827b978efb6a629936d Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Thu, 5 Jun 2025 10:57:15 +0200 Subject: [PATCH 1/4] fix(sdb): add missing permissions set MTA-6105 --- .../how-to/manage-permissions.mdx | 58 +++++++++++-------- .../troubleshooting/connection-errors.mdx | 5 +- 2 files changed, 38 insertions(+), 25 deletions(-) diff --git a/pages/serverless-sql-databases/how-to/manage-permissions.mdx b/pages/serverless-sql-databases/how-to/manage-permissions.mdx index c0e16fb56a..aa45200a90 100644 --- a/pages/serverless-sql-databases/how-to/manage-permissions.mdx +++ b/pages/serverless-sql-databases/how-to/manage-permissions.mdx @@ -19,6 +19,7 @@ Permissions define the actions a user or an application can perform on a databas - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- Created a [Serverless SQL Database](/serverless-sql-databases/how-to/create-a-database/) 1. Click **IAM & API keys** on the top-right drop-down menu of the Scaleway console. The **Users** tab of the [Identity and Access Management dashboard](https://console.scaleway.com/iam/users) displays. @@ -28,17 +29,17 @@ Permissions define the actions a user or an application can perform on a databas 4. Complete the steps on the first page of the creation wizard: - - Enter a **name** for the policy. + - Enter a **name** for the policy. - - Enter a **description** (optional). + - Enter a **description** (optional). - - Select a **principal**, who will be the target of your policy. The [principal](/iam/concepts/#principal) should be the user, application, or group you want to grant access to your database. + - Select a **principal**, who will be the target of your policy. The [principal](/iam/concepts/#principal) should be the user, application, or group you want to grant access to your database. - - - You can choose to create a policy without a principal for now, and attach the principal later. - - The policy will have no effect until a principal is attached. - - A policy can only be attached to one principal at a time. - + + - You can choose to create a policy without a principal for now, and attach the principal later. + - The policy will have no effect until a principal is attached. + - A policy can only be attached to one principal at a time. + 5. Click **Add rules**. The second screen of the policy creation wizard. @@ -48,28 +49,37 @@ Permissions define the actions a user or an application can perform on a databas 8. Select **Databases** in the left-hand **Products** list, then, tick the permissions set you want to add to the policy: - - **ServerlessSQLDatabaseFullAccess** allows the user to create and delete databases, edit their configuration, and use the following commands: + - **ServerlessSQLDatabaseFullAccess** allows the user to create and delete databases, edit their configuration, and use the following commands: - - `SELECT` - - `UPDATE` - - `INSERT` - - `DELETE` - - `CREATE/ALTER/DROP TABLE` - - `CREATE/DROP INDEX` + - `SELECT` + - `UPDATE` + - `INSERT` + - `DELETE` + - `CREATE/ALTER/DROP TABLE` + - `CREATE/DROP INDEX` - - **ServerlessSQLDatabaseReadWrite** allows the user to use the following commands: + - **ServerlessSQLDatabaseReadWrite** allows the user to use the following commands: - - `SELECT` - - `UPDATE` - - `INSERT` - - `DELETE` - - `CREATE/ALTER/DROP TABLE` - - `CREATE/DROP INDEX` + - `SELECT` + - `UPDATE` + - `INSERT` + - `DELETE` + - `CREATE/ALTER/DROP TABLE` + - `CREATE/DROP INDEX` - - **ServerlessSQLDatabaseReadOnly** allows the user to use the following commands: + - **ServerlessSQLDatabaseReadOnly** allows the user to use the following commands: - - `SELECT` + - `SELECT` + + - **ServerlessSQLDatabaseDataReadWrite** allows the user to use the following commands: + + - `SELECT` + - `UPDATE` + - `INSERT` + - `DELETE` 9. Click **Validate**. The **scope** and the **permission sets** of your policy display. 10. Click **Create policy** to finish. + +The user or application now has the selected permissions, and can perform the corresponding actions on the Serverless SQL Database. diff --git a/pages/serverless-sql-databases/troubleshooting/connection-errors.mdx b/pages/serverless-sql-databases/troubleshooting/connection-errors.mdx index f851ab3965..a7dbfc84a7 100644 --- a/pages/serverless-sql-databases/troubleshooting/connection-errors.mdx +++ b/pages/serverless-sql-databases/troubleshooting/connection-errors.mdx @@ -47,11 +47,14 @@ The [IAM principal](/iam/concepts/#principal) (user or application) does not hav ### Solution -[Create a new IAM policy](/iam/how-to/create-policy/) or [update an existing one](/iam/how-to/manage-policies/#how-to-edit-a-policys-rules) to grant one of the following permissions sets to the user or application: +[Grant one of the following permissions](/serverless-sql-databases/how-to/manage-permissions/) sets to the user or application: - `ServerlessSQLDatabaseReadOnly` - `ServerlessSQLDatabaseReadWrite` + - `ServerlessSQLDatabaseDataReadWrite` - `ServerlessSQLDatabaseFullAccess` +Refer to the [dedicated documentation](/serverless-sql-databases/how-to/manage-permissions/) for more information the SQL operations allowed by each permissions set. + ## ERROR: permission denied to create temporary tables/subscription in database ### Problem From 043c540e1330cc9b051071ef5e8f238de9f6305b Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Thu, 5 Jun 2025 11:05:45 +0200 Subject: [PATCH 2/4] fix(sdb): update --- pages/iam/reference-content/permission-sets.mdx | 1 + pages/serverless-sql-databases/how-to/manage-permissions.mdx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/iam/reference-content/permission-sets.mdx b/pages/iam/reference-content/permission-sets.mdx index 5a72c3c350..d0c95edcb4 100644 --- a/pages/iam/reference-content/permission-sets.mdx +++ b/pages/iam/reference-content/permission-sets.mdx @@ -71,6 +71,7 @@ Below is a list of the permission sets available at Scaleway. | ServerlessJobsReadOnly | List and read access to job definition/run | | ServerlessSQLDatabaseReadOnly| List and read access to Serverless SQL Database | | ServerlessSQLDatabaseReadWrite| List, read and write access to Serverless SQL Database. Includes data and table structure edition. Does not include permissions to create databases or edit settings | +| ServerlessSQLDatabaseDataReadWrite| Read, write, edit and delete data in Serverless SQL Database tables. Does not include data and table structure edition, creation of databases or settings edition | | ServerlessSQLDatabaseFullAccess| Full access to create, read, list, edit and delete Serverless SQL Database | | RelationalDatabasesReadOnly | List and read access to Managed Database for PostgreSQL and MySQL | | RelationalDatabasesFullAccess| Full access to create, read, list, edit and delete Managed Database for PostgreSQL and MySQL | diff --git a/pages/serverless-sql-databases/how-to/manage-permissions.mdx b/pages/serverless-sql-databases/how-to/manage-permissions.mdx index aa45200a90..bad296724c 100644 --- a/pages/serverless-sql-databases/how-to/manage-permissions.mdx +++ b/pages/serverless-sql-databases/how-to/manage-permissions.mdx @@ -71,7 +71,7 @@ Permissions define the actions a user or an application can perform on a databas - `SELECT` - - **ServerlessSQLDatabaseDataReadWrite** allows the user to use the following commands: + - **(/serverless-sql-databases/how-to/manage-permissions/)** allows the user to use the following commands: - `SELECT` - `UPDATE` From 90f3d3179cfc7a191e92e4f9f944ad7ef838a470 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 11 Jun 2025 10:44:47 +0200 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Jessica <113192637+jcirinosclwy@users.noreply.github.com> --- pages/serverless-sql-databases/how-to/manage-permissions.mdx | 2 +- .../troubleshooting/connection-errors.mdx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/serverless-sql-databases/how-to/manage-permissions.mdx b/pages/serverless-sql-databases/how-to/manage-permissions.mdx index bad296724c..a0a89a3518 100644 --- a/pages/serverless-sql-databases/how-to/manage-permissions.mdx +++ b/pages/serverless-sql-databases/how-to/manage-permissions.mdx @@ -36,7 +36,7 @@ Permissions define the actions a user or an application can perform on a databas - Select a **principal**, who will be the target of your policy. The [principal](/iam/concepts/#principal) should be the user, application, or group you want to grant access to your database. - - You can choose to create a policy without a principal for now, and attach the principal later. + - You can choose to create a policy without a principal for now and attach one later. - The policy will have no effect until a principal is attached. - A policy can only be attached to one principal at a time. diff --git a/pages/serverless-sql-databases/troubleshooting/connection-errors.mdx b/pages/serverless-sql-databases/troubleshooting/connection-errors.mdx index a7dbfc84a7..d777f77a8a 100644 --- a/pages/serverless-sql-databases/troubleshooting/connection-errors.mdx +++ b/pages/serverless-sql-databases/troubleshooting/connection-errors.mdx @@ -47,13 +47,13 @@ The [IAM principal](/iam/concepts/#principal) (user or application) does not hav ### Solution -[Grant one of the following permissions](/serverless-sql-databases/how-to/manage-permissions/) sets to the user or application: +[Grant one of the following permissions sets](/serverless-sql-databases/how-to/manage-permissions/) to the user or application: - `ServerlessSQLDatabaseReadOnly` - `ServerlessSQLDatabaseReadWrite` - `ServerlessSQLDatabaseDataReadWrite` - `ServerlessSQLDatabaseFullAccess` -Refer to the [dedicated documentation](/serverless-sql-databases/how-to/manage-permissions/) for more information the SQL operations allowed by each permissions set. +Refer to the [dedicated documentation](/serverless-sql-databases/how-to/manage-permissions/) for more information on the SQL operations allowed by each permissions set. ## ERROR: permission denied to create temporary tables/subscription in database From 6368380eabca077e2c5ce807694164510bf72d6f Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 11 Jun 2025 10:46:34 +0200 Subject: [PATCH 4/4] fix(sdb): update --- pages/serverless-sql-databases/how-to/manage-permissions.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/serverless-sql-databases/how-to/manage-permissions.mdx b/pages/serverless-sql-databases/how-to/manage-permissions.mdx index a0a89a3518..09d5f06627 100644 --- a/pages/serverless-sql-databases/how-to/manage-permissions.mdx +++ b/pages/serverless-sql-databases/how-to/manage-permissions.mdx @@ -71,7 +71,7 @@ Permissions define the actions a user or an application can perform on a databas - `SELECT` - - **(/serverless-sql-databases/how-to/manage-permissions/)** allows the user to use the following commands: + - **ServerlessSQLDatabaseDataReadWrite** allows the user to use the following commands: - `SELECT` - `UPDATE`