diff options
author | Alex Auvolat <alex@adnab.me> | 2022-01-05 15:12:59 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-01-05 15:12:59 +0100 |
commit | 9431090b1eb9006b12395fb22700b0def7fd1f59 (patch) | |
tree | 207fc2933484cdb79efc800926bb5d75ac876d8e /src/garage/cli/structs.rs | |
parent | 677ab60cc117677bf53dc4887a6ff1c094e17cd0 (diff) | |
download | garage-9431090b1eb9006b12395fb22700b0def7fd1f59.tar.gz garage-9431090b1eb9006b12395fb22700b0def7fd1f59.zip |
Implement key allow|deny --create-bucket
Diffstat (limited to 'src/garage/cli/structs.rs')
-rw-r--r-- | src/garage/cli/structs.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs index bd7abc8e..a544d6a1 100644 --- a/src/garage/cli/structs.rs +++ b/src/garage/cli/structs.rs @@ -274,6 +274,14 @@ pub enum KeyOperation { #[structopt(name = "delete")] Delete(KeyDeleteOpt), + /// Set permission flags for key + #[structopt(name = "allow")] + Allow(KeyPermOpt), + + /// Unset permission flags for key + #[structopt(name = "deny")] + Deny(KeyPermOpt), + /// Import key #[structopt(name = "import")] Import(KeyImportOpt), @@ -312,6 +320,16 @@ pub struct KeyDeleteOpt { } #[derive(Serialize, Deserialize, StructOpt, Debug)] +pub struct KeyPermOpt { + /// ID or name of the key + pub key_pattern: String, + + /// Flag that allows key to create buckets using S3's CreateBucket call + #[structopt(long = "create-bucket")] + pub create_bucket: bool, +} + +#[derive(Serialize, Deserialize, StructOpt, Debug)] pub struct KeyImportOpt { /// Access key ID pub key_id: String, |