JTI (Token Revocation) API
Table of Contents
upsquad/jti/v1/config.proto
GetJTIFeatureFlagConfigRequest
GetJTIFeatureFlagConfigRequest is deliberately empty — tenant_id is sourced from the authenticated context.
GetJTIFeatureFlagConfigResponse
GetJTIFeatureFlagConfigResponse carries the current configuration.
| Field | Type | Label | Description |
|---|---|---|---|
| config | JTIFeatureFlagConfig | Config 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.
| Field | Type | Label | Description |
|---|---|---|---|
| mode | string | Mode 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_rate | double | SampleRate 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_seconds | int64 | TTLSeconds is the TTL applied to replay-set entries (24h–7d practical range). Must exceed the maximum JWT exp lifetime. L5. | |
| updated_at | google.protobuf.Timestamp | UpdatedAt 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.
| Field | Type | Label | Description |
|---|---|---|---|
| config | JTIFeatureFlagConfig | Config 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.
| Field | Type | Label | Description |
|---|---|---|---|
| config | JTIFeatureFlagConfig | Config 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 Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetJTIFeatureFlagConfig | GetJTIFeatureFlagConfigRequest | GetJTIFeatureFlagConfigResponse | Get 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. |
| UpdateJTIFeatureFlagConfig | UpdateJTIFeatureFlagConfigRequest | UpdateJTIFeatureFlagConfigResponse | Replace 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 Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
|---|---|---|---|---|---|---|---|---|
| double | double | double | float | float64 | double | float | Float | |
| float | float | float | float | float32 | float | float | Float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |