All Projects → RiotGames → Key Conjurer

RiotGames / Key Conjurer

Licence: apache-2.0
Temporary Credential Service

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Key Conjurer

Bitcoin Arbitrage
An AWS Lambda function that looks for Bitcoin Arbitrage opportunities
Stars: ✭ 115 (-8.73%)
Mutual labels:  aws-lambda
Serverless Architectures Aws
The code repository for the Serverless Architectures on AWS book
Stars: ✭ 120 (-4.76%)
Mutual labels:  aws-lambda
Iopipe Js Core
Observe and develop serverless apps with confidence on AWS Lambda with Tracing, Metrics, Profiling, Monitoring, and more.
Stars: ✭ 123 (-2.38%)
Mutual labels:  aws-lambda
Lsh
Run interactive shell commands on AWS Lambda
Stars: ✭ 117 (-7.14%)
Mutual labels:  aws-lambda
Aws Lambda Blog
AWS Lambda serverless blogging platform
Stars: ✭ 119 (-5.56%)
Mutual labels:  aws-lambda
Aws Appsync Rds Aurora Sample
An AWS AppSync Serverless resolver for the Amazon Aurora relational database.
Stars: ✭ 122 (-3.17%)
Mutual labels:  aws-lambda
Lambda Toolkit
*DO NOT USE* - This project was done during my initial python and lambda's studies. I would recommend you the `serverless framework`.
Stars: ✭ 114 (-9.52%)
Mutual labels:  aws-lambda
Fx
A Function as a Service tool makes a function as a container-based service in seconds.
Stars: ✭ 1,679 (+1232.54%)
Mutual labels:  aws-lambda
Pants
The Pantsbuild developer workflow system
Stars: ✭ 1,814 (+1339.68%)
Mutual labels:  aws-lambda
Serverless
Serverless 架构应用开发指南 - Serverless Architecture Application Development Guide with Serverless Framework.
Stars: ✭ 1,616 (+1182.54%)
Mutual labels:  aws-lambda
Serverless Side Rendering React Next
Sample repo for setting up Next and React on AWS Lambda with the Serverless Framework.
Stars: ✭ 117 (-7.14%)
Mutual labels:  aws-lambda
Serverless Layers
Serverless.js plugin that implements AWS Lambda Layers which reduces drastically lambda size, warm-up and deployment time.
Stars: ✭ 119 (-5.56%)
Mutual labels:  aws-lambda
Aws Lambda R Runtime
Serverless execution of R code on AWS Lambda
Stars: ✭ 121 (-3.97%)
Mutual labels:  aws-lambda
Node Lambda Log
Basic logging mechanism for Node 6.10+ Lambda Functions
Stars: ✭ 115 (-8.73%)
Mutual labels:  aws-lambda
Covid 19 Api
This is the code running in AWS Lambda powering covid-api.mmediagroup.fr/v1. The API provides realtime and historical data on Coronavirus COVID-19 confirmed cases, deaths, and recovered cases. This API has now been called over 3 million times, thank you!
Stars: ✭ 122 (-3.17%)
Mutual labels:  aws-lambda
Hello Lambda
🔥 An example of a Python (AWS) Lambda exposed with API Gateway, configured with Terraform.
Stars: ✭ 114 (-9.52%)
Mutual labels:  aws-lambda
Node Acme Lambda
Use AWS Lambda to manage SSL certificates for ACME providers like Let's Encrypt.
Stars: ✭ 120 (-4.76%)
Mutual labels:  aws-lambda
Aws Data Wrangler
Pandas on AWS - Easy integration with Athena, Glue, Redshift, Timestream, QuickSight, Chime, CloudWatchLogs, DynamoDB, EMR, SecretManager, PostgreSQL, MySQL, SQLServer and S3 (Parquet, CSV, JSON and EXCEL).
Stars: ✭ 2,385 (+1792.86%)
Mutual labels:  aws-lambda
Architect
The simplest, most powerful way to build serverless applications
Stars: ✭ 1,925 (+1427.78%)
Mutual labels:  aws-lambda
Serverless Plugin Optimize
Bundle with Browserify, transpile and minify with Babel automatically to your NodeJS runtime compatible JavaScript
Stars: ✭ 122 (-3.17%)
Mutual labels:  aws-lambda

Key Conjurer

Key Conjurer Champion

Key Conjurer is a project designed to get rid of permanent AWS credentials. This was important to us as it brought down two related risks; compromise of permanent credentials and compromise of a users machines. Luckily, AWS provides their Security Token Service which allows users/services to generate temporary and just-in-time credentials. However, STS just handles the AWS side of the equation and we needed the process of generating tokens to be linked with both our identity provider and MFA. And for that we now have Key Conjurer.

Key Conjurer is made of three parts:

  • api -- The lambda based API
  • cli -- The CLI interface
  • frontend -- The web UI

Key Conjurer currently supports the following identity providers and mfa services:

  • Identity Providers:
    • onelogin
  • MFA:
    • duo

Key Conjurer now supports the ability to provide temporary crendentials different cloud providers as well as being deployed on different platforms.

Currently supported credential providers are:

  • AWS STS

Current platforms supported for deployment are:

  • AWS

Pre-Deployment Steps

Platform Pre-Deployment Resources

Generate/Initialize AWS Resources

  1. Certificates - Make sure a certificate in ACM is requested with the desired hostname (the arn will be needed later)
aws acm request-certificate --domain-name <api domain> --validation-method EMAIL --region us-east-1
aws acm request-certificate --domain-name <frontend domain> --validation-method EMAIL --region us-east-1
  1. Make an S3 Bucket:
aws s3api create-bucket --bucket <terraform state bucket> --region us-west-2 --create-bucket-configuration LocationConstraint=us-west-2
  1. A VPC w/ Subnets to access service
  2. Setup a KMS key

Setup Build Environment

  • go 1.12.4+
  • npm 6.4.1+
  • node 10.10.0+
  • tfswitch

Setting Up Your Variable Files

Create prod.env based on example.env.

Serverless Settings

Lambda Env Settings

Environment Variables

Variable Purpose
EncryptedSettings A KMS encrypted json blob with settings (See below for more info)
AWSRegion Used for KMS Region. Typically the same region KeyConjuer is in
Encrypted Settings

The encrypted settings are a JSON blob with the following keys.

{
  "awsKmsKeyId": "abc...",
  "oneLoginReadUserId": "def...",
  "oneLoginReadUserSecret": "ghi...",
  "oneLoginSamlId": "jkl...",
  "oneLoginSamlSecret": "lmn...",
  "oneLoginShard": "opq...",
  "oneLoginSubdomain": "rst..."
}
Variable Purpose
awsKmsKeyId The KMS key to encrypt information with
oneLoginReadUserId OneLogin key with read user permissions
oneLoginReadUserSecret Secret key for oneLoginReadUserId
oneLoginSamlId OneLogin key with SAML permissions
oneLoginSamlSecret Secret key for oneLoginSamlId
oneLoginShard OneLogin shard to talk with
oneLoginSubdomain OneLogin subdomain

They are encrypted so users with access to the lambdas cannot see the secrets

Deploying

These steps assume you created prod.env as instructed above.

First Deploy

source prod.env
make build deploy

When Deploying to AWS Ensure the IAM role provisioned by terraform has access to use the KMS key created above

Future Deploys

source prod.env
make deploy

Noteworthy Info

frontend serves the CLI tool. This means the binaries created in cli need to be uploaded to the same bucket that's used to serve the frontend.

Development

All pieces of Key Conjurer have been made extensible where possible and use configuration values to select the right plugin.

Adding any new supported authenticator, MFA provider, or cloud provider should be as easy as developing a struct that implemented the given interfaces and ensureing that the interface constructer understands how to initializer and return the new struct.

This section aims to provide details on non-obvious decisions that may impact how one develops and deploys their own plugin.

Adding an Encryption Provider

KeyConjurer works by sending credentials from the CLI to the server. The server authenticates these credentials, locates all the accounts available for the user, and then returns all of this information, in addition to returning an encrypted version of the credentials for storage by the client.

This is done so that the credentials may be stored on file on the user's machine and later accessed without having to worry about file permissions (as some platforms have better permission support than others).

Encryption was previously tied to the Provider interface listed above, but it is now decoupled. You may add an encryption provider by adhering to the CryptoProvider interface and then using that provider when creating your lambda handler. This will require modification of the codebase for now, and is not configurable via environment variable or compiler switch.

We'll happily accept a pull request making the use of encryption providers a choice at runtime.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].