Skip to content

Instantly share code, notes, and snippets.

@charlesdaniel
charlesdaniel / streamforge-docs.md
Created February 26, 2025 18:31
Streamforge Docs

StreamForge

Introduction

StreamForge is an Asset Retrieval and Transformation Service originally built for DataCraft but can also be used directly standalone. It offers several features:

  • Common HTTP interface to various asset storage backends (vedi://, https://, conductor:// urls)
  • Authentication based on Notary token provided via header or cookie
  • Authorizes using the backend but also provides extra layer of prefix level security policies based on complex Apple Group unions/intersections
  • Provides for on-the-fly transformations for various Image/Video/Archive/Header manipulations on the asset using a simple Domain Specific Language encoded in the URL itself

Keybase proof

I hereby claim:

  • I am charlesdaniel on github.
  • I am charlesdaniel (https://keybase.io/charlesdaniel) on keybase.
  • I have a public key ASCq00O0Xej5mfRa1WexznmTQzj4Iq_-eOOju_cLrcxrXwo

To claim this, I am signing this object:

var apns = require('./node_modules/apn');
var options = { //This is a real prod cert
cert: 'cert.pem', // valid cert
key: 'key.pem', // valid key
gateway: 'gateway.push.apple.com',
port: 2195,
enhanced: true,
cacheLength: 5,
errorCallback: function(err, notification) { console.log(" ERROR FROM CALLBACK : ", err, "NOTIFICATION ", notification); },
@charlesdaniel
charlesdaniel / basic_auth_nodejs_test.js
Created January 27, 2012 02:53
Example of HTTP Basic Auth in NodeJS
var http = require('http');
var server = http.createServer(function(req, res) {
// console.log(req); // debug dump the request
// If they pass in a basic auth credential it'll be in a header called "Authorization" (note NodeJS lowercases the names of headers in its request object)
var auth = req.headers['authorization']; // auth is in base64(username:password) so we need to decode the base64
console.log("Authorization Header is: ", auth);