moslstands for Mosaic OpenSource Library.
This Symfony bundle provides the complete infrastructure and service layer needed to integrate OpenSign and MinIO into any Symfony project.
To test or develop the bundle independently:
-
Ensure Containers are Up:
task up
-
Bootstrap OpenSign: This command creates the API user, generates tokens, and initializes the MongoDB schema.
task opensign:setup
-
Restart Containers: Apply the new environment variables from
.env.distto the running PHP container.task restart
-
Require the bundle via Composer:
composer require mosl/opensign-bridge-bundle
-
Ensure the bundle is registered in
config/bundles.php:return [ // ... Mosl\OpenSignBridgeBundle\OpenSignBridgeBundle::class => ['all' => true], ];
-
Configure your environment variables (
.env):OPENSIGN_APP_ID=your_app_id OPENSIGN_MASTER_KEY=your_master_key OPENSIGN_API_URL=http://your-opensign-url/app OPENSIGN_USER_ID=your_system_user_id OPENSIGN_SESSION_TOKEN=your_session_token OPENSIGN_WEBHOOK_SECRET=your_opensign_webhook_security_key
OPENSIGN_WEBHOOK_SECRETis required β it must match the "Webhook Security Key" configured in your OpenSign instance's webhook settings. The bundle uses it to verify thex-webhook-signatureheader (HMAC-SHA256) on every incoming webhook call, and refuses to boot if it is missing or empty. Requests with a missing or invalid signature are rejected with401 Unauthorized. -
Add the bundle configuration (
config/packages/opensign_bridge.yaml):opensign_bridge: opensign: app_id: "%env(OPENSIGN_APP_ID)%" master_key: "%env(OPENSIGN_MASTER_KEY)%" api_url: "%env(OPENSIGN_API_URL)%" user_id: "%env(OPENSIGN_USER_ID)%" session_token: "%env(OPENSIGN_SESSION_TOKEN)%" webhook_secret: "%env(OPENSIGN_WEBHOOK_SECRET)%"
-
Register the Webhook routes (
config/routes.yaml):opensign_bridge_routes: resource: "@OpenSignBridgeBundle/config/routes.yaml"
For full details on usage, services, and handling webhooks, see the Full Integration Guide.
