- 
                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
        
      | @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) | 
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.
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> { | 
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
| protected void call(UUID uuid, StorageProfileResourceApi storageProfileResourceApi) throws ApiException { | ||
| storageProfileResourceApi.apiStorageprofileS3Put(new StorageProfileS3Dto() | ||
| .id(uuid) | ||
| .name("AWS S3 static") | 
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 option
| .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
| protected void call(UUID uuid, StorageProfileResourceApi storageProfileResourceApi) throws ApiException { | ||
| storageProfileResourceApi.apiStorageprofileS3stsPut(new StorageProfileS3STSDto() | ||
| .id(uuid) | ||
| .name("AWS S3 STS") | 
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
| 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?
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 MinioStsSetup as well
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 test coverage
8a67fb0    to
    7f8649f      
    Compare
  
    5e1ae68    to
    31f9be9      
    Compare
  
    31f9be9    to
    329b941      
    Compare
  
    
Supersedes shift7-ch/katta-server#69