Giter VIP home page Giter VIP logo

aws-secrets-manager-rotation-examples's Introduction

AWS Secrets Manager Rotation Examples

Contains sample code that can be used for rotation of secrets stored in AWS Secrets Manager.

Examples for other services

Where other services are those beyond the stereotypical, such as databases, with a simple username+password combo.

Amazon CloudFront API Key header injection

  • Name: SecretsManagerCloudFront

  • Supported service: CloudFront. This Lambda function will add a header to to requests from CloudFront to the backend origin service.

  • Rotation strategy: A secret contains a json string of 3 active key values. The Lambda Function will pop the oldest key, push a new key, then update a CloudFront distribution to match.

  • Expected SecretString structure:

    {
      "key1": "<required:string>",
      "key2": "<required:string>",
      "key3": "<required:string>",
    }
    
  • Source code: SecretsManagerCloudFront/

Amazon ALB API Key header check

  • Name: SecretsManagerAlb

  • Supported service: Application Load Balancer. This Lambda function will update the ALB Listener Rules to look for a static API key header. Unless the header is found, the request will be returned an HTTP403 Access Denied response.

  • Rotation strategy: A secret contains a json string of 3 active key values. The Lambda Function will pop the oldest key, push a new key, then update ALB Listener Rules to match.

  • Expected SecretString structure:

    {
      "key1": "<required:string>",
      "key2": "<required:string>",
      "key3": "<required:string>",
    }
    
  • Source code: SecretsManagerAlb/

Security

See CONTRIBUTING for more information.

License

This sample code is made available under the MIT-0 License. See the LICENSE file.

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.