Skip to main content
Pre-release

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

SegmentStream connections runtime

segmentstream-connections-runtime is the private Cloud Run host for custom OAuth 2.0 definitions authored with the SegmentStream SDK. It loads the workspace's connections/definitions.py, resolves customer-owned secret references, and performs authorization-code and refresh-token exchanges. Token responses are written directly to a pre-created, per-connection Google Secret Manager secret; the HTTP API returns credential metadata and never token values.

The runtime is an infrastructure component, not a public user-facing API. Its Cloud Run service must require IAM authentication.

python -m segmentstream_connections_runtime inspect manifest.json
python -m segmentstream_connections_runtime serve

The server listens on PORT, defaulting to 8080. A declaration such as secret_ref("google-oauth-client-id") is resolved from SEGMENTSTREAM_CONNECTION_SECRET_GOOGLE_OAUTH_CLIENT_ID in the isolated runtime environment. Client secrets use the same mapping convention.

Serving also requires SEGMENTSTREAM_GOOGLE_CLOUD_PROJECT and Cloud Run's automatically injected K_REVISION. The Cloud Run service identity obtains a short-lived access token from the Google metadata server and must have secretmanager.versions.add and secretmanager.versions.access only for each managed ss-oauth-<connection-id> secret. The control plane creates the secret and its IAM policy before starting OAuth authorization.

Every authorization, exchange, and refresh request includes the deployment's runtimeRevision. The runtime compares it with K_REVISION before resolving secrets or calling an OAuth provider and returns 409 runtime_revision_mismatch if Cloud Run routed the stable service URL to a different revision. POST /internal/v1/connections/{key}/token/exchange also accepts a connection ID, authorization-attempt ID, deterministic credential secret ID, authorization code, redirect URI, and PKCE verifier. POST .../token/refresh accepts the connection ID, credential secret ID, and exact stored version. Both token operations return only credentialVersion, tokenType, expiresAt, scopes, and hasRefreshToken.

A deterministic token response that is malformed, omits a required refresh token, or grants fewer scopes than the selected definition is rejected as 400 oauth_token_response_invalid before a credential version is written. OAuth provider HTTP and transport failures remain 502 oauth_provider_unavailable.

Releases

Releases use the version in pyproject.toml and are published from the connections-runtime-v<version> Git tag by the protected connections-runtime-release.yml workflow. PyPI releases are immutable, so the package version must be incremented before creating another release tag.

Download files

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

Source Distribution

segmentstream_connections_runtime-0.1.0a2.tar.gz (69.7 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 segmentstream_connections_runtime-0.1.0a2.tar.gz.

File metadata

File hashes

Hashes for segmentstream_connections_runtime-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 baeb8c40a857fd65cf9675398a4615cde08d46487c6647f674686e93edf952a4
MD5 2abeb8f99c74de04f8ebf584f219cbd6
BLAKE2b-256 83c1861cace3baa7f02577985b24059a51ca960bf85699df0877520e86a25ac4

See more details on using hashes here.

Provenance

The following attestation bundles were made for segmentstream_connections_runtime-0.1.0a2.tar.gz:

Publisher: connections-runtime-release.yml on segmentstream/segmentstream

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file segmentstream_connections_runtime-0.1.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for segmentstream_connections_runtime-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 16a33187260280c2dd9d107d9642a2844a5ac16e4c16c0c19187d60a89242712
MD5 8bb86a2092c1d7cb37c76cfb05096660
BLAKE2b-256 75998f6f269bb4a0b02685c2799fdd683a1afbfb91bafb4ae13a63819a084745

See more details on using hashes here.

Provenance

The following attestation bundles were made for segmentstream_connections_runtime-0.1.0a2-py3-none-any.whl:

Publisher: connections-runtime-release.yml on segmentstream/segmentstream

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0a2 This release

2 files

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