Skip to content

Repository files navigation

OpenSign Bridge

OpenSignBridgeBundle

mosl stands for Mosaic OpenSource Library.

This Symfony bundle provides the complete infrastructure and service layer needed to integrate OpenSign and MinIO into any Symfony project.

πŸš€ Quick Start (Development)

To test or develop the bundle independently:

  1. Ensure Containers are Up:

    task up
  2. Bootstrap OpenSign: This command creates the API user, generates tokens, and initializes the MongoDB schema.

    task opensign:setup
  3. Restart Containers: Apply the new environment variables from .env.dist to the running PHP container.

    task restart

πŸ“¦ Installation in a Host App

  1. Require the bundle via Composer:

    composer require mosl/opensign-bridge-bundle
  2. Ensure the bundle is registered in config/bundles.php:

    return [
        // ...
        Mosl\OpenSignBridgeBundle\OpenSignBridgeBundle::class => ['all' => true],
    ];
  3. 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_SECRET is required β€” it must match the "Webhook Security Key" configured in your OpenSign instance's webhook settings. The bundle uses it to verify the x-webhook-signature header (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 with 401 Unauthorized.

  4. 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)%"
  5. Register the Webhook routes (config/routes.yaml):

    opensign_bridge_routes:
      resource: "@OpenSignBridgeBundle/config/routes.yaml"

πŸ“– Documentation

For full details on usage, services, and handling webhooks, see the Full Integration Guide.

About

Symfony bundle bridging OpenSign (e-signature) and MinIO/S3 object storage

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages