Giter Site home page Giter Site logo

altis-sso's Introduction

Altis SSO

Single Sign On module for Altis.

Packagist Version

SSO

Integrate your own user account registry with Altis through SAML or provide a Single Sign On service directly from the platform.

altis-sso's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar faishal avatar ferschubert-hm avatar joehoyle avatar kovshenin avatar mikelittle avatar rmccue avatar robindevitt avatar roborourke avatar shadyvb avatar tomjn avatar wisyhambolu avatar yumito avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

altis-sso's Issues

Allow specifying different IdP name/path for each environment

Each environment (ie. dev/staging/prod) requires a separate IdP metadata file, but these all need to go into the same repo. Therefore the SSO config needs to allow a different IdP file name or path to be specified for each environment that the user sets up.

SAML validation errors on Altis Infrastructure

When migrating one of the projects to Altis we came across an error in SSO module, particularly from SAML library.

The response was received at https://domain.com:8080/sso/verify instead of https://doman.com/sso/verify

My assumption was that due to some docker networking SAML library was reading the port number incorrectly, It was reading it 8080 but it was expected to be 443 (or 80).

To fix this we simply had to set the port to 443 explicitly from the loader -

// Set server port to 443 for SAML.
if ( class_exists( '\\OneLogin\\Saml2\\Utils' ) ) {
	\OneLogin\Saml2\Utils::setSelfPort( '443' );
}

This issue was also reproduced locally using local testing method mentioned in the wiki here - https://github.com/humanmade/wp-simple-saml/wiki/Testing-SSO-locally
I had to change the default port numbers to set it up locally as port 8080 is also used by Altis local-server

(Note while debugging we first disabled the Altis SSO module to find if the problem was in any customizations in this module, but the issue still persisted so I believe the issue will also be there when using Altis SSO module as that as well uses the same plugin under the hood)

SP Metadata cannot be generated without a config XML file in place

The module expects a config file to exist, and falls back to the default file in .sso/config from the skeleton project, which doesn't necessarily exist on all installations.

Steps to reproduce:

  1. Remove the .config/sso/saml-idp-metadata.xml file
  2. Try to generate the SP metadata XML by visiting https://site/sso/metadata

You should see the SP metadata XML file generated, but right now it errors out with Invalid SSO settings. Contact your administrator.

The solution would be to move the default file to the module directory to ensure it always exists, and load it from there, and remove it from the skeleton project.

Related to support request: https://humanmade.zendesk.com/agent/tickets/5673

Update documentation on metadata file extraction and multi-env setup

Context

The SSO module documentation doesn't mention how to generate the service metadata file, which is often needed to setup the IdP provider settings as per the wp-simple-saml plugin documentation.

We also need to add a note that IdP providers typically require a different application to be created on their end for each environment, eg: a metadata file generated for the dev environment cannot be used for the prod environment, etc.

Documentation linting issues

This ticket addresses the issues raised by the documentation linting

composer dev-tools lintdocs all -l packages/sso

File Issues:

None

Markdown issues:

Linting: 3 file(s)
Summary: 58 error(s)

Style issues:

9 errors, 0 warnings and 0 suggestions in 3 files.

SPIKE: SSO framework

Placeholder: looking at commonalities between SSO implementations to reduce duplication of effort

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.