Code Monkey home page Code Monkey logo

access's Introduction

Access Control

godoc go report card

Libraries and services for access control on the M-Lab platform.

Create JSON Web Keys

The m-lab/access package support JWK keys generated by jwk-keygen.

Create a signing key pair:

go get gopkg.in/square/go-jose.v2/jwk-keygen
~/bin/jwk-keygen --use=sig --alg=EdDSA --kid=1

Access Envelope Service

For new services, we want to balance access to the platform with protecting platform integrity and measurement quality.

Until a service supports access control natively, the "access envelope" service accepts access tokens, validates them, and upon acceptance, adds an iptables rule granting the client IP time to run a measurement before removing the rule again after a timeout.

access's People

Contributors

cristinaleonr avatar nkinkade avatar robertodauria avatar stephen-soltesz avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

berraermenek

access's Issues

envelope: should export a datatype for the envelope access logs

Successful access to the envelop should be logged.

Mismatch between envelope access and measurement service could be a sign of a problem.

This is especially important if the inner service has no logging of its own.

Since clients create a second TCP connection between the envelope and the inner measurement service, there may be no way to associate an envelope connection with a measurement other than time. Currently there is a limit of one connection at a time, so there is no risk of concurrency.

envelope: consider granting access to RemoteAddr subnets for CGNs

Currently, the envelope service expects the client IP in the token claim Subject field. The envelope grants access to this IP, irrespective of the RemoteAddr delivering the access token.

The original thinking was to only grant access to the original locate service requester. However, in the case of carrier grade nats, there's no guarantee that two tcp connections from the same client will have the same RemoteAddr. However, it's our understanding that even if individual CGN IPs differ, they typically come from the same subnet.

So, to help, what if the locate service returned v4 or v6 decorated hostnames based on the client request IP. Then the envelope service would use the RemoveAddr to calculate either a v4/24 or v6/64 and grant access to the subnet.

This would:

  • use the same tcp protocol on both requests to the locate and envelope service
  • decrease the chances of CGNs preventing access to services behind the envelope.

In this case, the token claim Subject could be the service, "envelope", rather than the original client IP. Or, we could additionally confirm the subnet is the same.

envelope: consider using the token expiration as the grant timeout

Today the access token expiration is set by the locate service and defines the valid lifetime of the access token. The envelope service has an independent "timeout-after" parameter that grants client access to the service for that length of time.

What if the envelope service used the token expiration as the grant timeout also?

The locate service would need to know the typical experiment timeframe. The envelope service would not include independent policy.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.