Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
2d080ea
add `"alg": "A256KW"` support for JWEs
overheadhunter Mar 2, 2024
d109cff
uvf metadata (WiP).
chenkins Feb 28, 2024
55633f1
remove dead code from `backend.ts` for now
overheadhunter Apr 13, 2024
fe7ff3d
disentangle v8 and uvf based vaults
overheadhunter Apr 13, 2024
be8803c
move vault format 8 code to separate file
overheadhunter Apr 13, 2024
b51cc59
move UVF code to separate file
overheadhunter Apr 13, 2024
a9f12d4
adjust UVF payload to latest spec
overheadhunter Apr 13, 2024
cdf5571
Merge branch 'develop' into feature/uvf
overheadhunter Apr 20, 2024
3f77d16
new JWE API supporting compact and JSON format
overheadhunter Apr 25, 2024
3646379
use correct `AlgorithmID` for Concat KDF
overheadhunter Apr 26, 2024
f1c14fd
added tests
overheadhunter Apr 26, 2024
e0a7ab1
Merge branch 'develop' into feature/uvf
overheadhunter Apr 28, 2024
aa1690f
type cleanup
overheadhunter Apr 28, 2024
e6e028a
include recovery key in UVF metadata
overheadhunter Apr 28, 2024
a85cf3c
create UVF-based vault
overheadhunter Apr 28, 2024
32f2743
store uvf metadata and recovery key in vault table
overheadhunter May 2, 2024
a63ef34
adjusted to DTO model
overheadhunter May 2, 2024
6ce1569
Merge branch 'develop' into feature/uvf
overheadhunter May 2, 2024
01c8a06
grant permission to UVF vault
overheadhunter May 2, 2024
36eb79c
fix autocompletion mistake
overheadhunter May 2, 2024
3cf9c8e
use common interfaces for VF8 and UVF
overheadhunter May 2, 2024
69f0360
fix linter errors
overheadhunter May 2, 2024
7bddc62
experimental implementation of `serializePrivateKey()`
overheadhunter May 2, 2024
ba05d8b
make config.ts usable during tests
overheadhunter May 2, 2024
3d1db01
deduplicate "encrypt for user"
overheadhunter May 3, 2024
6b46862
store recovery key among vault key in access token
overheadhunter May 3, 2024
cb4e53a
reordered fields
overheadhunter May 3, 2024
b294f55
store recovery key as PKCS8 instead of words
overheadhunter May 9, 2024
a3fc184
adjusted parameter order
overheadhunter May 9, 2024
aeafffe
fix mocha test explorer: `document is not defined`
overheadhunter May 9, 2024
17c7099
fix method signature
overheadhunter May 9, 2024
f3f3e02
relax linter
overheadhunter May 9, 2024
aa49371
add tests
overheadhunter May 9, 2024
eda2621
add tests
overheadhunter May 9, 2024
815199f
reduce public API surface
overheadhunter May 9, 2024
037157f
add tests
overheadhunter May 9, 2024
2a40d01
speed up tests by reducing KDF iteration count
overheadhunter May 9, 2024
5118876
Merge branch 'develop' into feature/uvf
overheadhunter May 9, 2024
e4f9865
renamed files
overheadhunter May 10, 2024
e27d20a
clean up tests
overheadhunter May 10, 2024
657598a
fix uneffective test
overheadhunter May 10, 2024
88a95eb
clean up test
overheadhunter May 10, 2024
c229fdd
remove outdated TODOs
overheadhunter May 10, 2024
b46f55e
restore recovery key from human-readable form
overheadhunter May 10, 2024
b0790aa
store JWK Set in backend
overheadhunter May 10, 2024
98cd173
expose `jwks.json` and `vault.uvf` endpoints
overheadhunter May 10, 2024
00641e4
switch to MemberDto
overheadhunter May 16, 2024
4f3e969
cleanup
overheadhunter May 16, 2024
8320786
include role-depending data in access token
overheadhunter May 16, 2024
458e98a
Merge branch 'develop' into feature/uvf
overheadhunter May 16, 2024
8cb9af6
add `UniversalVaultFormat.recover(...)`
overheadhunter May 16, 2024
aad13fa
Merge branch 'develop' into feature/uvf
overheadhunter May 17, 2024
686713b
Merge branch 'develop' into feature/uvf
overheadhunter May 17, 2024
994d7b3
Merge branch 'develop' into feature/uvf
overheadhunter May 17, 2024
155d640
remove unnecessary guard
overheadhunter May 17, 2024
9b4f5ba
fix weird error message in unit tests
overheadhunter May 21, 2024
388426f
pass in URL during vault template generation
overheadhunter May 21, 2024
52b97b5
improve test
overheadhunter May 21, 2024
7224b46
add root directory to vault template
overheadhunter May 21, 2024
81e9ab4
split up `computeDirId` and `computeDirIdHash`
overheadhunter May 21, 2024
9c3ab12
add `dir.uvf` file to vault template
overheadhunter May 21, 2024
ec4415d
refine test
overheadhunter May 22, 2024
2947b80
show also uvf recovery key in vault details
infeo May 22, 2024
2d03e39
fix linter hints
infeo May 22, 2024
bf85c2a
(unfinished) rework recover Vault dialog
infeo May 27, 2024
8d86446
Do not erase uploaded file on failed upload
infeo May 28, 2024
57cfd0a
improve error handling
infeo May 28, 2024
b1f9fc4
define event listeners as functions
infeo May 28, 2024
a667e0d
remove unused Error class
infeo May 28, 2024
871b6de
set vault type during recovery
infeo May 28, 2024
3368768
minor adjustments
infeo May 28, 2024
b43a946
add additional verification to vaultformat 8 module
infeo May 29, 2024
ea77daf
Add negative test for vaultFormat8 verfiy and recover
infeo May 30, 2024
c2fe768
reduce diff
infeo May 30, 2024
b2cb75d
add doc string
infeo Jun 3, 2024
64d8ff6
add tests for simple jwt parsing
infeo Jun 3, 2024
eaaad24
improve error handling
infeo Jun 3, 2024
597b2cc
add error translations
infeo Jun 3, 2024
b7a0687
more wording/translations
infeo Jun 5, 2024
afd370f
fix display bug
infeo Jun 5, 2024
0de22c9
Merge branch 'develop' into feature/uvf
overheadhunter Jun 6, 2024
917fedc
use new JWE parser in `userdata.ts`
overheadhunter Jun 6, 2024
847ecc4
dedup
overheadhunter Jun 6, 2024
26369a5
adjust DTO to carry both EC keys
overheadhunter Jun 6, 2024
e77ca7a
Merge branch 'develop' into feature/uvf
overheadhunter Jul 12, 2024
3e30a00
Merge branch 'develop' into feature/uvf
overheadhunter Nov 3, 2024
fd0add4
fixed test
overheadhunter Nov 3, 2024
68eb5d9
fixed linter warnings
overheadhunter Nov 3, 2024
ebd5f7d
Merge branch 'develop' into feature/uvf
overheadhunter Jan 17, 2025
4268484
make tests run from IDE again
overheadhunter Jan 17, 2025
3ca8f78
linter error
overheadhunter Jan 17, 2025
a0ce488
spec is final now
overheadhunter Jan 17, 2025
da7fe40
encode keys with base64url; values with base64
overheadhunter Jan 17, 2025
3cc7d27
use corrected test vectors confirmed in java
overheadhunter Jan 17, 2025
f684a58
fix incorrect hkdf output size
overheadhunter Jan 17, 2025
12106cc
Merge branch 'develop' into feature/uvf
overheadhunter Jan 31, 2025
c1d6c29
reordered flyway migrations
overheadhunter Jan 31, 2025
5a38a4d
Merge branch 'develop' into feature/uvf
overheadhunter Feb 7, 2025
fd6db88
reordered migrations
overheadhunter Feb 7, 2025
1f0b7c6
Merge branch 'develop' into feature/uvf
overheadhunter Feb 24, 2025
cd68e29
Merge branch 'develop' into feature/uvf
overheadhunter Mar 22, 2025
3a65446
Merge branch 'develop' into feature/uvf
overheadhunter Apr 24, 2025
b5a94a9
use base64url in `vault.uvf`
overheadhunter Apr 24, 2025
7e285ea
fix base64url encoding and tests
overheadhunter Apr 24, 2025
6efd702
fix test broken during merge cd68e29
overheadhunter Apr 24, 2025
ce36aa1
run linter
overheadhunter Apr 24, 2025
928b613
Merge branch 'develop' into feature/uvf
overheadhunter May 2, 2025
9fb01db
Merge branch 'develop' into feature/uvf
overheadhunter Jul 8, 2025
27a944d
use 512 bit keys for HMAC-SHA256 as per spec
overheadhunter Jul 8, 2025
b882d6b
Merge branch 'develop' into feature/uvf
tobihagemann Jul 18, 2025
6318fb6
Merge branch 'develop' into feature/uvf
overheadhunter Aug 28, 2025
85f4d30
force big-endian seed IDs
overheadhunter Sep 2, 2025
e7dceec
use `Uint8Array<ArrayBuffer>` (TS 5.7 adjustments)
overheadhunter Sep 2, 2025
703d092
use `Uint8Array<ArrayBuffer>` (TS 5.7 adjustments)
overheadhunter Nov 5, 2025
ce24d91
add missing protected header params
overheadhunter Nov 5, 2025
6bac061
Merge branch 'develop' into feature/uvf
overheadhunter Nov 12, 2025
008b3cd
Merge branch 'develop' into feature/uvf
overheadhunter Nov 13, 2025
7272005
Merge branch 'develop' into feature/uvf
overheadhunter Dec 12, 2025
5ac0762
Merge branch 'develop' into feature/uvf
overheadhunter Jan 9, 2026
04a88c2
Merge branch 'develop' into feature/uvf
overheadhunter Mar 10, 2026
b92e7d3
fix build
overheadhunter Mar 11, 2026
236e9cf
Merge branch 'develop' into feature/uvf
overheadhunter Apr 2, 2026
7e7bd3c
fix frontend build
overheadhunter Apr 2, 2026
e2e0561
fix test
overheadhunter Apr 2, 2026
15f79b5
Merge branch 'develop' into feature/uvf
overheadhunter Apr 14, 2026
9a0f8df
fix test
overheadhunter Apr 14, 2026
4b86f36
Merge branch 'develop' into feature/uvf
overheadhunter Apr 14, 2026
a8135f1
Read `maxWotDepth` from `/api/settings`
overheadhunter May 13, 2026
f5acdcc
Adjust wotMaxDepth constraint: allow -1 to Integer.MAX_VALUE
Copilot May 13, 2026
66d326f
Restore @Max(9) on wotMaxDepth, keep @Min(-1)
Copilot May 13, 2026
aae0e59
Merge pull request #447 from cryptomator/copilot/adjust-settings-dto-…
overheadhunter May 13, 2026
e7a210d
undo #447
overheadhunter May 14, 2026
d0f40df
add `automatic access grant` settings
overheadhunter May 19, 2026
c4ae29f
add `GET /vaults/users-requiring-access-grant`
overheadhunter May 19, 2026
5b7a148
fix test
overheadhunter May 19, 2026
431fa68
Merge branch 'develop' into feature/uvf
overheadhunter May 21, 2026
87cf1c7
Merge branch 'uvf' into `automatic-access-grant`
overheadhunter May 21, 2026
29aaa77
change migration order
overheadhunter May 21, 2026
705f2de
add "automatic" to audit log event
overheadhunter May 21, 2026
da97a13
add `POST /{vaultId}/access-tokens/auto`
overheadhunter May 21, 2026
b7461b3
refine settings UI
overheadhunter May 22, 2026
cd1bf5c
Implement client-side automatic access grant agent
overheadhunter May 22, 2026
8a761db
simplify backoff strategy
overheadhunter May 25, 2026
3c26751
Merge branch 'develop' into feature/uvf
overheadhunter May 26, 2026
6f7b109
Apply suggestions from code review
overheadhunter May 27, 2026
8daa49b
renamed event to avoid confusion
overheadhunter May 27, 2026
cebef13
update event DTOs
overheadhunter May 27, 2026
555a192
remove support for `maxWotDepth: -1`
overheadhunter May 27, 2026
fc820fa
Merge pull request #457 from cryptomator/feature/automatic-access-grant
overheadhunter May 28, 2026
b27700c
Merge branch 'develop' into feature/uvf
overheadhunter May 28, 2026
bf8b70e
Merge branch 'develop' into feature/uvf
overheadhunter Jun 26, 2026
6c8835d
Merge branch 'develop' into feature/uvf
overheadhunter Jun 26, 2026
b81da19
constructor injection
overheadhunter Jun 26, 2026
35b6dcd
Merge branch 'develop' into feature/uvf
overheadhunter Jul 3, 2026
030d106
Merge branch 'develop' into feature/uvf
overheadhunter Jul 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.cryptomator.hub.entities.events.EmergencyAccessRecoveryStartedEvent;
import org.cryptomator.hub.entities.events.EmergencyAccessSettingsUpdatedEvent;
import org.cryptomator.hub.entities.events.EmergencyAccessSetupEvent;
import org.cryptomator.hub.entities.events.SettingAutoGrantUpdateEvent;
import org.cryptomator.hub.entities.events.SettingWotUpdateEvent;
import org.cryptomator.hub.entities.events.SignedWotIdEvent;
import org.cryptomator.hub.entities.events.UserAccountResetEvent;
Expand Down Expand Up @@ -52,7 +53,7 @@
public class AuditLogResource {

private static final Set<String> EVENT_TYPES = Set.of(DeviceRegisteredEvent.TYPE, DeviceRemovedEvent.TYPE, UserAccountResetEvent.TYPE, UserKeysChangeEvent.TYPE, UserSetupCodeChangeEvent.TYPE,
SettingWotUpdateEvent.TYPE, SignedWotIdEvent.TYPE, VaultCreatedEvent.TYPE, VaultUpdatedEvent.TYPE, VaultAccessGrantedEvent.TYPE,
SettingAutoGrantUpdateEvent.TYPE, SettingWotUpdateEvent.TYPE, SignedWotIdEvent.TYPE, VaultCreatedEvent.TYPE, VaultUpdatedEvent.TYPE, VaultAccessGrantedEvent.TYPE,
VaultKeyRetrievedEvent.TYPE, VaultMemberAddedEvent.TYPE, VaultMemberRemovedEvent.TYPE, VaultMemberUpdatedEvent.TYPE, VaultOwnershipClaimedEvent.TYPE,
EmergencyAccessSetupEvent.TYPE, EmergencyAccessSettingsUpdatedEvent.TYPE, EmergencyAccessRecoveryStartedEvent.TYPE, EmergencyAccessRecoveryApprovedEvent.TYPE, EmergencyAccessRecoveryCompletedEvent.TYPE, EmergencyAccessRecoveryAbortedEvent.TYPE);

Expand Down Expand Up @@ -116,6 +117,7 @@ public List<AuditEventDto> getAllEvents(@QueryParam("startDate") Instant startDa
@JsonSubTypes({ //
@JsonSubTypes.Type(value = DeviceRegisteredEventDto.class, name = DeviceRegisteredEvent.TYPE), //
@JsonSubTypes.Type(value = DeviceRemovedEventDto.class, name = DeviceRemovedEvent.TYPE), //
@JsonSubTypes.Type(value = SettingAutoGrantUpdateEventDto.class, name = SettingAutoGrantUpdateEvent.TYPE), //
@JsonSubTypes.Type(value = SettingWotUpdateEventDto.class, name = SettingWotUpdateEvent.TYPE), //
@JsonSubTypes.Type(value = SignedWotIdEventDto.class, name = SignedWotIdEvent.TYPE), //
@JsonSubTypes.Type(value = UserAccountResetEventDto.class, name = UserAccountResetEvent.TYPE), //
Expand Down Expand Up @@ -149,13 +151,14 @@ static AuditEventDto fromEntity(AuditEvent entity) {
case DeviceRegisteredEvent evt -> new DeviceRegisteredEventDto(evt.getId(), evt.getTimestamp(), DeviceRegisteredEvent.TYPE, evt.getRegisteredBy(), evt.getDeviceId(), evt.getDeviceName(), evt.getDeviceType());
case DeviceRemovedEvent evt -> new DeviceRemovedEventDto(evt.getId(), evt.getTimestamp(), DeviceRemovedEvent.TYPE, evt.getRemovedBy(), evt.getDeviceId());
case SignedWotIdEvent evt -> new SignedWotIdEventDto(evt.getId(), evt.getTimestamp(), SignedWotIdEvent.TYPE, evt.getUserId(), evt.getSignerId(), evt.getSignerKey(), evt.getSignature());
case SettingAutoGrantUpdateEvent evt -> new SettingAutoGrantUpdateEventDto(evt.getId(), evt.getTimestamp(), SettingAutoGrantUpdateEvent.TYPE, evt.getUpdatedBy(), evt.isEnabled(), evt.getTrustThreshold(), evt.isAllowOverride());
case SettingWotUpdateEvent evt -> new SettingWotUpdateEventDto(evt.getId(), evt.getTimestamp(), SettingWotUpdateEvent.TYPE, evt.getUpdatedBy(), evt.getWotMaxDepth(), evt.getWotIdVerifyLen());
case UserAccountResetEvent evt -> new UserAccountResetEventDto(evt.getId(), evt.getTimestamp(), UserAccountResetEvent.TYPE, evt.getResetBy());
case UserKeysChangeEvent evt -> new UserKeysChangeEventDto(evt.getId(), evt.getTimestamp(), UserKeysChangeEvent.TYPE, evt.getChangedBy(), evt.getUserName());
case UserSetupCodeChangeEvent evt -> new UserSetupCodeChangeEventDto(evt.getId(), evt.getTimestamp(), UserSetupCodeChangeEvent.TYPE, evt.getChangedBy());
case VaultCreatedEvent evt -> new VaultCreatedEventDto(evt.getId(), evt.getTimestamp(), VaultCreatedEvent.TYPE, evt.getCreatedBy(), evt.getVaultId(), evt.getVaultName(), evt.getVaultDescription());
case VaultUpdatedEvent evt -> new VaultUpdatedEventDto(evt.getId(), evt.getTimestamp(), VaultUpdatedEvent.TYPE, evt.getUpdatedBy(), evt.getVaultId(), evt.getVaultName(), evt.getVaultDescription(), evt.isVaultArchived());
case VaultAccessGrantedEvent evt -> new VaultAccessGrantedEventDto(evt.getId(), evt.getTimestamp(), VaultAccessGrantedEvent.TYPE, evt.getGrantedBy(), evt.getVaultId(), evt.getAuthorityId());
case VaultAccessGrantedEvent evt -> new VaultAccessGrantedEventDto(evt.getId(), evt.getTimestamp(), VaultAccessGrantedEvent.TYPE, evt.getGrantedBy(), evt.getVaultId(), evt.getAuthorityId(), evt.isAutomatic());
case VaultKeyRetrievedEvent evt -> new VaultKeyRetrievedEventDto(evt.getId(), evt.getTimestamp(), VaultKeyRetrievedEvent.TYPE, evt.getRetrievedBy(), evt.getVaultId(), evt.getResult(), evt.getIpAddress(), evt.getDeviceId());
case VaultMemberAddedEvent evt -> new VaultMemberAddedEventDto(evt.getId(), evt.getTimestamp(), VaultMemberAddedEvent.TYPE, evt.getAddedBy(), evt.getVaultId(), evt.getAuthorityId(), evt.getRole());
case VaultMemberRemovedEvent evt -> new VaultMemberRemovedEventDto(evt.getId(), evt.getTimestamp(), VaultMemberRemovedEvent.TYPE, evt.getRemovedBy(), evt.getVaultId(), evt.getAuthorityId());
Expand Down Expand Up @@ -183,6 +186,10 @@ record SignedWotIdEventDto(long id, Instant timestamp, String type, @JsonPropert
@JsonProperty("signature") String signature) implements AuditEventDto {
}

record SettingAutoGrantUpdateEventDto(long id, Instant timestamp, String type, @JsonProperty("updatedBy") String updatedBy, @JsonProperty("enabled") boolean enabled,
@JsonProperty("trustThreshold") int trustThreshold, @JsonProperty("allowOverride") boolean allowOverride) implements AuditEventDto {
}

record SettingWotUpdateEventDto(long id, Instant timestamp, String type, @JsonProperty("updatedBy") String updatedBy, @JsonProperty("wotMaxDepth") int wotMaxDepth,
@JsonProperty("wotIdVerifyLen") int wotIdVerifyLen) implements AuditEventDto {
}
Expand All @@ -205,7 +212,7 @@ record VaultUpdatedEventDto(long id, Instant timestamp, String type, @JsonProper
}

record VaultAccessGrantedEventDto(long id, Instant timestamp, String type, @JsonProperty("grantedBy") String grantedBy, @JsonProperty("vaultId") UUID vaultId,
@JsonProperty("authorityId") String authorityId) implements AuditEventDto {
@JsonProperty("authorityId") String authorityId, @JsonProperty("automatic") boolean automatic) implements AuditEventDto {
}

record VaultKeyRetrievedEventDto(long id, Instant timestamp, String type, @JsonProperty("retrievedBy") String retrievedBy, @JsonProperty("vaultId") UUID vaultId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,19 @@ public Response put(@NotNull @Valid SettingsDto dto) {
var oldMinMembers = settings.getDefaultMinMembers();
var oldAllowChoosingEmergencyCouncil = settings.isAllowChoosingEmergencyCouncil();
var oldEmergencyAccessEnabled = settings.isEmergencyAccessEnabled();
var oldAutoGrantEnabled = settings.isAutomaticAccessGrantEnabled();
var oldAutoGrantTrustThreshold = settings.getAutomaticAccessGrantTrustThreshold();
var oldAutoGrantAllowOverride = settings.isAllowAutomaticAccessGrantOverride();
settings.setWotMaxDepth(dto.wotMaxDepth);
settings.setWotIdVerifyLen(dto.wotIdVerifyLen);
settings.setDefaultRequiredEmergencyKeyShares(dto.defaultRequiredEmergencyKeyShares);
settings.setDefaultMinMembers(dto.defaultMinMembers);
settings.setAllowChoosingEmergencyCouncil(dto.allowChoosingEmergencyCouncil);
settings.setEmergencyCouncilMemberIds(dto.emergencyCouncilMemberIds);
settings.setEmergencyAccessEnabled(dto.enableEmergencyAccess);
settings.setAutomaticAccessGrantEnabled(dto.enableAutomaticAccessGrant);
settings.setAutomaticAccessGrantTrustThreshold(dto.automaticAccessGrantTrustThreshold);
settings.setAllowAutomaticAccessGrantOverride(dto.allowAutomaticAccessGrantOverride);
settingsRepo.persist(settings);
if (oldWotMaxDepth != dto.wotMaxDepth || oldWotIdVerifyLen != dto.wotIdVerifyLen) {
eventLogger.logWotSettingUpdated(jwt.getSubject(), dto.wotIdVerifyLen, dto.wotMaxDepth);
Expand All @@ -85,6 +91,11 @@ public Response put(@NotNull @Valid SettingsDto dto) {
var councilMemberIds = "[" + dto.emergencyCouncilMemberIds.stream().map(s -> "\"" + s + "\"").collect(Collectors.joining(", ")) + "]";
eventLogger.logEmergencyAccessSettingsUpdated(jwt.getSubject(), dto.enableEmergencyAccess, councilMemberIds, dto.defaultRequiredEmergencyKeyShares, dto.defaultMinMembers, dto.allowChoosingEmergencyCouncil);
}
if (oldAutoGrantEnabled != dto.enableAutomaticAccessGrant
|| oldAutoGrantTrustThreshold != dto.automaticAccessGrantTrustThreshold
|| oldAutoGrantAllowOverride != dto.allowAutomaticAccessGrantOverride) {
eventLogger.logAutoGrantSettingUpdated(jwt.getSubject(), dto.enableAutomaticAccessGrant, dto.automaticAccessGrantTrustThreshold, dto.allowAutomaticAccessGrantOverride);
}
return Response.status(Response.Status.NO_CONTENT).build();
}

Expand All @@ -95,10 +106,13 @@ public record SettingsDto(@JsonProperty("hubId") String hubId,
@JsonProperty("defaultRequiredEmergencyKeyShares") @Min(0) int defaultRequiredEmergencyKeyShares,
@JsonProperty("defaultMinMembers") @Min(0) int defaultMinMembers,
@JsonProperty("allowChoosingEmergencyCouncil") boolean allowChoosingEmergencyCouncil,
@JsonProperty("emergencyCouncilMemberIds") @NotNull Set<String> emergencyCouncilMemberIds) {
@JsonProperty("emergencyCouncilMemberIds") @NotNull Set<String> emergencyCouncilMemberIds,
@JsonProperty("enableAutomaticAccessGrant") boolean enableAutomaticAccessGrant,
@JsonProperty("automaticAccessGrantTrustThreshold") @Min(-1) @Max(9) int automaticAccessGrantTrustThreshold,
@JsonProperty("allowAutomaticAccessGrantOverride") boolean allowAutomaticAccessGrantOverride) {

public static SettingsDto fromEntity(Settings entity) {
return new SettingsDto(entity.getHubId(), entity.getWotMaxDepth(), entity.getWotIdVerifyLen(), entity.isEmergencyAccessEnabled(), entity.getDefaultRequiredEmergencyKeyShares(), entity.getDefaultMinMembers(), entity.isAllowChoosingEmergencyCouncil(), entity.getEmergencyCouncilMemberIds());
return new SettingsDto(entity.getHubId(), entity.getWotMaxDepth(), entity.getWotIdVerifyLen(), entity.isEmergencyAccessEnabled(), entity.getDefaultRequiredEmergencyKeyShares(), entity.getDefaultMinMembers(), entity.isAllowChoosingEmergencyCouncil(), entity.getEmergencyCouncilMemberIds(), entity.isAutomaticAccessGrantEnabled(), entity.getAutomaticAccessGrantTrustThreshold(), entity.isAllowAutomaticAccessGrantOverride());
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public Response updateMyAccessTokens(@NotNull Map<UUID, String> tokens) {
}
token.setVaultKey(entry.getValue());
accessTokenRepo.persist(token);
eventLogger.logVaultAccessGranted(user.getId(), vault.getId(), user.getId());
eventLogger.logVaultAccessGranted(user.getId(), vault.getId(), user.getId(), false);
}
return Response.ok().build();
}
Expand Down
Loading