
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@educandu/rooms-auth-lambda
Advanced tools
Lambda@Edge function for authorizing access to private room resources in educandu
Lambda@Edge function for authorizing access to private room resources in educandu.
npm i -g gulp-cliThe output of this repository is an npm package (@educandu/rooms-auth-lambda) as well as a zip file containing the Lambda@Edge function.
The handler in this package is supposed to run as a Lambda@Edge function in AWS.
export SESSION_COOKIE_NAME="SESSION_ID" # mandatory
export WEBSITE_BASE_URL="https://consuming-website.com" # mandatory
export X_ROOMS_AUTH_SECRET="<secret>" # mandatory
export DISABLE_LOGGING="true" # optional, defaults to logging being enabled
As AWS Lambda@Edge function do not support environment variables, any values have to be injected into the code itself after deployment, for example at the top of the bundle file:
process.env.SESSION_COOKIE_NAME = 'SESSION_ID';
process.env.WEBSITE_BASE_URL = 'https://consuming-website.com';
process.env.X_ROOMS_AUTH_SECRET = "<secret>"
Run gulp build and you will find a single script file index.js in the dist folder which contains a bundle of all code needed to run on AWS. You will also find a file lambda.zip in the pack folder containing the bundle. This can be used for automated deployments on AWS (The Github action publish creates a release on Github and uploads this zip file).
yarn add @educandu/rooms-auth-lambda --dev
import { handler } from '@educandu/rooms-auth-lambda';
handler(event, context, (error, result) => {
// Do something
});
This package comes with a development server that can be used for testing the lambda locally. The server object returned by the call is the object you would get when starting an express server.
yarn add @educandu/rooms-auth-lambda --dev
export SESSION_COOKIE_NAME="SESSION_ID"
export WEBSITE_BASE_URL="http://localhost:3000"
export X_ROOMS_AUTH_SECRET="<secret>"
import { startDevServer } from '@educandu/rooms-auth-lambda';
const port = 10000;
const cdnBaseUrl = 'http://localhost:9000/my-bucket';
const server = startDevServer(cdnBaseUrl, port, err => {
// Do something with err
});
// Then, in the end, close the server:
server.close(err => {
// Do something with err
});
yarn add @educandu/rooms-auth-lambda --dev
export PORT=10000
export CDN_BASE_URL="http://localhost:9000/my-bucket"
export SESSION_COOKIE_NAME="SESSION_ID"
export WEBSITE_BASE_URL="http://localhost:3000"
export X_ROOMS_AUTH_SECRET="<secret>"
node ./node_modules/@educandu/rooms-auth-lambda/src/dev-server/run.js
Funded by 'Stiftung Innovation in der Hochschullehre'
A Project of the 'Hochschule für Musik und Theater München' (University for Music and Performing Arts)
Project owner: Hochschule für Musik und Theater München
Project management: Ulrich Kaiser
FAQs
Lambda@Edge function for authorizing access to private room resources in educandu
We found that @educandu/rooms-auth-lambda demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.