proxystore.endpoint.identity¶
Endpoint identities.
Each endpoint has an ed25519 secret key which is stored in its directory.
The public key of the endpoint, its
EndpointId, identifies the
endpoint to clients and peer endpoints. Peers verify each other's
identity when establishing a connection because only the endpoint which has
the secret key can prove ownership of the public key.
EndpointId
¶
Bases: str
ID of an endpoint.
The ID is the endpoint's ed25519 public key encoded as 64 lowercase
hexadecimal characters. An EndpointId is a str so it can be used
anywhere a string is expected (e.g., serialized in configuration files).
Every instance is a valid public key (not every 32-byte value is).
The constructor only accepts the exact format. Use
from_str() to also
accept surrounding whitespace and uppercase characters.
Example
Raises:
-
ValueError–If the value is not a valid endpoint ID.
from_str
classmethod
¶
Parse an endpoint ID.
Parameters:
-
value(str) –Endpoint ID encoded as 64 hexadecimal characters. Surrounding whitespace is removed and uppercase characters are converted to lowercase.
Raises:
-
ValueError–If
valueis not a valid endpoint ID.
Source code in proxystore/endpoint/identity.py
random
classmethod
¶
random() -> Self
Generate the ID of a new random endpoint.
The secret key of the endpoint is discarded so this is only useful when an ID is needed but the endpoint is not (e.g., in tests).
Source code in proxystore/endpoint/identity.py
SecretKey
¶
SecretKey(key: bytes)
Secret key of an endpoint.
The secret key is an ed25519 key which proves the identity of the
endpoint to peers. The key is never included in its repr() so it is not
accidentally logged.
Example
Parameters:
-
key(bytes) –Raw bytes of the secret key.
Raises:
-
ValueError–If
keyis not a valid secret key.
Source code in proxystore/endpoint/identity.py
endpoint_id
property
¶
endpoint_id: EndpointId
ID of the endpoint with this secret key (i.e., the public key).