Skip to content

Commit 212558c

Browse files
authored
Merge branch 'scaleway:master' into master
2 parents 699b1ad + 4810aaa commit 212558c

File tree

6 files changed

+45
-12
lines changed

6 files changed

+45
-12
lines changed

cmd/scw/testdata/test-all-usage-keymanager-key-create-usage.golden

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ ARGS:
99
[project-id] Project ID to use. If none is passed the default project ID will be used
1010
[name] (Optional) Name of the key
1111
[usage.symmetric-encryption] Algorithm used to encrypt and decrypt arbitrary payloads. (unknown_symmetric_encryption | aes_256_gcm)
12+
[usage.asymmetric-encryption] (unknown_asymmetric_encryption | rsa_oaep_2048_sha256 | rsa_oaep_3072_sha256 | rsa_oaep_4096_sha256)
13+
[usage.asymmetric-signing] (unknown_asymmetric_signing | ec_p256_sha256 | ec_p384_sha384 | rsa_pss_2048_sha256 | rsa_pss_3072_sha256 | rsa_pss_4096_sha256 | rsa_pkcs1_2048_sha256 | rsa_pkcs1_3072_sha256 | rsa_pkcs1_4096_sha256)
1214
[description] (Optional) Description of the key
1315
[tags.{index}] (Optional) List of the key's tags
1416
[rotation-policy.rotation-period] Rotation period

cmd/scw/testdata/test-all-usage-keymanager-key-decrypt-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ USAGE:
66
scw keymanager key decrypt <key-id ...> [arg=value ...]
77

88
ARGS:
9-
key-id ID of the key to decrypt
9+
key-id ID of the key to decrypt with
1010
ciphertext Base64 Ciphertext data to decrypt (Support file loading with @/path/to/file)
1111
[associated-data] (Optional) Additional authenticated data
1212
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

cmd/scw/testdata/test-all-usage-keymanager-key-encrypt-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ USAGE:
66
scw keymanager key encrypt <key-id ...> [arg=value ...]
77

88
ARGS:
9-
key-id ID of the key to encrypt
9+
key-id ID of the key to use for encryption
1010
plaintext Base64 Plaintext data to encrypt (Support file loading with @/path/to/file)
1111
[associated-data] (Optional) Additional authenticated data
1212
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

docs/commands/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ You can use the CLI as you would run any Docker image:
6969
docker run -i --rm scaleway/cli:latest
7070
```
7171

72-
See more in-depth information about running the CLI in Docker [here](/docs/docker.md)
72+
See more in-depth information about running the CLI in Docker [here](https://github.com/scaleway/scaleway-cli/blob/master/docs/docker.md).
7373

7474
# Getting Started
7575

@@ -100,14 +100,14 @@ scw k8s cluster create name=foo version=1.17.4 pools.0.size=3 pools.0.node-type=
100100

101101
You can configure your config or enable functionalities with environment variables.
102102

103-
Variables to override config are describe in [config documentation](/docs/commands/config.md).
103+
Variables to override config are describe in [config documentation](https://cli.scaleway.com/config/).
104104
To enable beta features, you can set `SCW_ENABLE_BETA=1` in your environment.
105105

106106
## Build it yourself
107107

108108
### Build Locally
109109

110-
If you have a >= Go 1.13 environment, you can install the `HEAD` version to test the latest features or to [contribute](/.github/CONTRIBUTING.md).
110+
If you have a >= Go 1.13 environment, you can install the `HEAD` version to test the latest features or to [contribute](https://github.com/scaleway/scaleway-cli/blob/master/.github/CONTRIBUTING.md).
111111
Note that this development version could include bugs, use [tagged releases](https://github.com/scaleway/scaleway-cli/releases/latest) if you need stability.
112112

113113
```bash
@@ -130,12 +130,12 @@ Once built, you can then use the CLI as you would run any image:
130130
docker run -i --rm scaleway/cli
131131
```
132132

133-
See more in-depth information about running the CLI in Docker [here](/docs/docker.md)
133+
See more in-depth information about running the CLI in Docker [here](https://github.com/scaleway/scaleway-cli/blob/master/docs/docker.md)
134134

135135
# Development
136136

137137
This repository is at its early stage and is still in active development.
138-
If you are looking for a way to contribute please read [CONTRIBUTING.md](/.github/CONTRIBUTING.md).
138+
If you are looking for a way to contribute please read [CONTRIBUTING.md](https://github.com/scaleway/scaleway-cli/blob/master/.github/CONTRIBUTING.md).
139139

140140
# Reach Us
141141

docs/commands/keymanager.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ scw keymanager key create [arg=value ...]
4343
| project-id | | Project ID to use. If none is passed the default project ID will be used |
4444
| name | | (Optional) Name of the key |
4545
| usage.symmetric-encryption | One of: `unknown_symmetric_encryption`, `aes_256_gcm` | Algorithm used to encrypt and decrypt arbitrary payloads. |
46+
| usage.asymmetric-encryption | One of: `unknown_asymmetric_encryption`, `rsa_oaep_2048_sha256`, `rsa_oaep_3072_sha256`, `rsa_oaep_4096_sha256` | |
47+
| usage.asymmetric-signing | One of: `unknown_asymmetric_signing`, `ec_p256_sha256`, `ec_p384_sha384`, `rsa_pss_2048_sha256`, `rsa_pss_3072_sha256`, `rsa_pss_4096_sha256`, `rsa_pkcs1_2048_sha256`, `rsa_pkcs1_3072_sha256`, `rsa_pkcs1_4096_sha256` | |
4648
| description | | (Optional) Description of the key |
4749
| tags.{index} | | (Optional) List of the key's tags |
4850
| rotation-policy.rotation-period | | Rotation period |
@@ -68,7 +70,7 @@ scw keymanager key decrypt <key-id ...> [arg=value ...]
6870

6971
| Name | | Description |
7072
|------|---|-------------|
71-
| key-id | Required | ID of the key to decrypt |
73+
| key-id | Required | ID of the key to decrypt with |
7274
| ciphertext | Required | Base64 Ciphertext data to decrypt |
7375
| associated-data | | (Optional) Additional authenticated data |
7476
| 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 |
@@ -170,7 +172,7 @@ scw keymanager key encrypt <key-id ...> [arg=value ...]
170172

171173
| Name | | Description |
172174
|------|---|-------------|
173-
| key-id | Required | ID of the key to encrypt |
175+
| key-id | Required | ID of the key to use for encryption |
174176
| plaintext | Required | Base64 Plaintext data to encrypt |
175177
| associated-data | | (Optional) Additional authenticated data |
176178
| 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 |

internal/namespaces/key_manager/v1alpha1/key_manager_cli.go

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"reflect"
99

1010
"github.com/scaleway/scaleway-cli/v2/core"
11-
key_manager "github.com/scaleway/scaleway-sdk-go/api/key_manager/v1alpha1"
11+
"github.com/scaleway/scaleway-sdk-go/api/key_manager/v1alpha1"
1212
"github.com/scaleway/scaleway-sdk-go/scw"
1313
)
1414

@@ -85,6 +85,35 @@ func keymanagerKeyCreate() *core.Command {
8585
"aes_256_gcm",
8686
},
8787
},
88+
{
89+
Name: "usage.asymmetric-encryption",
90+
Required: false,
91+
Deprecated: false,
92+
Positional: false,
93+
EnumValues: []string{
94+
"unknown_asymmetric_encryption",
95+
"rsa_oaep_2048_sha256",
96+
"rsa_oaep_3072_sha256",
97+
"rsa_oaep_4096_sha256",
98+
},
99+
},
100+
{
101+
Name: "usage.asymmetric-signing",
102+
Required: false,
103+
Deprecated: false,
104+
Positional: false,
105+
EnumValues: []string{
106+
"unknown_asymmetric_signing",
107+
"ec_p256_sha256",
108+
"ec_p384_sha384",
109+
"rsa_pss_2048_sha256",
110+
"rsa_pss_3072_sha256",
111+
"rsa_pss_4096_sha256",
112+
"rsa_pkcs1_2048_sha256",
113+
"rsa_pkcs1_3072_sha256",
114+
"rsa_pkcs1_4096_sha256",
115+
},
116+
},
88117
{
89118
Name: "description",
90119
Short: `(Optional) Description of the key`,
@@ -609,7 +638,7 @@ func keymanagerKeyEncrypt() *core.Command {
609638
ArgSpecs: core.ArgSpecs{
610639
{
611640
Name: "key-id",
612-
Short: `ID of the key to encrypt`,
641+
Short: `ID of the key to use for encryption`,
613642
Required: true,
614643
Deprecated: false,
615644
Positional: true,
@@ -657,7 +686,7 @@ func keymanagerKeyDecrypt() *core.Command {
657686
ArgSpecs: core.ArgSpecs{
658687
{
659688
Name: "key-id",
660-
Short: `ID of the key to decrypt`,
689+
Short: `ID of the key to decrypt with`,
661690
Required: true,
662691
Deprecated: false,
663692
Positional: true,

0 commit comments

Comments
 (0)