Support searching for identifiers in the key transparency log by version

This commit is contained in:
Katherine
2025-10-29 16:22:55 -04:00
committed by GitHub
parent d7a9e3c9f3
commit 3116913378
5 changed files with 121 additions and 66 deletions

View File

@@ -76,8 +76,10 @@ public class KeyTransparencyController {
)
@ApiResponse(responseCode = "200", description = "The ACI was found and its mapped value matched the provided ACI identity key", useReturnTypeSchema = true)
@ApiResponse(responseCode = "400", description = "Invalid request. See response for any available details.")
@ApiResponse(responseCode = "403", description = "The ACI was found but its mapped value did not match the provided ACI identity key")
@ApiResponse(responseCode = "404", description = "The ACI was not found in the log")
@ApiResponse(responseCode = "403", description = """
The ACI was found but its mapped value did not match the provided ACI identity key
or the ACI was not found in the log.
""")
@ApiResponse(responseCode = "422", description = "Invalid request format")
@ApiResponse(responseCode = "429", description = "Rate-limited")
@POST
@@ -108,7 +110,10 @@ public class KeyTransparencyController {
request.usernameHash().map(ByteString::copyFrom),
maybeE164SearchRequest,
request.lastTreeHeadSize(),
request.distinguishedTreeHeadSize())
request.distinguishedTreeHeadSize(),
request.aciVersion(),
request.e164Version(),
request.usernameHashVersion())
.toByteArray());
} catch (final StatusRuntimeException exception) {
handleKeyTransparencyServiceError(exception);