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.dev4.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.dev4.tar.gz.

File metadata

File hashes

Hashes for swarmauri_keyprovider_ssh-0.3.0.dev4.tar.gz
Algorithm Hash digest
SHA256 ce812c005c11c72422ddc43c09b0fc059a3fd5e026871db22ec4f57ebc6cee68
MD5 fc2e80828f8984afaca82345f620dc6c
BLAKE2b-256 05a8aa24071be2d068139348aca9ab0b8fae135b6ea04a20bad78dc285f852b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swarmauri_keyprovider_ssh-0.3.0.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 022c10d58af4e2b33b9f3ff1f81dd2f407113bde2408db978cf70d6838903399
MD5 6c352fdb011282274e3564f5ae43e97a
BLAKE2b-256 a543822ef47968cf53092940aaf3e39f1279544b1ab6bb54fd890b8bdca783c7

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