Skip to main content

utic-invocation-settings

Public library for consuming encrypted Unstructured plugin invocation settings — the plugin-side half of the cellular-dataplane "settings in the invoke payload" design. It reads the v1 settings envelope (RSA-OAEP-256-wrapped AES-256-GCM), decrypts inside the plugin at invoke time, and caches only previously authenticated envelopes.

It is deliberately self-contained on cryptography + pydantic — no dependency on any private-feed package — so it can be published to public PyPI and imported by external plugin authors.

Why

Under the cellular dataplane, a shared pod may serve multiple tenants, so a plugin identity decrypts settings routed to that plugin rather than a shared service handing out plaintext. Settings arrive as an opaque ciphertext envelope; this library turns that envelope into a plain settings object, verifying integrity and never logging secrets.

The wire format is frozen in cellular-dataplane/docs/envelope-contract-v1.md. The producer (Secrets Provider / operator) emits exactly that shape; this library is the reference consumer.

Usage

from utic_invocation_settings import extract_envelope, decrypt_settings, TTLCache

_settings_cache = TTLCache(ttl_seconds=300)     # keyed by full-envelope fingerprint
_key_cache = TTLCache(ttl_seconds=3600)         # keyed by recipient + encryption-key digest

def load_private_key(kid: str):
    # Load the RSA private key for this plugin identity's certificate from the mounted secret.
    ...

def on_invoke(body: dict):
    env = extract_envelope(body)
    if env is None:
        return load_legacy_job_settings_file()   # transitional dual-path
    return decrypt_settings(
        env,
        private_key_loader=load_private_key,
        settings_cache=_settings_cache,
        key_cache=_key_cache,
    )

Every failure (unknown format, missing key, RSA/GCM failure, digest mismatch) raises a subclass of InvocationSettingsError — it never returns partial or unverified plaintext.

Develop

make install     # uv sync
make test        # unit tests + coverage
make check       # ruff

Note: published to public PyPI on merge to main (see repo README).

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

utic_invocation_settings-0.1.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file utic_invocation_settings-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for utic_invocation_settings-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd50b147c3c645304932faf8abdcd558a5014a74d10e691323233bd24d0b2c60
MD5 cabfaac600427e50e56eaa8b20c848ba
BLAKE2b-256 19b987cefad2a637ef18e8edc8256fd95374d0bf7085a2481b4e656c85a53622

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 Sentry Error logging StatusPage Status page