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 connections authored with the SegmentStream SDK. It loads the
workspace's connections/connections.py tuple named connections, resolves
customer-owned secret references, and performs authorization-code and
refresh-token exchanges. Token responses are written directly to a pre-created,
per-authorization-attempt 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-<authorization-attempt-id> secret. The control plane creates
the secret and its IAM policy before completing 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 an authorization-attempt ID, its deterministic credential secret ID,
the effective configurationDigest, authorization code, redirect URI, and PKCE
verifier. The credential envelope binds its schema-v2 payload to the attempt,
connection key, and configuration digest. POST .../token/refresh accepts the
authorization-attempt 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 connection is rejected as
400 oauth_token_response_invalid before a credential version is written.
Definitive provider 4xx rejections return 400 oauth_provider_rejected, while
timeouts, rate limits, transport failures, and provider 5xx responses remain
502 oauth_provider_unavailable so an ambiguous exchange can be recovered.
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
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 segmentstream_connections_runtime-0.1.0a3.tar.gz.
File metadata
- Download URL: segmentstream_connections_runtime-0.1.0a3.tar.gz
- Upload date:
- Size: 71.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04611a66bb0be0eba8040992ed22baad84ca9037a5501cdabe04a687a88727ed
|
|
| MD5 |
6c2e42bc4aaf5886452484d9abc4caa6
|
|
| BLAKE2b-256 |
c633fb1df094fbcfd40c70455cd4ea7e240b68e7c0aa48c698e2491492d9284e
|
Provenance
The following attestation bundles were made for segmentstream_connections_runtime-0.1.0a3.tar.gz:
Publisher:
connections-runtime-release.yml on segmentstream/segmentstream
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
segmentstream_connections_runtime-0.1.0a3.tar.gz -
Subject digest:
04611a66bb0be0eba8040992ed22baad84ca9037a5501cdabe04a687a88727ed - Sigstore transparency entry: 2684315735
- Sigstore integration time:
-
Permalink:
segmentstream/segmentstream@b55f55f34eeda9df57d9433fa5934a97f7bce2d8 -
Branch / Tag:
refs/tags/connections-runtime-v0.1.0a3 - Owner: https://github.com/segmentstream
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
connections-runtime-release.yml@b55f55f34eeda9df57d9433fa5934a97f7bce2d8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file segmentstream_connections_runtime-0.1.0a3-py3-none-any.whl.
File metadata
- Download URL: segmentstream_connections_runtime-0.1.0a3-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03a8e5af7ef8a11f2f50c561aaeb91c2405e699fbda675fd357bd91d6930d791
|
|
| MD5 |
e1b3340706ce5bb239b3022d0be150e6
|
|
| BLAKE2b-256 |
114d2a968c98b415b7e8df1d50f1f5d89dd1d5a87b9c28eb313e54fbc1f3e407
|
Provenance
The following attestation bundles were made for segmentstream_connections_runtime-0.1.0a3-py3-none-any.whl:
Publisher:
connections-runtime-release.yml on segmentstream/segmentstream
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
segmentstream_connections_runtime-0.1.0a3-py3-none-any.whl -
Subject digest:
03a8e5af7ef8a11f2f50c561aaeb91c2405e699fbda675fd357bd91d6930d791 - Sigstore transparency entry: 2684315751
- Sigstore integration time:
-
Permalink:
segmentstream/segmentstream@b55f55f34eeda9df57d9433fa5934a97f7bce2d8 -
Branch / Tag:
refs/tags/connections-runtime-v0.1.0a3 - Owner: https://github.com/segmentstream
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
connections-runtime-release.yml@b55f55f34eeda9df57d9433fa5934a97f7bce2d8 -
Trigger Event:
push
-
Statement type: