Class swarmauri_core.keys.IKeyProvider.IKeyProvider
swarmauri_core.keys.IKeyProvider.IKeyProvider
Bases: ABC
Stable, minimal surface for key lifecycle and randomness/KDF utilities.
Implementations MUST populate the fingerprint
attribute on returned
:class:~swarmauri_core.crypto.types.KeyRef
instances. The fingerprint is a
provider-defined stable identifier derived from the key's material or public
representation.
supports
abstractmethod
supports()
Return capability map for this provider.
Source code in swarmauri_core/keys/IKeyProvider.py
20 21 22 |
|
create_key
abstractmethod
async
create_key(spec)
Generate a new key and return a :class:KeyRef
.
Source code in swarmauri_core/keys/IKeyProvider.py
24 25 26 |
|
import_key
abstractmethod
async
import_key(spec, material, *, public=None)
Import an existing key and return its :class:KeyRef
.
Source code in swarmauri_core/keys/IKeyProvider.py
28 29 30 31 32 33 34 35 36 |
|
rotate_key
abstractmethod
async
rotate_key(kid, *, spec_overrides=None)
Create a new version for an existing key.
Source code in swarmauri_core/keys/IKeyProvider.py
38 39 40 41 42 |
|
destroy_key
abstractmethod
async
destroy_key(kid, version=None)
Destroy a key or specific version.
Source code in swarmauri_core/keys/IKeyProvider.py
44 45 46 |
|
get_key
abstractmethod
async
get_key(kid, version=None, *, include_secret=False)
Fetch a :class:KeyRef
for the given key id/version.
Source code in swarmauri_core/keys/IKeyProvider.py
48 49 50 51 52 53 54 55 56 |
|
get_key_by_ref
async
get_key_by_ref(key_ref, *, include_secret=False)
Resolve an opaque key reference into a :class:KeyRef
instance.
Source code in swarmauri_core/keys/IKeyProvider.py
58 59 60 61 62 63 64 65 66 67 68 |
|
list_versions
abstractmethod
async
list_versions(kid)
Return available versions for a key.
Source code in swarmauri_core/keys/IKeyProvider.py
70 71 72 |
|
get_public_jwk
abstractmethod
async
get_public_jwk(kid, version=None)
Return an RFC 7517 JWK for the public portion of the key.
Source code in swarmauri_core/keys/IKeyProvider.py
74 75 76 |
|
jwks
abstractmethod
async
jwks(*, prefix_kids=None)
Return a JWKS document containing the latest versions of keys.
Source code in swarmauri_core/keys/IKeyProvider.py
78 79 80 |
|
random_bytes
abstractmethod
async
random_bytes(n)
Return n
cryptographically secure random bytes.
Source code in swarmauri_core/keys/IKeyProvider.py
82 83 84 |
|
hkdf
abstractmethod
async
hkdf(ikm, *, salt, info, length)
Derive key material using HKDF-SHA256.
Source code in swarmauri_core/keys/IKeyProvider.py
86 87 88 |
|