handnot2

handnot2

Samly - Add SAML SSO to your Phoenix application (now with multiple identity provider support)

Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application.

This library uses Erlang esaml to provide
plug enabled routes. Use of esaml provides the following capabilities:

  • SP initiated login
  • SP initiated logout
  • IdP initiated logout

This is tested with SimpleSAMLphp. There is a fairly detailed README.md file to help you get started. There are two companion Repos:

  • samly_simplesaml - Use this to create your own SAML IdP for development purpose when working with Samly
  • samly_howto - This is a sample Phoenix application that shows how to use Samly

The readme file has an FAQ section that covers the following:

  • How to setup a SAML 2.0 IdP for development purposes
  • Sample Phoenix application that shows how to use Samly
  • How to register the service provider with IdP
  • How to enable Samly in my application

Feedback and contributions are appreciated.

Most Liked

handnot2

handnot2

Samly v1.0.0 Released!

Samly is a Plug library that can be used to enable SAML Single-Sign-On authentication in Phoenix applications. It makes use of the esaml library for core SAML request/response handling.

This has been used successfuly to work with the following Identity Providers:

  • Okta

  • Ping Identity

  • OneLogin

  • ADFS

  • Nexus GO

  • Shibboleth

  • SimpleSAMLphp

Hopefully, this library provides some help in successful adoption of Elixir in Enterprise/Intranet.

Many thanks to the following contributors (samly and esaml):

  • @peterox

  • @mxgrn

  • @hoodunit

  • @calvinb

  • @hodak

  • @brianmay

  • @zwilias

  • @tcrossland

  • @samterrell

Many others also contributed by using this library, opening Github issues and providing feedback in DM. Please continue to open issues and submit PRs to improve Samly further. Also, share your experience in getting Samly to work with your IdP so others in the community can benefit as well.

Repos:

Samly: https://github.com/handnot2/samly

esaml: https://github.com/handnot2/esaml

Docker based Identity Providers for development purposes:

SimpleSAMLphp: https://github.com/handnot2/samly_simplesaml

Shibboleth: https://github.com/handnot2/samly_shibboleth

Development Assistance:

Phoenix Application showing Samly usage: https://github.com/handnot2/samly_howto

handnot2

handnot2

Created a blog post on using samly. This includes instructions on setting up a self-hosted Shibboleth SAML Identity Provider that uses OpenLDAP.

handnot2

handnot2

Samly library version v0.8.0 introduces support for working with multiple Identity Providers (earlier versions were limited to working with only one IdP).

There are two companion Repos:

  • samly_simplesaml - Docker based self-hosted SimpleSAMLPhp Identity provider for development purposes
  • samly_howto - A simple Phoenix application that demonstrates how to SAML enable your application. This will show the SAML assertions from the IdP upon success end-user authentication. It is mostly pre-configured to work with samly_simplesaml. But you can change the configuration to point to any SAML provider.

The Samly documentation has been updated as well.

handnot2

handnot2

Samly v0.8.4 and esaml v3.3.0

Now works with Shibboleth IdP (in addition to SimpleSAMLPhp). Here are some screenshots showing the login and consent flows interacting with a self-hosted Shibboleth IdP setup.

Login portion in a Samly enabled phoenix app

Shibboleth Login Page

Shibboleth Consent Page

Back to the Phoenix app - Showing the SAML assertion Attributes

Where Next?

Popular in Libraries Top

blatyo
https://www.conduitframework.com/ The best overview for how things are tied together is this presentation. Modules and functions are pre...
New
vic
Expat is a tiny experiment I did for extracting patterns and being able to reuse them (compose and share patterns between elixir librarie...
New
kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
574 16576 179
New
hpopp
After just over two years in development, this latest version of Pigeon is what I finally consider done in regards to my original vision ...
New
devonestes
Introducing assertions, the library that helps you write really great test assertions! GitHub: https://github.com/devonestes/assertions ...
New
riverrun
I’ve just released version 3 of Comeonin, a password hashing library. The following small changes have been made: changes to the NIF c...
New
kelvinst
Hey everyone! Well, we made this lib a while ago and now we decided to finally go out and public with it! It’s a tool for creating and m...
New
aditya7iyengar
Rummage.Ecto and Rummage.Phoenix provide ways to perform Searching, Sorting and Pagination over Ecto queries and Phoenix collections. Fo...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
mtrudel
Bandit is an HTTP server for Plug and WebSock apps. Bandit is written entirely in Elixir and is built atop Thousand Island. It can serve...
New

Other popular topics Top

chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New

Sub Categories:

We're in Beta

About us Mission Statement