Skip to main content

cactus-client-notifications

This is a mini web server for listening for 2030.5 subscription notifications on behalf of cactus-client. It's designed to be hosted at a publicly available IP and will provide a running test instance with unique callback URIs that can be utilised for the duration of a test.

PKI

This app is expected to be run downstream of TLS termination (eg behind an nginx reverse proxy).

Any mutual TLS / other considerations are expected to be managed at the point of TLS termination.

Development

pip install cactus_client_notifications will install all dependencies for running the server

pip install cactus_client_notifications[dev,test] will install ALL dependencies for development / tests

Configuration

All configuration is managed via a series of environment variables. It's likely SERVER_URL and MOUNT_POINT are the only values you'll need to set for deployment.

Environment Variable Default Value Description
APP_PORT 8080 What port the application will be listening on (reverse proxy target port)
SERVER_URL http://localhost:8080 The public URI that all webhooks will be hosted under (This will need to be resolvable by BOTH the cactus CLI tool AND the utility server for submitting notifications)
MOUNT_POINT / If this service is hosted a path prefix (eg /api/v12/) set that value here.
MAX_IDLE_DURATION_SECONDS 3600 Any notification endpoint that hasn't been interacted with for this many seconds will be deleted
MAX_DURATION_SECONDS 262800 (73 hours) Any notification endpoint that is at least this old will be deleted
MAX_ACTIVE_ENDPOINTS 1024 The maximum number of endpoints that can be in existance at one time.
MAX_ENDPOINT_NOTIFICATIONS 100 The maximum number of (uncollected) notifications that an endpoint can hold
CLEANUP_FREQUENCY_SECONDS 120 How frequently the server checks for expired endpoints

Building

To build a Docker containerised version of the app - use the included Dockerfile:

docker build --build-arg CACTUS_CLIENT_NOTIFICATIONS_VERSION=v0.0.6 .

If you want to run the built image (and host it at my.server/api):

docker run -e SERVER_URL=https://my.server:8080 -e MOUNT_POINT=/api -p 8080:8080 cactus-client-notifications

API

Method/Endpoint Description JSON Models
GET /manage Plaintext app status (eg: describing active endpoints and uncollected notifications) Request: None Response: None - plaintext
POST /manage/endpoint Attempts to create a notification endpoint. response will contain the unique notification endpoint ID and fully qualified URL Request: None Response: cactus_client_notifications.schema.CreateEndpointResponse
GET /manage/endpoint/{endpoint_id} Collects all Notifications for the nominated endpoint_id. Once a notification has been collected it will be cleared. Request: None Response: cactus_client_notifications.schema.CollectEndpointResponse
PUT /manage/endpoint/{endpoint_id} Updates the configuration for endpoint_id (eg enabling / disabling it). Request: cactus_client_notifications.schema.ConfigureEndpointRequest Response: None
DELETE /manage/endpoint/{endpoint_id} Requests the deletion of the endpoint with endpoint_id Request: None Response: None
* /webhook/{endpoint_id} The actual notification webhook that the utility server will be sending requests to. Request: Any Response: None

Metadata

Release files for cactus-client-notifications 0.1.0

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

Source distribution (sdist)

Source distribution for cactus-client-notifications 0.1.0
File Size Uploaded Provenance
cactus_client_notifications-0.1.0.tar.gz 12.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cactus-client-notifications 0.1.0
File Interpreter ABI Platform
cactus_client_notifications-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.4 kB

Release files / cactus_client_notifications-0.1.0.tar.gz

Download URL cactus_client_notifications-0.1.0.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3cede82e997be0fd0e3eeb991c15f2c8e7496971a0c07d3e033366e26c148426
BLAKE2b-256 checksum
How to use checksums
69aa94bda402ede8802e79732c8f100a7e82a0e5840972b82f0730c740123071
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / cactus_client_notifications-0.1.0-py3-none-any.whl

Download URL cactus_client_notifications-0.1.0-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
591f56b66cf44ca1b9917062a0298b63a464be41ccfa0bd880fa2d057f18e8e5
BLAKE2b-256 checksum
How to use checksums
472130f225af45c2614d34908a82ef3206a8fe6c1640b5fe9053b6d2c56895b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for cactus-client-notifications 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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