-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
510 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
backend/src/main/java/org/cryptomator/hub/api/cipherduck/CreateS3STSBucketDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.cryptomator.hub.api.cipherduck; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.UUID; | ||
|
||
public record CreateS3STSBucketDto( | ||
@JsonProperty("vaultId") | ||
String vaultId, | ||
@JsonProperty("storageConfigId") | ||
UUID storageConfigId, | ||
@JsonProperty("vaultUvf") | ||
String vaultUvf, | ||
@JsonProperty("rootDirHash") | ||
String rootDirHash, | ||
@JsonProperty("awsAccessKey") | ||
String awsAccessKey, | ||
@JsonProperty("awsSecretKey") | ||
String awsSecretKey, | ||
@JsonProperty("sessionToken") | ||
String sessionToken, | ||
@JsonProperty("region") | ||
String region | ||
) { | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
backend/src/main/java/org/cryptomator/hub/api/cipherduck/VaultMasterkeyJWEDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.cryptomator.hub.api.cipherduck; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public record VaultMasterkeyJWEDto( | ||
@JsonProperty(value = "key", required = true) | ||
// masterkey | ||
String key | ||
) { | ||
} |
12 changes: 12 additions & 0 deletions
12
...main/java/org/cryptomator/hub/api/cipherduck/VaultMetadataJWEAutomaticAccessGrantDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.cryptomator.hub.api.cipherduck; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public record VaultMetadataJWEAutomaticAccessGrantDto( | ||
@JsonProperty(value = "enabled", defaultValue = "true") | ||
boolean enabled, | ||
|
||
// where -1 means "grant to anyone", where 0, 1, 2 would be the number of edges between any vault owner and the grantee. Exact algorithm tbd | ||
@JsonProperty(value = "maxWotDepth", defaultValue = "-1") | ||
int maxWotDepth) { | ||
} |
31 changes: 31 additions & 0 deletions
31
backend/src/main/java/org/cryptomator/hub/api/cipherduck/VaultMetadataJWEDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.cryptomator.hub.api.cipherduck; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.Map; | ||
|
||
public record VaultMetadataJWEDto( | ||
@JsonProperty(value = "fileFormat", required = true) | ||
String fileFormat, | ||
@JsonProperty(value = "nameFormat", required = true) | ||
String nameFormat, | ||
|
||
@JsonProperty(value = "keys", required = true) | ||
Map<String, String> keys, | ||
|
||
@JsonProperty(value = "latestFileKey", required = true) | ||
String latestFileKey, | ||
|
||
@JsonProperty(value = "nameKey", required = true) | ||
String nameKey, | ||
|
||
@JsonProperty(value = "kdf", required = true) | ||
String kdf, | ||
|
||
@JsonProperty(value = "com.cipherduck.storage", required = true) | ||
VaultMetadataJWEStorageDto storage, | ||
|
||
@JsonProperty(value = "org.cryptomator.automaticAccessGrant", required = true) | ||
VaultMetadataJWEAutomaticAccessGrantDto automaticAccessGrant | ||
) { | ||
} |
29 changes: 29 additions & 0 deletions
29
backend/src/main/java/org/cryptomator/hub/api/cipherduck/VaultMetadataJWEStorageDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.cryptomator.hub.api.cipherduck; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
/** | ||
* Part of vault JWE specifying the vault metadata. | ||
* Allows to create a bookmark in the client referencing the vendor in the storage profiles. | ||
* This Java record is unused in hub, only its ts counterpart in `storage.ts`. | ||
* Cipherduck client uses code generated by the OpenAPI generator. | ||
*/ | ||
public record VaultMetadataJWEStorageDto( | ||
@JsonProperty(value = "provider", required = true) | ||
// references id in StorageProfileDto (aka. vendor in client profile) | ||
String provider, | ||
@JsonProperty(value = "defaultPath", required = true) | ||
String defaultPath, | ||
@JsonProperty(value = "nickname", required = true) | ||
String nickname, | ||
@JsonProperty(value = "region", required = true) | ||
String region, | ||
|
||
@JsonProperty(value = "username") | ||
// for non-STS | ||
String username, | ||
@JsonProperty(value = "password") | ||
// for non-STS | ||
String password | ||
) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
backend/src/main/java/org/cryptomator/hub/entities/cipherduck/StorageProfileS3STS.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.