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

spartan-server

v0.1.0

Published

Spartan - A Scalable Client Authentication & Authorization System for Container-based Environments

Downloads

7

Readme

Spartan

A Scalable Client Authentication & Authorization System for Container-based Environments

[Alpha release, not production ready]

npm version dependency status Build Status

Background

Container technologies are revolutionizing the way we develop, build and deploy applications in large scale production environments. Applications running in containers often need to connect to various internal/external services that require authentication and authorization. Authenticating client application to a server is a challenge in such dynamic environments because we cannot rely on traditional IP or hostname based checks. IP based authentication no longer works because (1) container IP is dynamic and often repurposed (2) containers often share IPs. Alternate options include the use of TLS client certs and other key based authentication schemes. TLS client certificates provide authentication, but not authorization capabilities by its own and is not easy to configure and operate at scale - think about CICD pipeline spawning hundreds of containers that live only for few minutes!

What is spartan

Spartan is a role based identity system that provides both authentication and authorization to clients in an automated, easy to configure, scalable fashion. The system comprises of

  • Command line tools and APIs for node and application provisioners to manage and publish public key fingerprints
  • Provisioner service that provides grouping of public key fingerprints of nodes/applications to roles that represents a capability
  • Attestation service for the nodes & applications to get a signed tokens on demand that asserts the requested node's role membership.

Your server application (service provider) maps the role with service specific capabilities and the requests are validated against the auth tokens placed by the client while making requests to the server. The system is designed from ground up based on our experience with an existing IP based authorization system, keeping practicality, flexibility and security in mind. The implementation makes use of modern security and crypto practices and such as ECDSA and JWT.

Is spartan a replacement for TLS in my application ?

Spartan is complimentary to TLS. Spartan's primary goal is to enable client authentication and authorization capabilities. However it can provide mutual authentication as well. TLS is recommended for server authentication and transport security. TLS for client authentication is possible but is hard to operationalize at scale, especially in dynamic environments. Authorization capabilities in TLS certificates is also limited, if not impossible. Spartan is light weight form of PKI that provides identity, authentication and authorization capabilities. Transport security is also possible with ECDHE key exchange.

Is this something for me?

Spartan would be useful if you have experienced any of the following problems:

  • Enable fine granular access control for your application
  • You have a HTTPS service, but want to enable client authentication and authrorization capabilities
  • You are using client IP whitelists for access control, but find it less effective on shared IP environments like containers, NATs etc.
  • Spartan as an alternate to manual client IP whitelisting technique

Features

  • Based on open standards - JSON Web Tokens, OpenID Connect, ECDSA etc.
  • Easy to deploy and use
  • Easy to integrate with corp identity systems
  • Applications can authentice over non-secure network (HTTP)
  • Extend to fit your requirements. For example, you may write a reverse and forward proxy spartan plugins
  • Protection against replay attacks and scoped capabilities

Getting Started

Please refer to Getting Started Guide

Language Bindings

Following are the Spartan API language bindings. APIs are available to

  1. Get tokens from attestation service (typically needed on your client application)
  2. Validate tokens received in the request(typically needed on your server which accepts requests)

Acknowledgements

Yahoo Paranoids team