Git Product home page Git Product logo

saml_tools's Introduction

SAML Tools

Tools to simplify the creation, validation and sending of SAML objects.

These tools are available as a gem:

gem ‘saml_tools’

SamlTool::Certificate

Version of OpenSSL::X509::Certificate that adds methods to simplify the retrieval of data used in SAML responses.

SamlTool::Decoder

Decodes base64 and unzips content.

SamlTool::Encoder

Zips content and base64 encodes it.

SamlTool::ErbBuilder

Used to build SAML content from erb templates.

output = SamlTool::ErbBuilder.build(
  template: '<foo><%= settings %></foo>',
  settings: 'bar'
)
output == '<foo>bar</foo>'

SamlTool::Reader

Wraps SAML documents and exposes data via methods

reader = SamlTool::Reader.new(
           output,
           {foo: '//foo/text()'}
         )
reader.foo == 'bar'

SamlTool::Redirect

Used to construct redirection uris

redirect = Redirect.uri(
  to: 'http://example.com',
  data: {
    foo: 'bar'
  }
)
redirect == "http://example.com?foo=bar"

SamlTool::ResponseReader

A version of SamlTool::Reader tailored for handling SAML responses. It includes a valid? method that validates the SAML structure and checks the signature is correct.

SamlTool::RsaKey

Version of OpenSSL::PKey::RSA that adds methods to simplify the retrieval of data used in SAML responses.

SamlTool::SAML

A wrapper for Nokogiri::XML, that applies defaults that are appropriate for SAML

SamlTool::Settings

Packages up settings so that they can be more easily passed to other objects.

SamlTool::Validator

Compares documents with SAML schemas to test if they have a valid structure.

Further reading

I’ve blogged here about some of highs and lows of building these tools.

There is a demo app that I have been working with as I’ve developed these tools:

https://github.com/warwickshire/saml_tools_demo

This work has been greatly influenced by:

saml_tools's People

Contributors

reggieb avatar

Stargazers

James Scott, Jr avatar Sahil Prajapati avatar Mark Montroy avatar John Lynch avatar  avatar Sixto Martin avatar

Watchers

James Scott, Jr avatar  avatar Sixto Martin avatar James Cloos avatar Chris Jones avatar Steve Thompson avatar

Forkers

mashushu reggieb

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.