Skip to content

Commit 2563ee0

Browse files
authored
fix(rdb): add documentation about password validation (#4296)
1 parent 86fd6ca commit 2563ee0

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

cmd/scw/testdata/test-all-usage-rdb-instance-create-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ARGS:
1111
engine Database engine of the Database Instance (PostgreSQL, MySQL, ...)
1212
user-name Username created when the Database Instance is created
1313
[generate-password=true] Will generate a 21 character-length password that contains a mix of upper/lower case letters, numbers and special symbols
14-
[password] Password of the user
14+
[password] Password of the user. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character
1515
node-type=DB-DEV-S Type of node to use for the Database Instance
1616
[is-ha-cluster] Defines whether or not High-Availability is enabled
1717
[disable-backup] Defines whether or not backups are disabled

cmd/scw/testdata/test-all-usage-rdb-user-create-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARGS:
99
instance-id UUID of the Database Instance in which you want to create a user
1010
[name] Name of the user you want to create
1111
[generate-password=true] Will generate a 21 character-length password that contains a mix of upper/lower case letters, numbers and special symbols
12-
[password] Password of the user you want to create
12+
[password] Password of the user you want to create. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character
1313
[is-admin] Defines whether the user will have administrative privileges
1414
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1515

cmd/scw/testdata/test-all-usage-rdb-user-update-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARGS:
99
instance-id UUID of the Database Instance the user belongs to
1010
name Name of the database user
1111
[generate-password=true] Will generate a 21 character-length password that contains a mix of upper/lower case letters, numbers and special symbols
12-
[password] Password of the database user
12+
[password] Password of the database user. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character
1313
[is-admin] Defines whether or not this user got administrative privileges
1414
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1515

docs/commands/rdb.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ scw rdb instance create [arg=value ...]
752752
| engine | Required | Database engine of the Database Instance (PostgreSQL, MySQL, ...) |
753753
| user-name | Required | Username created when the Database Instance is created |
754754
| generate-password | Default: `true` | Will generate a 21 character-length password that contains a mix of upper/lower case letters, numbers and special symbols |
755-
| password | | Password of the user |
755+
| password | | Password of the user. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character |
756756
| node-type | Required<br />Default: `DB-DEV-S` | Type of node to use for the Database Instance |
757757
| is-ha-cluster | | Defines whether or not High-Availability is enabled |
758758
| disable-backup | | Defines whether or not backups are disabled |
@@ -1579,7 +1579,7 @@ scw rdb user create [arg=value ...]
15791579
| instance-id | Required | UUID of the Database Instance in which you want to create a user |
15801580
| name | | Name of the user you want to create |
15811581
| generate-password | Default: `true` | Will generate a 21 character-length password that contains a mix of upper/lower case letters, numbers and special symbols |
1582-
| password | | Password of the user you want to create |
1582+
| password | | Password of the user you want to create. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character |
15831583
| is-admin | | Defines whether the user will have administrative privileges |
15841584
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
15851585

@@ -1667,7 +1667,7 @@ scw rdb user update [arg=value ...]
16671667
| instance-id | Required | UUID of the Database Instance the user belongs to |
16681668
| name | Required | Name of the database user |
16691669
| generate-password | Default: `true` | Will generate a 21 character-length password that contains a mix of upper/lower case letters, numbers and special symbols |
1670-
| password | | Password of the database user |
1670+
| password | | Password of the database user. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character |
16711671
| is-admin | | Defines whether or not this user got administrative privileges |
16721672
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
16731673

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/mattn/go-isatty v0.0.20
2727
github.com/moby/buildkit v0.13.2
2828
github.com/opencontainers/go-digest v1.0.0
29-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241120144232-edea130e856d
29+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241122155133-e059a3142116
3030
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3131
github.com/spf13/cobra v1.8.1
3232
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
466466
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
467467
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
468468
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
469-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241120144232-edea130e856d h1:fx/KN+3OD7BFzJuAycHL9dZAhX+ERmizIR8Zpk4rpFg=
470-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241120144232-edea130e856d/go.mod h1:kAoejOVBg1E/aVAR6IwKWEmbLCEg2IXklzPAkxzAaXA=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241122155133-e059a3142116 h1:cMGaFcZ2ByIdOWy/QkRvMOu0HtwzQDLv+InToiqJPaM=
470+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241122155133-e059a3142116/go.mod h1:kAoejOVBg1E/aVAR6IwKWEmbLCEg2IXklzPAkxzAaXA=
471471
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
472472
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
473473
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/rdb/v1/rdb_cli.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ func rdbInstanceCreate() *core.Command {
887887
},
888888
{
889889
Name: "password",
890-
Short: `Password of the user`,
890+
Short: `Password of the user. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character`,
891891
Required: true,
892892
Deprecated: false,
893893
Positional: false,
@@ -2034,7 +2034,7 @@ func rdbUserCreate() *core.Command {
20342034
},
20352035
{
20362036
Name: "password",
2037-
Short: `Password of the user you want to create`,
2037+
Short: `Password of the user you want to create. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character`,
20382038
Required: false,
20392039
Deprecated: false,
20402040
Positional: false,
@@ -2085,7 +2085,7 @@ func rdbUserUpdate() *core.Command {
20852085
},
20862086
{
20872087
Name: "password",
2088-
Short: `Password of the database user`,
2088+
Short: `Password of the database user. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character`,
20892089
Required: false,
20902090
Deprecated: false,
20912091
Positional: false,

0 commit comments

Comments
 (0)