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
Copy file name to clipboardExpand all lines: sites/platform/src/add-services/mysql/_index.md
+20-17Lines changed: 20 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -354,7 +354,7 @@ You can configure your MySQL service in the [services configuration](/add-servic
354
354
| `schemas` | An array of `string`s | 10.0+ | All databases to be created. Defaults to a single `main` database. |
355
355
| `endpoints` | An endpoints dictionary | 10.0+ | Endpoints with their permissions. See [multiple databases](#multiple-databases). |
356
356
| `properties` | A properties dictionary | MariaDB: 10.1+; Oracle MySQL: 8.0+ | Additional properties for the database. Equivalent to using a `my.cnf` file. See [property options](#configure-the-database). |
357
-
| `rotate_passwords` | A boolean | 10.3+ | Allows disabling passwords rotation. Defaults to `true`. |
357
+
| `rotate_passwords` | A boolean | 10.3+ | Defaults to `true`. When set to `false`, [password rotation](#password-rotation) is disabled. |
358
358
359
359
Example configuration:
360
360
@@ -765,27 +765,30 @@ define custom endpoints in your [service configuration](#1-configure-the-service
765
765
For each custom endpoint you create,
766
766
you get an automatically generated password,
767
767
similarly to when you create [multiple databases](#multiple-databases).
768
-
Note that you can't customize these automatically generated passwords.
769
-
770
-
{{% note theme="warning" %}}
771
-
By default, the generated password will rotate on a regular
772
-
basis. Your applications MUST use the passwords from the
773
-
relationships, as the password _is_ going to change. Set
774
-
`rotate_passwords`to `false` if you wish to change this default
775
-
behavior.
776
-
{{% /note %}}
768
+
You cannot customize these generated passwords.
777
769
778
-
After your custom endpoints are exposed as relationships in your [app configuration](/create-apps/_index.md),
770
+
After your custom endpoints are exposed as relationships in your [app configuration](../../create-apps/_index.md),
779
771
you can retrieve the password for each endpoint
780
-
through the `{{% vendor/prefix %}}_RELATIONSHIPS` [environment variable](/development/variables/use-variables.md#use-provided-variables)
781
-
within your [application containers](/development/variables/use-variables.md#access-variables-in-your-app).
782
-
The password value changes automatically over time, to avoid downtime its value has to be read dynamically by your app.
783
-
Globally speaking, having passwords hard-coded into your codebase can cause security issues and should be avoided.
772
+
through the `{{% vendor/prefix %}}_RELATIONSHIPS` [environment variable](../../development/variables/use-variables.md#use-provided-variables)
773
+
within your [application containers](/development/variables/use-variables.md#access-variables-in-your-app).
774
+
775
+
Using this method to retrieve password credentials is considered a best practice: passwords change automatically (or [_rotate_](#password-rotation)) over time, and using incorrect passwords results in application downtime. **Avoid using hard-coded passwords in your application (and code base), which can cause security issues.**
784
776
785
777
When you switch from the default configuration with an empty password to custom endpoints,
786
778
make sure your service name remains unchanged.
787
-
Failure to do so results in the creation of a new service,
788
-
which removes any existing data from your database.
779
+
**Changing the service name creates a new service,
780
+
which removes any existing data from your database.**
781
+
782
+
## Password rotation {#password-rotation}
783
+
By default, password rotation is enabled (`rotate_passwords=true`), enabling {{% vendor/name %}} to automatically change (or _rotate_) MariaDB passwords each time it updates the MariaDB image. Password rotation also occurs as defined by any password lifetime settings in MariaDB.
784
+
785
+
Specific scenarios might warrant disabling password rotation (` rotate_passwords=false`): for example, choosing to accommodate users who access a database via an SSH tunnel and provide a password in their request because they cannot retrieve the database credentials stored in the [service or `$PLATFORM_RELATIONSHIPS` MariaDB environment variables](#mariadb-reference).
786
+
787
+
Passwords do **not** rotate automatically when you reset this value to `true`.
788
+
789
+
{{% note title="Important" theme="warning" %}}
790
+
Disabling password rotation can jeopardize compliance with security certifications - make sure you weigh this risk alongside the convenience of SSH-tunneling access.
Copy file name to clipboardExpand all lines: sites/upsun/src/add-services/mysql/_index.md
+18-15Lines changed: 18 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -526,7 +526,7 @@ You can configure your MySQL service in the [services configuration](../_index.m
526
526
| `schemas` | An array of `string`s | 10.0+ | All databases to be created. Defaults to a single `main` database. |
527
527
| `endpoints` | An endpoints dictionary | 10.0+ | Endpoints with their permissions. See [multiple databases](#multiple-databases). |
528
528
| `properties` | A properties dictionary | MariaDB: 10.1+; Oracle MySQL: 8.0+ | Additional properties for the database. Equivalent to using a `my.cnf` file. See [property options](#configure-the-database). |
529
-
| `rotate_passwords` | A boolean | 10.3+ | Allows disabling passwords rotation. Defaults to `true`. |
529
+
| `rotate_passwords` | A boolean | 10.3+ | Defaults to `true`. When set to `false`, [password rotation](#password-rotation) is disabled. |
530
530
531
531
Example configuration:
532
532
@@ -755,27 +755,30 @@ define custom endpoints in your [service configuration](#1-configure-the-service
755
755
For each custom endpoint you create,
756
756
you get an automatically generated password,
757
757
similarly to when you create [multiple databases](#multiple-databases).
758
-
Note that you can't customize these automatically generated passwords.
759
-
760
-
{{% note theme="warning" %}}
761
-
By default, the generated password will rotate on a regular
762
-
basis. Your applications MUST use the passwords from the
763
-
relationships, as the password _is_ going to change. Set
764
-
`rotate_passwords`to `false` if you wish to change this default
765
-
behavior.
766
-
{{% /note %}}
758
+
You cannot customize these generated passwords.
767
759
768
760
After your custom endpoints are exposed as relationships in your [app configuration](../../create-apps/_index.md),
769
761
you can retrieve the password for each endpoint
770
762
through the `{{% vendor/prefix %}}_RELATIONSHIPS` [environment variable](../../development/variables/use-variables.md#use-provided-variables)
771
-
within your [application containers](/development/variables/use-variables.md#access-variables-in-your-app).
772
-
The password value changes automatically over time, to avoid downtime its value has to be read dynamically by your app.
773
-
Globally speaking, having passwords hard-coded into your codebase can cause security issues and should be avoided.
763
+
within your [application containers](/development/variables/use-variables.md#access-variables-in-your-app).
764
+
765
+
Using this method to retrieve password credentials is considered a best practice: passwords change automatically (or [_rotate_](#password-rotation)) over time, and using incorrect passwords results in application downtime. **Avoid using hard-coded passwords in your application (and code base), which can cause security issues.**
774
766
775
767
When you switch from the default configuration with an empty password to custom endpoints,
776
768
make sure your service name remains unchanged.
777
-
Failure to do so results in the creation of a new service,
778
-
which removes any existing data from your database.
769
+
**Changing the service name creates a new service,
770
+
which removes any existing data from your database.**
771
+
772
+
## Password rotation {#password-rotation}
773
+
By default, password rotation is enabled (`rotate_passwords=true`), enabling {{% vendor/name %}} to automatically change (or _rotate_) MariaDB passwords each time it updates the MariaDB image. Password rotation also occurs as defined by any password lifetime settings in MariaDB.
774
+
775
+
Specific scenarios might warrant disabling password rotation (` rotate_passwords=false`): for example, choosing to accommodate users who access a database via an SSH tunnel and provide a password in their request because they cannot retrieve the database credentials stored in the [service or `$PLATFORM_RELATIONSHIPS` MariaDB environment variables](#mariadb-reference).
776
+
777
+
Passwords do **not** rotate automatically when you reset this value to `true`.
778
+
779
+
{{% note title="Important" theme="warning" %}}
780
+
Disabling password rotation can jeopardize compliance with security certifications - make sure you weigh this risk alongside the convenience of SSH-tunneling access.
0 commit comments