Git Product home page Git Product logo

cfn-identity-provider's Introduction

A simple SAML Identity Provider (IdP) provisioner

This CloudFormation template creates a SAML identity provider in Amazon Web Services' (AWS) Identity and Access Management (IAM) configuration.

In order to use it, you'll need:

  • an AWS account
  • rights within that AWS account to create, update, and delete:
    • CloudFormation stacks
    • IAM Roles and Policies
    • Lambda functions
    • Identity Providers
  • a SAML Identity Provider (IdP)
  • the Federation metadata (an XML document) from the Identity Provider (how to get this differs for every IdP)

Preparing metadata

  1. Download metadata from your IdP
  2. Make it all be on one line and escape the double-quote (") character: tr -d '\n' metadata.xml | sed -e 's/"/\"/g' > out.xml
  3. Copy the out.xml into the ParameterValue field of the params.json

Configuration

You can set the name of your identity provider via the SamlProviderName parameter to the stack; this can be configured in the params.json. It defaults to MyProvider

Returned Values from the Custom Resource

The ProviderCreator custom resource returns the ARN of the SAML provider as its physical resource ID.

You can simply Ref the custom resource to use the SAML provider ARN.

For example:

...

  TrustingIdp:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Federated: !Ref IdentityProvider
            Action: sts:AssumeRoleWithSAML
            Condition:
              StringEquals:
                "SAML:aud": "https://signin.aws.amazon.com/saml"
...

Updating the stack

The stack can be updated, though the only changes you can make to the Identity Provider is to change the SAML Metadata document, in case you need to update the trust relationship.

cfn-identity-provider's People

Contributors

nonspecialist avatar stevemac007 avatar

Watchers

SD avatar

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.