-
Notifications
You must be signed in to change notification settings - Fork 0
Katta Admin CLI #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Katta Admin CLI #139
Conversation
d85ee87 to
49f2fa1
Compare
c624b78 to
8a67fb0
Compare
admin-cli/src/main/java/cloud/katta/cli/commands/setup/AwsStsSetup.java
Outdated
Show resolved
Hide resolved
admin-cli/src/main/java/cloud/katta/cli/commands/AbstractAuthorizationCode.java
Outdated
Show resolved
Hide resolved
| * See also: <a href="https://github.com/shift7-ch/katta-docs/blob/main/SETUP_KATTA_SERVER.md#setup-aws">Katta Docs</a>. | ||
| */ | ||
| @CommandLine.Command(name = "awsSetup", description = "Setup/update OIDC provider and roles for STS in AWS.", mixinStandardHelpOptions = true) | ||
| public class AwsStsSetup implements Callable<Void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkocher Add option to print out command line commands instead of applying them - or is this overkill?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add native image buildhttps://github.com/cryptomator/hub-cli/blob/develop/.github/workflows/native-image.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add README similar to https://github.com/cryptomator/hub-cli/blob/develop/README.md
admin-cli/src/main/java/cloud/katta/cli/commands/hub/StorageProfileAwsStaticSetup.java
Outdated
Show resolved
Hide resolved
| .region("eu-west-1") | ||
| .regions(Arrays.asList("eu-west-1", | ||
| "eu-west-2", | ||
| "eu-west-3")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract cli options
admin-cli/src/main/java/cloud/katta/cli/commands/hub/StorageProfileAwsStsSetup.java
Outdated
Show resolved
Hide resolved
| if(existingOIDCProvider.isEmpty()) { | ||
| final CreateOpenIdConnectProviderResponse openIDConnectProvider = iam.createOpenIDConnectProvider(CreateOpenIdConnectProviderRequest.builder() | ||
| .url(realmUrl) | ||
| .clientIDList("cryptomator", "cryptomatorhub", "cryptomatorvaults") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Harden conditions in trust policies on client_id and possibly role?
admin-cli/src/main/java/cloud/katta/cli/commands/storage/AwsStsSetup.java
Show resolved
Hide resolved
admin-cli/src/main/java/cloud/katta/cli/commands/storage/AwsStsSetup.java
Show resolved
Hide resolved
8a67fb0 to
7f8649f
Compare
5e1ae68 to
31f9be9
Compare
31f9be9 to
329b941
Compare
329b941 to
dc4b36f
Compare
| // aws iam create-role --role-name cipherduck-createbucket --assume-role-policy-document file://src/main/resources/cipherduck/setup/aws_stscreatebuckettrustpolicy.json | ||
| // aws iam put-role-policy --role-name cipherduck-createbucket --policy-name cipherduck-createbucket --policy-document file://src/main/resources/cipherduck/setup/aws_stscreatebucketpermissionpolicy.json | ||
| final String awsSTSCreateBucketRoleName = String.format("%s-createbucket", arnPostfixSanitized); | ||
| final JSONObject awsSTSCreateBuckeTrustPolicyTemplate = new JSONObject(IOUtils.toString(KattaSetupCli.class.getResourceAsStream("/setup/aws_sts/createbuckettrustpolicy.json"), Charset.defaultCharset())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dependency to test resources.
| <configuration> | ||
| <artifactItems> | ||
| <artifactItem> | ||
| <groupId>cloud.katta</groupId> | ||
| <artifactId>katta-clientlib-hub</artifactId> | ||
| <version>${project.version}</version> | ||
| <classifier>tests</classifier> | ||
| <type>jar</type> | ||
| <overWrite>false</overWrite> | ||
| <outputDirectory>${project.build.directory}/test-classes</outputDirectory> | ||
| <includes>**/*</includes> | ||
| </artifactItem> | ||
| </artifactItems> | ||
| </configuration> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs packaged/installed dependency in reactory - is there a better way?
| .protocol(Protocol.S3_STATIC) | ||
| .storageClass(S3STORAGECLASSES.STANDARD) | ||
| .archived(false) | ||
| .scheme("https") | ||
| .port(443) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract cli options
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-jar-plugin</artifactId> | ||
| <version>3.4.2</version> | ||
| <executions> | ||
| <execution> | ||
| <goals> | ||
| <goal>test-jar</goal> | ||
| </goals> | ||
| </execution> | ||
| </executions> | ||
| </plugin> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
De-normalize instead?
1552f21 to
618042d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ITs take very long! Can we speed up?
…ose file, no need for HubSession in admin cli tests any more.
Supersedes shift7-ch/katta-server#69