Require some tree head sizes in key transparency search and monitor requests

This commit is contained in:
Katherine
2024-10-31 10:54:55 -04:00
committed by GitHub
parent 9b5a62e60f
commit e627d4e2c4
4 changed files with 61 additions and 62 deletions

View File

@@ -36,12 +36,10 @@ public record KeyTransparencyMonitorRequest(
Optional<@Valid UsernameHashMonitor> usernameHash,
@Schema(description = "The tree head size to prove consistency against.")
@NotNull
Optional<@Positive Long> lastNonDistinguishedTreeHeadSize,
@Positive long lastNonDistinguishedTreeHeadSize,
@Schema(description = "The distinguished tree head size to prove consistency against.")
@NotNull
Optional<@Positive Long> lastDistinguishedTreeHeadSize
@Positive long lastDistinguishedTreeHeadSize
) {
public record AciMonitor(

View File

@@ -51,8 +51,9 @@ public record KeyTransparencySearchRequest(
@Schema(description = "The non-distinguished tree head size to prove consistency against.")
Optional<@Positive Long> lastTreeHeadSize,
@NotNull
@Schema(description = "The distinguished tree head size to prove consistency against.")
Optional<@Positive Long> distinguishedTreeHeadSize
@Positive long distinguishedTreeHeadSize
) {
@AssertTrue
public boolean isUnidentifiedAccessKeyProvidedWithE164() {