SDK that every SkyDefended-coupled App must integrate to expose its operational plane to NCN operators via outbound-only telemetry and command polling.
Project description
@nexocyber-networks/operator-surface — Python runtime
Python port of the TypeScript SDK.
Same model, same TTLs, same wire formats — different language idiom
(async/await, pydantic v2, contextmanagers).
Status: v0.2.0 — partial parity with TS v0.3.x. 5 modules shipped (bootstrap, bundle sync, credential refresh, infra audit push, app token introspect). Signed envelope
App→Enginelands in v0.3.0 (next milestone). SeeCHANGELOG.md.
Install
pip install nexocyber-networks-operator-surface
(Or with uv add, poetry add, etc.)
Why it exists
If your App is a Python service (FastAPI, Flask, Django, plain asyncio) that gets coupled to a SkyDefended deployment, this SDK is not optional. It encodes the operator-surface contract: outbound-only push, signed envelopes, replay-protected JWTs, audit queue with retry, policy bundle verification.
Reimplementing those locally is anti-pattern Doc 19 §3 — drift between runtimes silently breaks the trust model.
Quick start (bootstrap)
import asyncio
import os
from skydefended_operator_surface import bootstrap_app
async def main() -> None:
creds = await bootstrap_app(
control_api_url=os.environ["CONTROL_API_URL"],
app_slug=os.environ["APP_SLUG"],
bootstrap_token=os.environ["BOOTSTRAP_TOKEN"],
node_id=os.environ.get("NODE_ID"),
)
# `creds` now has:
# appSlug, appId, serviceCredential, credentialVersion,
# privateKeyPem, publicKeyPem, kid
# Persist them (Vault, file, etc.) and pass into the rest of the SDK.
print(f"bootstrapped {creds.app_slug} kid={creds.kid}")
asyncio.run(main())
See docs/ for the per-module guides.
API parity with TS
| TS export | Python export |
|---|---|
bootstrapApp() |
skydefended_operator_surface.bootstrap_app |
createEngineSigner() |
skydefended_operator_surface.create_engine_signer |
createPolicyBundleSync() |
skydefended_operator_surface.create_policy_bundle_sync |
createCredentialRefresher() |
skydefended_operator_surface.create_credential_refresher |
createInfraAuditQueue() |
skydefended_operator_surface.create_infra_audit_queue |
createAppTokenIntrospector() |
skydefended_operator_surface.create_app_token_introspector |
TTLs (wrapper 60s, bundle 5min poll / 24h TTL / 7d grace, introspect positive 30s, credential refresh at 80%, jti dedup 60s) are constants exported from the top-level namespace — exactly the same values as the TS runtime. CI runs shared fixtures against both runtimes.
Versioning
Lock-step with the TS SDK at the minor level. When TS ships 0.3.x,
Python ships 0.3.x in parallel with the same change set. Patch-level
fixes can diverge.
License
UNLICENSED — internal NCN SDK.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nexocyber_networks_operator_surface-0.3.10.tar.gz.
File metadata
- Download URL: nexocyber_networks_operator_surface-0.3.10.tar.gz
- Upload date:
- Size: 88.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bfd565d0f7033041b3d3bcc05391a18bcf4f05cf58d8ba783b38e62f7643a67
|
|
| MD5 |
00bed701be050da14a6adc4a987c1659
|
|
| BLAKE2b-256 |
ab8d8fbedf2ebb8cdbc3f9ac19fdb0eb05a3d22899f288e1cbc1ceab95e1ca22
|
Provenance
The following attestation bundles were made for nexocyber_networks_operator_surface-0.3.10.tar.gz:
Publisher:
publish.yml on NexoCyber-Networks/skydefended-app-operator-surface-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nexocyber_networks_operator_surface-0.3.10.tar.gz -
Subject digest:
1bfd565d0f7033041b3d3bcc05391a18bcf4f05cf58d8ba783b38e62f7643a67 - Sigstore transparency entry: 2117481706
- Sigstore integration time:
-
Permalink:
NexoCyber-Networks/skydefended-app-operator-surface-py@18228be3272eac7e087ea8439e5df6487d0fc9ff -
Branch / Tag:
refs/tags/v0.3.10 - Owner: https://github.com/NexoCyber-Networks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@18228be3272eac7e087ea8439e5df6487d0fc9ff -
Trigger Event:
push
-
Statement type:
File details
Details for the file nexocyber_networks_operator_surface-0.3.10-py3-none-any.whl.
File metadata
- Download URL: nexocyber_networks_operator_surface-0.3.10-py3-none-any.whl
- Upload date:
- Size: 114.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd3ef1ef10a99dc086c8a0410c5c9531534866638432ef785982840d89d72695
|
|
| MD5 |
f64de7eb0ced2c90d442acf02f771bc0
|
|
| BLAKE2b-256 |
fbc2ed7e6ad965066dbe065a4b63a1b6e769f313e5d2a96408a3985b370ab021
|
Provenance
The following attestation bundles were made for nexocyber_networks_operator_surface-0.3.10-py3-none-any.whl:
Publisher:
publish.yml on NexoCyber-Networks/skydefended-app-operator-surface-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nexocyber_networks_operator_surface-0.3.10-py3-none-any.whl -
Subject digest:
cd3ef1ef10a99dc086c8a0410c5c9531534866638432ef785982840d89d72695 - Sigstore transparency entry: 2117481751
- Sigstore integration time:
-
Permalink:
NexoCyber-Networks/skydefended-app-operator-surface-py@18228be3272eac7e087ea8439e5df6487d0fc9ff -
Branch / Tag:
refs/tags/v0.3.10 - Owner: https://github.com/NexoCyber-Networks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@18228be3272eac7e087ea8439e5df6487d0fc9ff -
Trigger Event:
push
-
Statement type: