Skip to content

Commit 12d813c

Browse files
authored
feat(secret-manager): don't exclude password_generation field (#3143)
1 parent 619cfae commit 12d813c

File tree

5 files changed

+54
-9
lines changed

5 files changed

+54
-9
lines changed

cmd/scw/testdata/test-all-usage-secret-version-create-usage.golden

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@ USAGE:
66
scw secret version create [arg=value ...]
77

88
ARGS:
9-
secret-id ID of the secret
10-
data Content of the secret version. Base64 is handled by the SDK (Support file loading with @/path/to/file)
11-
[description] Description of the version
12-
[disable-previous] Disable the previous secret version
13-
[data-crc32] (Optional.) The CRC32 checksum of the data as a base-10 integer
14-
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
9+
secret-id ID of the secret
10+
data Content of the secret version. Base64 is handled by the SDK (Support file loading with @/path/to/file)
11+
[description] Description of the version
12+
[disable-previous] Disable the previous secret version
13+
[password-generation.length] Length of the password to generate (between 1 and 1024)
14+
[password-generation.no-lowercase-letters] Do not include lower case letters by default in the alphabet
15+
[password-generation.no-uppercase-letters] Do not include upper case letters by default in the alphabet
16+
[password-generation.no-digits] Do not include digits by default in the alphabet
17+
[password-generation.additional-chars] Additional ascii characters to be included in the alphabet
18+
[data-crc32] (Optional.) The CRC32 checksum of the data as a base-10 integer
19+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
1520

1621
FLAGS:
1722
-h, --help help for create

docs/commands/secret.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@ scw secret version create [arg=value ...]
201201
| data | Required | Content of the secret version. Base64 is handled by the SDK |
202202
| description | | Description of the version |
203203
| disable-previous | | Disable the previous secret version |
204+
| password-generation.length | | Length of the password to generate (between 1 and 1024) |
205+
| password-generation.no-lowercase-letters | | Do not include lower case letters by default in the alphabet |
206+
| password-generation.no-uppercase-letters | | Do not include upper case letters by default in the alphabet |
207+
| password-generation.no-digits | | Do not include digits by default in the alphabet |
208+
| password-generation.additional-chars | | Additional ascii characters to be included in the alphabet |
204209
| data-crc32 | | (Optional.) The CRC32 checksum of the data as a base-10 integer |
205210
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |
206211

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/moby/buildkit v0.11.6
2727
github.com/opencontainers/go-digest v1.0.0
2828
github.com/pkg/errors v0.9.1
29-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230524152841-3978517139f0
29+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230526161530-cf508019231d
3030
github.com/spf13/cobra v1.7.0
3131
github.com/spf13/pflag v1.0.5
3232
github.com/stretchr/testify v1.8.3

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj
483483
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
484484
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
485485
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
486-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230524152841-3978517139f0 h1:U4HT3FlDTJ1jtdQ9zQXoxFmSthf5O/hCLn3Vo44FWc0=
487-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230524152841-3978517139f0/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
486+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230526161530-cf508019231d h1:qeI25+qrQ5MQaMFS2RgmAeAwUSWZSeYy5eYHnmW8vpk=
487+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230526161530-cf508019231d/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
488488
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
489489
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
490490
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=

internal/namespaces/secret/v1alpha1/secret_cli.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,41 @@ func secretVersionCreate() *core.Command {
350350
Deprecated: false,
351351
Positional: false,
352352
},
353+
{
354+
Name: "password-generation.length",
355+
Short: `Length of the password to generate (between 1 and 1024)`,
356+
Required: false,
357+
Deprecated: false,
358+
Positional: false,
359+
},
360+
{
361+
Name: "password-generation.no-lowercase-letters",
362+
Short: `Do not include lower case letters by default in the alphabet`,
363+
Required: false,
364+
Deprecated: false,
365+
Positional: false,
366+
},
367+
{
368+
Name: "password-generation.no-uppercase-letters",
369+
Short: `Do not include upper case letters by default in the alphabet`,
370+
Required: false,
371+
Deprecated: false,
372+
Positional: false,
373+
},
374+
{
375+
Name: "password-generation.no-digits",
376+
Short: `Do not include digits by default in the alphabet`,
377+
Required: false,
378+
Deprecated: false,
379+
Positional: false,
380+
},
381+
{
382+
Name: "password-generation.additional-chars",
383+
Short: `Additional ascii characters to be included in the alphabet`,
384+
Required: false,
385+
Deprecated: false,
386+
Positional: false,
387+
},
353388
{
354389
Name: "data-crc32",
355390
Short: `(Optional.) The CRC32 checksum of the data as a base-10 integer`,

0 commit comments

Comments
 (0)