Skip to content

Conversation

@chenkins
Copy link
Contributor

@chenkins chenkins commented Jul 1, 2025

@chenkins chenkins force-pushed the feature/admin-cli branch from d85ee87 to 49f2fa1 Compare July 1, 2025 13:40
@chenkins chenkins force-pushed the feature/admin-cli branch 3 times, most recently from c624b78 to 8a67fb0 Compare July 12, 2025 11:41
@CommandLine.Option(names = {"--clientId"}, description = "Keycloak realm URL with scheme. Example: \"cryptomator\"", required = false)
String clientId;

@CommandLine.Option(names = {"--accessToken"}, description = "The access token. Requires admin role in the hub.", required = false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve description if accessToken not provided.

* 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> {
Copy link
Contributor Author

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chenkins chenkins requested a review from dkocher July 12, 2025 11:48
protected void call(UUID uuid, StorageProfileResourceApi storageProfileResourceApi) throws ApiException {
storageProfileResourceApi.apiStorageprofileS3Put(new StorageProfileS3Dto()
.id(uuid)
.name("AWS S3 static")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract cli option

Comment on lines +52 to +54
.region("eu-west-1")
.regions(Arrays.asList("eu-west-1",
"eu-west-2",
"eu-west-3"))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract cli options

protected void call(UUID uuid, StorageProfileResourceApi storageProfileResourceApi) throws ApiException {
storageProfileResourceApi.apiStorageprofileS3stsPut(new StorageProfileS3STSDto()
.id(uuid)
.name("AWS S3 STS")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract cli options

if(existingOIDCProvider.isEmpty()) {
final CreateOpenIdConnectProviderResponse openIDConnectProvider = iam.createOpenIDConnectProvider(CreateOpenIdConnectProviderRequest.builder()
.url(realmUrl)
.clientIDList("cryptomator", "cryptomatorhub", "cryptomatorvaults")
Copy link
Contributor Author

@chenkins chenkins Jul 12, 2025

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?

Copy link
Contributor Author

@chenkins chenkins Jul 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add MinioStsSetup as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add test coverage

@chenkins chenkins force-pushed the feature/admin-cli branch 6 times, most recently from 5e1ae68 to 31f9be9 Compare September 26, 2025 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants