Giter Site home page Giter Site logo

go-security's People

Contributors

ripienaar avatar vjanelle avatar

Stargazers

 avatar

Watchers

 avatar  avatar

go-security's Issues

Create a generic rego evaluator

We have rego now in mcorpc and in aaasvc, we have a fairly solid idea of how this will look for choria so we can probably extract out something generic before we take next steps:

  • rego evaluation in provisioning server
  • possibly in federation broker to control routing decisions

The basic things we need are:

  • send in inputs in a map[string]interface{}
  • query to run
  • module name
  • supply optional functions
  • configure path to the rego file to use OR supply the rego file as bytes
  • configure tracing or not

Something like:

pass, err := thing.Evaluate(inputs, logger, File(f), Trace())

or

pass, err := thing.Evaluate(inputs, logger, Policy(p), Trace())

And error I guess have to be something like rego errors with extra context associated

We'd also have a configuration Functions(f) which would take a function map to add to the rego runtime like aaasvc does.

This would be rego specific, i dont really have the appetite now to make a whole abstraction that can support other forms of policy engine.

What do you think @vjanelle

email sans in client certificates are not parsed correctly

choria 0.10.

With client certificates containing a subject alternate name of email. e.g.

           X509v3 Subject Alternative Name: 
                othername:<unsupported>, email:[email protected]

the choria server always fails to parse and validate this correctly and results in

{"level":"error","msg":"Could not cache Client Certificate: certificate 'email' did not pass validation","time":"2019-04-12T17:16:28+02:00"}

https://golang.org/src/crypto/x509/verify.go line 756 all SANs are assumed to be DNSnames.

check user certs first if they exist

When a user certificate exist and we're checking all possible certs check the user specific one first this way we avoid a bunch of needless privileged checks and related logging

support regex enclosed in slashes for certname_whitelist config

To maintain consistency with mcollectived config, the regex string for this option should work with or without surrounding forward slashes. E.g.:

plugin.choria.security.certname_whitelist = /\.mcollective$/, /\.mco$/

or

plugin.choria.security.certname_whitelist = \.mcollective$, \.mco$

Currently only the latter works.

Support x509.ExtKeyUsageClientAuth

Our mTLS certificates have the x509.ExtKeyUsageClientAuth field set. Crypto/TLS won't validate certificates unless told to accept it.

Add pkcs11 provider

In my environment, we need to use yubikeys to authenticate everywhere. Adding a pkcs11 provider would allow us to use Choria with our security model.

Support client intermediate chains

If your client sends a list of intermediate certificates, go-security filesec won't understand what to do with them.

This is common in our mTLS use case.

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.