Giter Club home page Giter Club logo

kamus's People

Contributors

akhon avatar alef83 avatar amitbenami avatar avivrubys avatar barakatsoluto avatar danielepolencic avatar darthf1 avatar dependabot[bot] avatar eladav avatar elaygl avatar fallard84 avatar hcanber avatar itsvikasgupta avatar matan1811 avatar omerlh avatar renovate-bot avatar renovate[bot] avatar ron212 avatar shaikatz avatar snyk-bot avatar tracetechnical avatar yaron-idan avatar

Stargazers

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

Watchers

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

kamus's Issues

Allow to use different secrets for Encryptor and Decryptor

Today, the encryptor and decryptor are using the same credentials for authentication with the KMS. This is not ideal, we should follow the least privileged role here - grant them the minimum required permission. This is more of an issue with how we deploy Kamus (Helm chart), but opening the issue here for now.

Add code coverage report

Currently, there is no code coverage report. This means that it is not clear to users how quality Kamus is, and whether or not they can trust it. Need to work on making a report available. Might be a challenge as we do mostly blackbox testing.

Add support for AWS KMS

To support kubernetes cluster running on AWS. Look like there is support for it in the dotnet SDK.
Open questions:

  • Is KMS the right choice here? Maybe HSM is a better choice?
  • How do we handle authentication to KMS/HSM? Pod IAM?

Documentation

  • Threat Modeling
  • Blog post
  • How to use
  • How to install (Azure/AES)
  • Readme
  • Security.md
  • Example app
  • CLI
  • Init container

Support for multikey secrets

Nice project! Impressive and useful

Question: In k8 native secret I can have
name: secretsname:
key1:saaa,
key2:2222

Does kamus support this option?

Security - TLS for in-cluster traffic

Due to the sensitivity of the communication, it worth enabling TLS for in-cluster communication, and block non-https traffic everywhere. See this SO question for options, but look like we'll have to handle TLS in Kestrel, without TLS termination.

Support for nested secrets

I wanted to use kamus along with aspnetcore's IConfiguration, so I tried doing this:

encryptedSecrets:
  ActiveDirectory:ClientSecret: blablabla

But looks like that's invalid yaml (or at least kubernetes/helm don't like it).
The environment variable configuration loader supports ActiveDirectory__ClientSecret but not the json file loader, so that won't work either.
Basically if the init container had support for nested json I think this will all be okay.
What are your thoughts on supporting something like this?

CLI does not support CTRL-C

There does not seem to be a way to leave it beside docker stop or letting it finish
This is probably a dockerfile issue, but this is really annoying when you realize you have made a typo :X

In-Memory key provider

Add KeyVault alternative that can be used for an easy start.
As part of the task, we need also to decouple the code from KeyVault.

Fix blackbox tests

The challenge - using minikube, maybe worth considering Travis or Codefresh as it might be simpler

Add support for init container

Currently, the only way to use the decryptor is in the pod, but it should be able to write an init container.
The init container will read the encrypted values from config map, decrypt them and write them as a file to a mounted folder. The pod will read the decrypted value from the mounted volume.

Open source CI/CD

  • Official docker image for API
  • Official NPM package for CLI
  • Official docker image for init container

Add visibility to current KMS provider

The current KMS provider is not visible for monitoring currently, which could cause a production issue, if someone will change it by accident. IMO we need to add a metrics on the isAlive that will report the current KMS provider.

Enable CircleCI builds for PRs from fork

I disabled them now because it's insecure - people can trigger builds that push images, or expose information. Need to investigate and decide how it is best to enable it again to test also PRs from a fork.

Support Key Rolling

Add support for simple encryption key rolling:

  • Endpoint to enable/disable expiration for a specific SA keys
  • Export days to expiration per key on /metrics for easy monitoring
  • Add support for re-encrypting values with the new key
  • Add support for deleting old keys

Add support for GCP KMS

For kubernetes cluster running on GCP. Look like there is an SDK for dotnet.
How do we handle authentication?

Improved isAlive check

The current isAlive does not check the dependencies of the API.
The isAlive need to check:

  • KMS provider health
  • Kubernetes API access - that the decryptor can call TokenReview API

Fix CLI CI tests for PR

CLI tests are based on fetching NPM module.
It's not suitable for PRs because we want to know that something is broken before pushing to NPM.

Audit logs

  • Encrypt request (with source ips)
  • Decrypt request (source ip, SA identity)
  • Failures

Make CLI arguments order invariant

I suggest to use options instead of arguments in CLI encrypt command.
The encrypt command will be as following:

kamus-cli encrypt  \
   --secret super-secret \
   --service-account kamus-example-sa \
   --namespace default \
   --kamus-url <Kamus URL>

This approach will make the command line arguments order invariant and also we will be able to implement support for secret stored in file fixing #35.
For example for secret stored in file the command will be as following:

kamus-cli encrypt  \
   --secret-file /path/to/secret-file \
   --service-account kamus-example-sa \
   --namespace default \
   --kamus-url <Kamus URL>

I think it's more intuitive and self-describing command format.

Create CLI

Can be done using dotnet tool. Enable simple encryption utility.

Add CRD to create secrets wrapper

Many existing applications running on Kubernetes relays on secrets to store sensitive data - which make Kamus unusable. This can be solved with a CRD that is wrapper around secret, something in the following format:

apiVersion: v1
kind: KamusSecret
metadata:
  name: mysecret
  namespace: default
  service-account: default
type: Opaque
data:
  username: <encrypted data>
  password: <encrypted data>

The CRD controller will use Kamus and the SA token to decrypt the value of the secret and create a real Kubernetes secret object from it.

Support envelope encryption

We should not fail when someone asks to encrypt string which is too long, we should envelope encrypt that and return proper response.

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.