npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-accesscontrol-nocontext

v1.0.2

Published

Node-RED wrapper for the accesscontrol npm module. Without using context.

Downloads

1

Readme

node-red-contrib-accesscontrol-nocontext

platform npm version Test workflow Maintenance vulnerabilities Status License: MIT

A Node-RED implementation of the accesscontrol nmp module, providing Role Based Access Control with the addition of Attributes (see this NIST paper). Also supporting export/import to/from the MongoDB node. Unlike the other accesscontrol solution, context is not employed.

Prerequisites

Node-RED installed. Tested on most versions starting from 2.0.5 up to 2.1.2.

Installation

Install via Node-RED Manage Palette or via npm:

$ cd ~/.node-red
$ npm install node-red-contrib-accesscontrol-nocontext

If necessary, restart Node-RED.

How to use

10 nodes are provided:

  • AC init: creates the AccessControl instance that contains all permissions (as no database is used).

  • AC export: exports the AccessControl permissions as a string (JSON format). If specified, it can export with a identifier so it is possible to save the output directly into a MongoDB database, using the specific Node-RED node;

  • AC import: imports the AccessControl permissions from a string (JSON format). As for the export node, an identifier can be specified to import from MongoDB and remove that field from the JSON;

  • grant: enables to grant to a role a CRUD action (Create, Read, Update, Delete) over a resource;

  • extend: a quick way of granting to a role the same permissions of another role, outlining a condition of inheritance towards this;

  • deny: drops CRUD permissions previously set with grant, along with all optionally set attributes;

  • remove: removes either specified role(s) or resource(s) from AccessControl;

  • permission: checks if a specific permission (without attributes) is implemented or not. The result output can be either true or false based on this. If true, also the attributes that are linked to the operation are returned in a separate message field;

  • permissions: checks if multiple permissions (with attributes) are implemented or not;

  • AC lock: freezes the AccessControl instance. Attempts to modify it after calling this node will fail and will be reported.

Detailed information about each node can be read in the help tab of Node-RED.

Permission are defined by specification of 5 properties:

  • role: the user or group of users receiving the authorization;
  • resource: what the role can or cannot interact with;
  • action: how the role can interact with the resource (CRUD actions);
  • possession: specifies if the role can interact with the resource of 'any' other role or just with its 'own';
  • attributes: optional values related to the resource, to provide a more accurate permission.

Additional examples can be found in the previously mentioned alternative collection.

Contribution

Feel free to add more options or whatever may be of use. If you find a bug, please report it on GitHub.