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

File metadata

File hashes

Hashes for swarmauri_keyprovider_ssh-0.3.0.dev3.tar.gz
Algorithm Hash digest
SHA256 8a2649e71d8943725d4cb30306cb1d1d3c5b5f2d788b0ec32d4870d671424980
MD5 1a0d9070637fd2f7a89d352f5fbcc860
BLAKE2b-256 0c23eae4e7b786b791e50669a73de216c1966f955726c31eacd846b36b348312

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swarmauri_keyprovider_ssh-0.3.0.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 6646cf4d0ba13dc3af13a597a5314a542b3e47e15b999eeaaa42f453036301f8
MD5 81f440de184f969291317d2ba37e34c1
BLAKE2b-256 0d39ceb18eacf439e74d83e9f9566de9ca3424355fcf2fd55315cc9e4fc59295

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