Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_certs_remote_ca Discord

Swarmauri Remote CA Cert Service

A certificate enrollment bridge implementing the ICertService interface and forwarding CSRs to a remote Certificate Authority.

Features

  • Posts CSRs to a remote endpoint and returns issued certificates.
  • Minimal parsing helpers for certificate snippets.
  • Designed around X.509 as defined in RFC 5280 and Enrollment over Secure Transport (EST) in RFC 7030.

Installation

Install the package with your preferred Python packaging tool:

pip install swarmauri_certs_remote_ca
poetry add swarmauri_certs_remote_ca
uv pip install swarmauri_certs_remote_ca

Configuration

RemoteCaCertService accepts the following arguments:

  • endpoint ? Base URL of the remote CA sign endpoint.
  • auth ? Optional mapping of HTTP headers or an httpx.Auth instance for authentication.
  • timeout_s ? HTTP timeout in seconds (default 10).
  • ca_chain ? Optional sequence of cached trust anchors exposed during verification and parsing.

Entry Point

The service registers under the swarmauri.certs entry point as RemoteCaCertService.

Usage

The service is asynchronous and expects an existing CSR (certificate signing request) in PEM or DER form. Configure the remote CA endpoint and submit the CSR to receive the issued certificate:

import asyncio
import base64
import json

import httpx

from swarmauri_certs_remote_ca import RemoteCaCertService

csr = b"example-csr"
cert_bytes = b"example-cert"


async def main() -> None:
    async def handler(request: httpx.Request) -> httpx.Response:
        data = json.loads(request.content)
        assert base64.b64decode(data["csr"]) == csr
        return httpx.Response(
            200,
            json={"cert": base64.b64encode(cert_bytes).decode("ascii")},
        )

    svc = RemoteCaCertService("https://ca.example/sign")

    async with httpx.AsyncClient(transport=httpx.MockTransport(handler)) as client:
        svc._client = client  # Inject mock transport for the example.
        certificate = await svc.sign_cert(csr, {"kind": "dummy"})
        print(certificate)


asyncio.run(main())

The example above mocks a CA using httpx.MockTransport. In real scenarios RemoteCaCertService posts the CSR to the configured endpoint and returns the certificate bytes supplied by the remote CA.

When used against a real service, provide any required authentication headers through the auth argument and override request or response formats via the opts parameter of sign_cert.

Want to help?

If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.

Metadata

Release files for swarmauri_certs_remote_ca 0.11.0.dev2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swarmauri_certs_remote_ca 0.11.0.dev2
File Size Uploaded
swarmauri_certs_remote_ca-0.11.0.dev2.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swarmauri_certs_remote_ca 0.11.0.dev2
File Interpreter ABI Platform
swarmauri_certs_remote_ca-0.11.0.dev2-py3-none-any.whl Python 3 none any Details

Total release size: 20.0 kB

Release files / swarmauri_certs_remote_ca-0.11.0.dev2.tar.gz

Download URL swarmauri_certs_remote_ca-0.11.0.dev2.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
02a3c47b40151f1695b41f21b99b459f938c5fe241a2f644b697334a9b64120d
BLAKE2b-256 checksum
How to use checksums
1eb3b4ab72e34f38cd6e43aeac2935dd5c6af14e524e73dac2cb27a7ec677b71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / swarmauri_certs_remote_ca-0.11.0.dev2-py3-none-any.whl

Download URL swarmauri_certs_remote_ca-0.11.0.dev2-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b970ae3c3408126409cc8656cba3c1054008e9760c2abcf508a471c558f2c790
BLAKE2b-256 checksum
How to use checksums
5edf15e63d14dccb90a214e09f58745f1efb42dbfbc0f698674bafc6cf67a5a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page