Skip to main content

JTI (Token Revocation) API

Table of Contents​

Top

upsquad/jti/v1/config.proto​

GetJTIFeatureFlagConfigRequest​

GetJTIFeatureFlagConfigRequest is deliberately empty — tenant_id is sourced from the authenticated context.

GetJTIFeatureFlagConfigResponse​

GetJTIFeatureFlagConfigResponse carries the current configuration.

FieldTypeLabelDescription
configJTIFeatureFlagConfigConfig is the current configuration for the caller's tenant.

JTIFeatureFlagConfig​

JTIFeatureFlagConfig describes the current runtime gating for JTI replay protection. Field clearances annotated per HLD §1.1.

FieldTypeLabelDescription
modestringMode is the enforcement mode. One of "disabled", "log_warn", "hard_deny" — see internal/gateway/jti.go JTIMode constants. L5: switching this flag across the deny boundary is a platform- operator action.
sample_ratedoubleSampleRate is the fraction of tokens consulted by the replay store in log_warn mode (0.0–1.0). At 1.0 every token round-trips Redis; lower values reduce Redis pressure at the cost of detection sensitivity. Ignored in hard_deny mode (all tokens are consulted). L5 — throttles a security control.
ttl_secondsint64TTLSeconds is the TTL applied to replay-set entries (24h–7d practical range). Must exceed the maximum JWT exp lifetime. L5.
updated_atgoogle.protobuf.TimestampUpdatedAt is set server-side on every Update* call. Never accepted from the client.

UpdateJTIFeatureFlagConfigRequest​

UpdateJTIFeatureFlagConfigRequest replaces the full configuration. Only the config field is accepted from the wire; updated_at is server-stamped.

FieldTypeLabelDescription
configJTIFeatureFlagConfigConfig is the desired new configuration. Must pass Validate().

UpdateJTIFeatureFlagConfigResponse​

UpdateJTIFeatureFlagConfigResponse echoes the newly-persisted configuration so the caveman-ui form can refresh without a second round-trip.

FieldTypeLabelDescription
configJTIFeatureFlagConfigConfig is the configuration that was persisted.

JTIFeatureFlagConfigService​

JTIFeatureFlagConfigService exposes the JWT jti replay-protection configuration for Connect-RPC callers. Wired into the gateway's Connect mux per LLD-4 §2.2 (all Phase B config APIs live alongside gateway).

Method NameRequest TypeResponse TypeDescription
GetJTIFeatureFlagConfigGetJTIFeatureFlagConfigRequestGetJTIFeatureFlagConfigResponseGet the current JTI feature flag configuration for the caller's tenant. Read-only — no audit event emitted. Clearance L3 (tenant admin) is sufficient to view.
UpdateJTIFeatureFlagConfigUpdateJTIFeatureFlagConfigRequestUpdateJTIFeatureFlagConfigResponseReplace the JTI feature flag configuration. Returns InvalidArgument with a FieldViolation[] for validation failures (no silent-skip). Emits one config.updated audit event with field-level diff on success. Clearance L5 (platform operator) — the flag governs an authn primitive.

Scalar Value Types​

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)