New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ocbesbn-bouncer

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ocbesbn-bouncer

Express middleware for ACl service and validation

  • 0.2.7
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

BOUNCER

Midldleware for individual nodejs services, takes care of following items

  1. Get permission details from ACL services
  2. validate the incoming calls
  3. supply the acl.json data

Default options

var defaultOptions =
{
    host: 'consul',
    serviceName: '',
    acl: require('./acl.json')
}

Internal dependencies

  • ocbesbn-web-init

Bouncer should be added as a middleware to the ocbesbn-web-init.

Example

import acl json via file


var bouncer = require('ocbesbn-bouncer');
{
  ...
  middlewares: [bouncer({
    host: 'consul',
    serviceName: 'user', //says user service
    acl: require('mypath/acl.json'),
    aclServiceName: 'acl'
  }).Middleware]
  ...
}

import acl json directly

var bouncer = require('ocbesbn-bouncer');
{
  ...
  middlewares: [bouncer({
    host: 'consul',
    serviceName: 'user', //example
    acl: {
      "Health": {
        "translations": {
          "name" : {
            "en": "Health check",
            "de": ""
          },
          "description": {
            "en": "Health check endpoint used by service checks",
            "de": ""
          }
        },
        "resources": [
          {
            "type": "rest",
            "resourceId": "/api/health/check",
            "actions": ["edit", "read"]
          }
        ]
      }
    },
    aclServiceName: 'acl'
  }).Middleware]
  ...
  }

FAQs

Package last updated on 29 Jun 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc