Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oauth_reverse_proxy

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oauth_reverse_proxy

An OAuth 1.0a authenticating reverse proxy

  • 0.9.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by66.67%
Maintainers
1
Weekly downloads
 
Created
Source

oauth_reverse_proxy is an authenticating service proxy that fronts any web server and enforces that callers present the correct OAuth credentials.

Installation

npm install oauth_reverse_proxy

Description

oauth_reverse_proxy works by establishing a proxy that runs on the same server as your application. All client traffic for a given service is routed to the proxy's inbound port, and the expectation is that you will configure your application to only allow traffic from localhost. In this way, only authenticated requests will reach your application.

A few key features and design principles:

  • Faithfully implements the OAuth spec: This means that any client OAuth library you wish to use will work fine with oauth_reverse_proxy. The test/clients directory has sample code in 9 languages.
  • Built to perform: A single node can authenticate around 10k requests per second on reasonable hardware.
  • Flexible enough to front multiple services: If you run more than one HTTP server per system, as is common in the case of an nginx-fronted application, you can put an instance of oauth_reverse_proxy either in front of or behind nginx. A single instance of oauth_reverse_proxy can bind a separate proxy to any number of inbound ports.
  • Configurable whitelisting: You likely have a load balancer that needs to perform health-checks against your application without performing authentication. oauth_reverse_proxy supports regex-based whitelists, so you can configure an un-authenticated path through to only those routes.
A Note About the Security Model

Zero-legged OAuth 1.0a is built on the assumption that a service provider can securely share a consumer key / consumer secret pair with a client. The creation of these credentials is outside the scope of oauth_reverse_proxy. This project assumes that key issuance will be performed out-of-band. Just, please, don't use post-its.

Configuration

oauth_reverse_proxy looks for configuration files in either the location specified in the OAUTH_REVERSE_PROXY_CONFIG_PATH environment variable. Each json file in that directory will be treated as the description of a proxy to run. Config files are only loaded on start. Invalid proxy config files are ignored and logged; they do not cause a total failure of oauth_reverse_proxy.

Configuration Format
{
    "service_name": "jobsservice",
    "from_port": 8008,
    "to_port": 8080,
    "oauth_secret_dir": "./test/keys/8008/8080/",
    "required_uris": [
        "/getProducts","/uploads","/multipart","/chunked","/compressed","/job","/live","/health","/transactions"
    ],
    "required_hosts": [ "localhost", "::1" ]
}
build status

Travis Build

coverage

Coverage Status

FAQs

Package last updated on 18 Dec 2014

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