Skip to content

Commit 8786be3

Browse files
committed
Add docs.
1 parent c811e2c commit 8786be3

File tree

5 files changed

+44
-6
lines changed

5 files changed

+44
-6
lines changed

admin-cli/src/main/java/cloud/katta/cli/commands/AuthorizationCode.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
import io.github.coffeelibs.tinyoauth2client.TinyOAuth2;
1111
import picocli.CommandLine;
1212

13-
// https://github.com/cryptomator/hub-cli/commit/bffcf2805530976c4a758990958ff75f9df68c0e#diff-c349f933a7698e31cfe25bd0a638ae487a02ac6fcb429bcce3e315aa8832be8b
13+
14+
/**
15+
* Based on <a href="https://github.com/cryptomator/hub-cli/commit/bffcf2805530976c4a758990958ff75f9df68c0e#diff-c349f933a7698e31cfe25bd0a638ae487a02ac6fcb429bcce3e315aa8832be8b">hub-cli</a>.
16+
*/
1417
@CommandLine.Command(name = "authorizationCode", description = "Get token using authorization code flow.", mixinStandardHelpOptions = true)
1518
public class AuthorizationCode implements Callable<Void> {
1619

admin-cli/src/main/java/cloud/katta/cli/commands/AwsSTSSetup.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@
3838
import software.amazon.awssdk.services.iam.model.UpdateAssumeRolePolicyRequest;
3939
import software.amazon.awssdk.services.iam.model.UpdateOpenIdConnectProviderThumbprintRequest;
4040

41+
/**
42+
* Sets up AWS for Katta in STS mode:
43+
* <ul>
44+
* <li> creates/updates OIDC provider for cryptomator, cryptomatorhub and cryptomatorvaults clients.</li>
45+
* <li> creates roles and role policy for
46+
* <ul>
47+
* <li>creating vaults: access restricted to creating buckets with given prefix</li>
48+
* <li> accessing vaults using <a href="role chaining">https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html</a>: access restricted to reading/writing to single bucket.</li>
49+
* </ul>
50+
* </li>
51+
* </ul>
52+
* Requires <code>admin</code> role in Katta Server.
53+
* <p>
54+
* See also: <a href="https://github.com/shift7-ch/katta-docs/blob/main/SETUP_KATTA_SERVER.md#setup-aws">Katta Docs</a>.
55+
*/
4156
@CommandLine.Command(name = "awsSetup", description = "Setup/update OIDC provider and roles for STS in AWS.", mixinStandardHelpOptions = true)
4257
public class AwsSTSSetup implements Callable<Void> {
4358

admin-cli/src/main/java/cloud/katta/cli/commands/StorageProfileAWSSTSSetup.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
package cloud.katta.cli.commands;
66

7+
import java.io.IOException;
8+
import java.util.Arrays;
9+
import java.util.UUID;
10+
import java.util.concurrent.Callable;
11+
712
import cloud.katta.client.ApiClient;
813
import cloud.katta.client.ApiException;
914
import cloud.katta.client.api.StorageProfileResourceApi;
@@ -13,11 +18,13 @@
1318
import cloud.katta.client.model.StorageProfileS3STSDto;
1419
import picocli.CommandLine;
1520

16-
import java.io.IOException;
17-
import java.util.Arrays;
18-
import java.util.UUID;
19-
import java.util.concurrent.Callable;
20-
21+
/**
22+
* Uploads a storage profile to Katta Server for use with AWS STS. Requires AWS STS setup.
23+
* <p>
24+
* The storage profile then allows users with <code>create-vaults</code> role to create vaults and their corresponding S3 bucket seamlessly.
25+
* <p>
26+
* See also: <a href="https://github.com/shift7-ch/katta-docs/blob/main/SETUP_KATTA_SERVER.md#storage-profiles">katta docs</a>.
27+
*/
2128
@CommandLine.Command(name = "storageProfileAWSSTS",
2229
description = "Upload storage profile for AWS STS.",
2330
mixinStandardHelpOptions = true)

admin-cli/src/main/java/cloud/katta/cli/commands/StorageProfileAWSStaticSetup.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
import cloud.katta.client.model.StorageProfileS3Dto;
1717
import picocli.CommandLine;
1818

19+
/**
20+
* Uploads a storage profile to Katta Server for use with AWS static.
21+
* The storage profile then allows users with <code>create-vaults</code> role to create vaults for an existing AWS S3 bucket.
22+
* <p>
23+
* See also: <a href="https://github.com/shift7-ch/katta-docs/blob/main/SETUP_KATTA_SERVER.md#storage-profiles">katta docs</a>.
24+
*/
1925
@CommandLine.Command(name = "storageProfileAWSStatic",
2026
description = "Upload storage profile for AWS Static.",
2127
mixinStandardHelpOptions = true)

admin-cli/src/main/java/cloud/katta/cli/commands/StorageProfileArchive.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
import cloud.katta.client.api.StorageProfileResourceApi;
1313
import picocli.CommandLine;
1414

15+
/**
16+
* Archives a storage profile using <code>/api/storageprofile</code>.
17+
* <p>
18+
* Requires <code>admin</code> role in Katta Server.
19+
* <p>
20+
* See also <a href="https://github.com/shift7-ch/katta-clientlib/blob/main/hub/src/main/resources/openapi.json>OpenAPI Specification</a>.
21+
*/
1522
@CommandLine.Command(name = "storageProfileArchive",
1623
description = "Upload storage profile for AWS Static.",
1724
mixinStandardHelpOptions = true)

0 commit comments

Comments
 (0)