node-red-contrib-mediashuttle-signature-z 1.1.0

Node-RED node to generate signed URLs for Signiant MediaShuttle Metadata APIs

npm install node-red-contrib-mediashuttle-signature-z

node-red-contrib-mediashuttle-signature-z

Node-RED custom node to generate MediaShuttle SIG1 (HMAC-SHA256) signed URLs for the MediaShuttle Metadata API (v3.0).

The node prepares authenticated HTTP requests by calculating the required signature and query parameters, allowing downstream nodes (for example http request) to execute MediaShuttle API calls without manual cryptographic handling.

✨ Features

Generates SIG1-HMAC-SHA256 signatures compliant with MediaShuttle specifications 

Supports multiple request types 

Uses Node-RED credentials to securely store the registrationKey 

Supports Node-RED TypedInput (string, msg, flow, global, env) 

Automatically sets HTTP method, URL, and headers 

πŸ“¦ Installation

From the Node-RED editor:

1 Menu β†’ Manage palette β†’ Install β†’ node-red-contrib-mediashuttle-signature-z

Or via npm:

1 npm install node-red-contrib-mediashuttle-signature-z

Restart Node-RED after installation.

🧩 Node: MediaShuttle Signature Z

Purpose

This node does not perform the HTTP call itself. It prepares a signed request by setting:

msg.method 

msg.url 

(optionally) msg.headers 

These can then be passed to a Node-RED HTTP Request node.

βš™οΈ Configuration

Node Properties

Property

Description

Portal Prefix

MediaShuttle portal name (e.g. myportal)

Package ID

MediaShuttle package identifier

Request Type

Type of MediaShuttle API request

All fields support TypedInput (str, msg, flow, global, env).

Credentials

Credential

Description

Registration Key

MediaShuttle registration key (stored securely)

The credential can be overridden at runtime by providing:

1 msg.registrationKey

πŸ” Supported Request Types

1️⃣ GetPackageDetails

Retrieves metadata for a MediaShuttle package.

Behavior:

HTTP Method: GET 

Body: empty 

Generated URL format:

1

Output:

1 msg.method = "GET"

2 msg.urlβ€―β€―β€― = ""

2️⃣ RedirectPackageMetadata

Redirects or updates package metadata using a POST request.

Input:

msg.payload can be: 

a JavaScript object (auto-converted to JSON) 

a JSON string 

Behavior:

HTTP Method: POST 

Content-Type: application/json 

Output:

1 msg.methodβ€― = "POST"

2 msg.urlβ€―β€―β€―β€― = ""

3 msg.headers = {

4 β€― "Content-Type": "application/json"

5 }

πŸ” Signature Generation Details

The node performs the following steps:

Generates an ISO 8601 timestamp 

Hashes the request body using SHA-256 

Builds a canonical query string 

Derives a signing key using: 

1 HMAC-SHA256(registrationKey, timestamp)

Generates the final signature using: 

1 HMAC-SHA256(signingKey, stringToSign)

The signature is appended to the request URL as X-Sig-Signature.

βœ… Error Handling

The node will fail if any required parameter is missing:

portalPrefix 

packageId 

registrationKey 

requestType 

Visual feedback is provided via node status indicators in the editor.

πŸ”§ Example Flow

1 [ Inject ]

2 β€―β€―β€― ↓

3 [ MediaShuttle Signature Z ]

4 β€―β€―β€― ↓

5 [ HTTP Request ]

Example payload for RedirectPackageMetadata:

1 msg.payload = {

2 β€― title: "New Package Title",

3 β€― description: "Updated via Node-RED"

4 }

πŸ›‘οΈ Compatibility

Node-RED β‰₯ 0.20 

Node.js β‰₯ 12 

Backward compatibility for Node-RED < 1.0 is included.

πŸ“„ License

MIT

πŸ‘€ Author

zzzcrosss

πŸ“ Notes

This node is intended for backend / automation usage where MediaShuttle API authentication is required. It does not expose cryptographic secrets in messages or logs.

Node Info

Version: 1.1.0
Updated 2 weeks ago
License: MIT
Rating: not yet rated

Categories

Actions

Rate:

Downloads

0 in the last week

Nodes

  • mediashuttlesignature-z

Keywords

  • node-red
  • mediashuttle
  • signiant
  • signature
  • metadata
  • hmac
  • security

Maintainers