Record Class KeyFilters
- Record Components:
origin- key origin filter (e.g.GENERATED,IMPORTED);nullto skiprestricted- restricted-flag filter;nullto skipkty- key type filter (e.g.RSA,ML-KEM,oct, orCompositeMode.KEY_TYPEfor every composite key);nullto skipstatus- lifecycle status filter, as the published token (e.g.active,revoked);deleted_logicalselects the tenant's destroyed keys, which no other value (and nonull) returns;nullto skip
listKeys(filters, page, size) are filtered, tenant-scoped counts.
Pass null for any dimension that should not be filtered; use
none() for an unfiltered listing. Filters combine with AND logic.
Example
// All active ML-KEM keys
KeyFilters filters = new KeyFilters(null, null, "ML-KEM", "active");
// All imported keys
KeyFilters imported = new KeyFilters("IMPORTED", null, null, null);
The status filter takes the SAME token a key's status field carries in the
response, so a value read back from a listing selects that key when passed straight in here.
origin is a separate vocabulary and is genuinely upper-case.
Why kty is a String and not a typed vocabulary
The published contract DOES declare a closed vocabulary: the kty query parameter of
GET /api/v3/key-management/keys carries an inline enum of the twenty published key
types in AnkaSecureAPI.json. openapi-generator does not lift an INLINE parameter enum into
a named type, so the generated KeyQueryApi.listAllKeys takes a String and this
record mirrors it. The server is therefore the validator: an unrecognised token is answered with a
400 naming the accepted set, and a composite CONSTRUCTION name is answered with the detail
"… is a composite mode, not a key type".
Composite keys are selected with the single coarse CompositeMode.KEY_TYPE token — one
value for every pairing and every construction. There is no construction-level filter on this
endpoint; the catalogue endpoint is the one that takes a compositeMode filter (see
AlgorithmFilter.Builder.withCompositeMode(co.ankatech.ankasecure.sdk.model.CompositeMode...)).
-
Constructor Summary
ConstructorsConstructorDescriptionKeyFilters(String origin, Boolean restricted, String kty, String status) Refuses the SDK's read-only unknown tokens as filter values. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kty()Returns the value of thektyrecord component.static KeyFiltersnone()An unfiltered listing: every key the tenant still holds, in any lifecycle state (active, expired, suspended, revoked, archived, pending_destruction).origin()Returns the value of theoriginrecord component.Returns the value of therestrictedrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
KeyFilters
Refuses the SDK's read-only unknown tokens as filter values.The comparison trims the value, as the server does before it matches a filter token, and ignores case: no spelling of the unknown token is a published origin or status, so every spelling is refused here instead of reaching the server as a filter.
-
-
Method Details
-
none
An unfiltered listing: every key the tenant still holds, in any lifecycle state (active, expired, suspended, revoked, archived, pending_destruction). Destroyed keys are not part of it; they are returned only when the status filter isdeleted_logical, as rows that carry the key's identity and destruction date but no algorithm, key type or usage.- Returns:
- the filter set that narrows nothing
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
restricted
Returns the value of therestrictedrecord component.- Returns:
- the value of the
restrictedrecord component
-
kty
Returns the value of thektyrecord component.- Returns:
- the value of the
ktyrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-