Skip to main content

SSH-based key provider for Swarmauri

Project description

Swamauri Logo

Swarmauri SSH Key Provider

Interfaces with local SSH keys to generate and manage signing keys.

Installation

pip install swarmauri_keyprovider_ssh

Usage

The provider exposes an asynchronous interface for creating and managing SSH-based signing keys. The snippet below creates a new Ed25519 key and exports its public component as a JSON Web Key (JWK):

import asyncio
from swarmauri_keyprovider_ssh import SshKeyProvider
from swarmauri_core.keys.types import (
    KeySpec,
    KeyAlg,
    KeyClass,
    ExportPolicy,
    KeyUse,
)


async def main() -> None:
    provider = SshKeyProvider()
    spec = KeySpec(
        klass=KeyClass.asymmetric,
        alg=KeyAlg.ED25519,
        uses=(KeyUse.SIGN, KeyUse.VERIFY),
        export_policy=ExportPolicy.PUBLIC_ONLY,
    )
    ref = await provider.create_key(spec)
    jwk = await provider.get_public_jwk(ref.kid)
    print(jwk)


asyncio.run(main())

Keys can also be rotated, and the provider will track key versions:

ref = await provider.create_key(spec)
await provider.rotate_key(ref.kid)
assert await provider.list_versions(ref.kid) == (1, 2)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmauri_keyprovider_ssh-0.3.0.dev2.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file swarmauri_keyprovider_ssh-0.3.0.dev2.tar.gz.

File metadata

File hashes

Hashes for swarmauri_keyprovider_ssh-0.3.0.dev2.tar.gz
Algorithm Hash digest
SHA256 7428dd7a568032963539564c1603a52a966e90b475c9f8380af67a0b0bf81483
MD5 76ef41d99b64fe6bde3df269b85e6888
BLAKE2b-256 0222f52d0d297fa3f501effaefea74600057db7d42f1a14bf7bbac906b2ee448

See more details on using hashes here.

File details

Details for the file swarmauri_keyprovider_ssh-0.3.0.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_keyprovider_ssh-0.3.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 f4bf87712321369aefa1f262a87bfee0a66b39c549e20b11259d2943ebfeda74
MD5 74001acd0cdd93f0984fd8f0340556e7
BLAKE2b-256 b63a2d81bfb7e02910f99986e32dfbe24a2dc9f14805e927862f769e582d8ea8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page