Code Monkey home page Code Monkey logo

lite-idp's Introduction

LITE-IDP

Go Report Card Travis CI Coverage Status Docker Repository on Quay

logo

LITE-IDP is a lightweight SAML 2.0 Identity Provider and Service Provider library written in Go. The project’s goal is to create an IdP that is easier to configure and extend than Shibboleth’s IdP.

Status

The initial implementation of SAML 2 protocols was completed in 2015. However, the project lacked an extensible configuration mechanism. It was converted to use Cobra and Viper in September 2017 and is now easy to use and customize.

Identity Provider

The identity provider has the following features.

  • HTTP Redirect Binding

  • HTTP POST Binding - responses only not for requests

  • HTTP Artifact Binding

  • Reverse SOAP (PAOS) binding

  • SAML Metadata Generation

  • SAML Attribute Query

  • X.509 Certificate Authentication

  • Username/Password Authentication

It has been successfully tested with the Shibboleth Service Provider.

Service Provider

The service provider library makes it easy to integrate Go applications with SAML identity providers. It supports the following features.

  • HTTP Redirect Binding

  • HTTP Artifact Binding

  • SAML Metadata Generation

The SP will likely never support the HTTP POST binding. I created a XML Digital signature library xmlsig that is capable of signing XML. However, verifying XML signatures is far more challenging, and introduction of C libraries is not desirable. Transport level security can be used with Artifact Binding, but message level verification is required because the SAML assertion is passed from the IdP to SP via the user.

Honestly, I prefer the Artifact Binding as it is very much like an OAuth 2 server side flow.

The SP has been successfully tested with the Shibboleth Identity Provider.

Getting Started

To minimize external dependencies, the default build uses a single file to configure application properties and hold user information.

Build the binary
go get github.com/amdonov/lite-idp
Sample Configuration file
tls-ca: hack/tls-setup/certs/ca.pem
tls-private-key: hack/tls-setup/certs/idp-key.pem
tls-certificate: hack/tls-setup/certs/idp.pem

users:
 - name: CN=John Doe, OU=lite-idp sample, O=autogenerated, L=the internet # (1)
   attributes:
     SurName:
      - Doe
     FirstName:
      - John
     FullName:
      - John Doe
 - name: amdonov
   password: '$2a$10$U41uarKrlduOofvJRC724.7V7RRZOciyC4TZ4UAQUtWuPuKVvByR.' # (2)
   attributes:
     SurName:
      - Donovan
     FirstName:
      - Aaron
     FullName:
      - Aaron Donovan
  1. User that will authentication with client certificate.

  2. User that will authenticate with password. Passwords can be hashed with the command lite-idp hash

You can use existing certificates or use the Makefile in hack/tls-setup to generate some.

Note
ECDSA certificates cannot currently be used for signing.
Running
lite-idp serve

By default lite-idp will look for the configuration file at /etc/lite-idp/config.yaml and in the config.yaml in the current directory. In addition to the configuration file, many options can be provided via environment variables.

Customizing

All aspects of the IdP’s behavior are customizable. It’s controlled through an open struct and viper configuration values. Reasonable defaults make it easy to get running quickly and tailor it over time. The default behavior is shown it the following code.

Section of lite-idp/cmd/root.go
import "github.com/amdonov/lite-idp/idp"
...
		idp := &idp.IDP{} // (1)
		handler, err := idp.Handler()
		if err != nil {
			return err
		}
		server := &http.Server{
			TLSConfig: idp.TLSConfig,
			Handler:   handlers.CombinedLoggingHandler(os.Stdout, hsts(handler)),
			Addr:      viper.GetString("listen-address"),
		}
  1. Default IDP struct without configuration

As of version 0.3.0 it’s possible to add lite-idp commands to another cobra based application and customize the IDP struct as well. The cluster command makes use of this feature and can be used as an example.

import lidp "github.com/amdonov/lite-idp/cmd"
...
  rootCmd.AddCommand(lidp.AddCmd)
	rootCmd.AddCommand(lidp.HashCmd)
	rootCmd.AddCommand(lidp.ServeCmd(&idp.IDP{
   // customization here
	}))
...

One can examine the struct to see integration points. Some key ones are highlighted below.

Password Validation

Many organizations still use username/password for authentication. Validation of user provided passwords is controlled by the IDP’s PasswordValidator. If one isn’t provided it will use a simple one that reads hashed passwords from the configuration file. Developers can use that implementation as example. Viper makes it easy retrieve any required custom parameters from the configuration file.

PasswordValidator interface
type PasswordValidator interface {
	Validate(user, password string) error
}

User Attributes

The IdP enables retrieval of user attributes from multiple sources through the AttributeSource interface. The IdP will read attributes from the configuration file if no AttributeSources are provided.

AttributeSource interface
type AttributeSource interface {
	AddAttributes(*model.User, *model.AuthnRequest) error
}

Login Page

The default login page was created using Patternfly’s login template. The hack/ui folder contains a small npm project that packages the HTML, JavaScript, and assets for bundling and inclusion in a go source file with go-bindata-assetfs.

login

Storing State

The IdP needs to store some state both short term (minutes) and longer term (hours). For example, keeping request information while a user enters data in a login form or maintaining active sessions to enable single-sign on. Both cases are handled through a common interface.

Cache interface
type Cache interface {
	Set(key string, entry []byte) error
	Get(key string) ([]byte, error)
	Delete(key string) error
}

Data is marshalled to a byte slice using protocol buffers to save space and increase performance. The default implementation uses BigCache. It’s trival to replace this implementation with something like Redis or memcached if desired. The relevant IDP fields are TempCache and UserCache. There is a Redis implementation in store/redis that is used when running in cluster mode.

Clustered Deployments

It’s possible to scale the IdP horizontally and use centralized state and configuration. Viper supports retrieval of configuration information from etcd, and as discussed in Storing State, the IdP can store all state information in external systems. To run a cluster set configure Redis properties and run the cluster command.

Sample Redis configuration section
redis:
 address: "redis:6379"
 password: money
Running with Redis cache
lite-idp cluster

lite-idp's People

Contributors

ack avatar amdonov avatar asprouse5 avatar colin-campbell avatar dependabot[bot] avatar dmorgan81 avatar dwwarr avatar joakimlofgren avatar josephspurrier avatar lpmi-13 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lite-idp's Issues

Security: XSS Issue in demo UI

Hi,
there is a cross site scripting security vulnerability in the demo ui:

$("#errorMsg").html(urldecode(params['error']));

Malicious javascript can be injected through the error url parameter. This needs to be fixed to use the .text() method instead.

I'm reporting publicly since this is the "hacks" folder, demo ui and unlikely to be used in production. Feel free to restrict the issue if you deem otherwise.

panic: runtime error: invalid memory address or nil pointer dereference

I tried to build a simple authentication application and got SIGSEGV from lite-idp. The application used python3-saml and flask as sp and lite-idp as idp.

The workflow of the application:

  • Flask service provider starts
  • Idp-lite servers
  • idp-lite adds flask as service provider
  • Flask requests the idp metadata (custom code) to add idp configuration
  • Flask sends the metadata xml
  • SIGSEGV from lite-idp

Easily reproducable example, add configurations to files in same folder with provided names and run docker-compose up

docker-compose.yml

version: "3.7"
services:
  flask.local:
    build:
      dockerfile: flask
      context: .
    ports:
      - 8000:8000
    networks:
      - backend

  idp.local:
    build:
      dockerfile: idp
      context: .
    ports:
      - 9443:9443
    networks:
      - backend
    depends_on:
      - flask.local

networks:
  backend:

flask

FROM ubuntu:18.04
# APT
RUN apt update
RUN apt install -y git python3 python3-pip libxmlsec1-dev pkg-config
# Clone
RUN git clone https://github.com/onelogin/python3-saml.git/
WORKDIR /python3-saml
# Requirements
RUN pip3 install -r demo-flask/requirements.txt
RUN python3 setup.py install
# Configuration
RUN sed -i 's|https://<sp_domain>|http://flask.local:8000|g' demo-flask/saml/settings.json
# Custom code
RUN sed -i 's|auth = O.*|from onelogin.saml2.auth import OneLogin_Saml2_Settings\n    from onelogin.saml2.idp_metadata_parser import OneLogin_Saml2_IdPMetadataParser\n    import json\n\n    parsed=OneLogin_Saml2_IdPMetadataParser.parse_remote("https://idp.local:9443/metadata",validate_cert=False)\n\n    json_data_file=open(app.config["SAML_PATH"]+"/settings.json","r")\n    settings_data=json.load(json_data_file)\n    json_data_file.close()\n\n    merged=OneLogin_Saml2_IdPMetadataParser.merge_settings(settings_data,parsed)\n    auth=OneLogin_Saml2_Auth(req,merged)\n\n    return auth|' demo-flask/index.py
# Start
CMD python3 demo-flask/index.py

idp

FROM golang:rc-alpine3.10
RUN apk add git gcc make libc-dev openssl
RUN git clone https://github.com/amdonov/lite-idp.git /go/src/myapp/lite-idp
WORKDIR /go/src/myapp/lite-idp/hack/tls-setup
RUN make
WORKDIR /go/src/myapp/lite-idp
RUN echo >> config.yaml
RUN echo "listen-address: 0.0.0.0:9443" >> config.yaml
RUN echo "server-name: idp.local:9443" >> config.yaml
RUN go build main.go
CMD ./main serve & sleep 1 && ./main add service-provider http://flask.local:8000/metadata/ && fg

stack trace

flask.local_1  |  * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
flask.local_1  |  * Restarting with stat
flask.local_1  |  * Debugger is active!
flask.local_1  |  * Debugger PIN: 340-222-474
idp.local_1    | using config file: /go/src/myapp/lite-idp/config.yaml
idp.local_1    | using the built-in ui assets
idp.local_1    | time="2019-07-17T08:03:03Z" level=info msg="listening for connections on 0.0.0.0:9443"
idp.local_1    | using config file: /go/src/myapp/lite-idp/config.yaml
idp.local_1    | 192.168.128.2 - - [17/Jul/2019:08:03:04 +0000] "GET /metadata HTTP/1.1" 200 8995 "" "Python-urllib/3.6"
flask.local_1  | 192.168.128.3 - - [17/Jul/2019 08:03:04] "GET /metadata/ HTTP/1.1" 200 -
idp.local_1    | panic: runtime error: invalid memory address or nil pointer dereference
idp.local_1    | [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x8db2de]
idp.local_1    | 
idp.local_1    | goroutine 1 [running]:
idp.local_1    | github.com/amdonov/lite-idp/idp.convertMetadata(0xc00018c000, 0x9784a0)
idp.local_1    |        /go/src/myapp/lite-idp/idp/sp.go:69 +0x4e
idp.local_1    | github.com/amdonov/lite-idp/idp.ReadSPMetadata(0xb3d780, 0xc0000b69c0, 0xc0000b69c0, 0xb3d780, 0xc0000b69c0)
idp.local_1    |        /go/src/myapp/lite-idp/idp/sp.go:64 +0xbf
idp.local_1    | github.com/amdonov/lite-idp/cmd.glob..func2(0x143fac0, 0xc000097950, 0x1, 0x1, 0x0, 0x0)
idp.local_1    |        /go/src/myapp/lite-idp/cmd/serviceProvider.go:44 +0x105
idp.local_1    | github.com/spf13/cobra.(*Command).execute(0x143fac0, 0xc000097930, 0x1, 0x1, 0x143fac0, 0xc000097930)
idp.local_1    |        /go/pkg/mod/github.com/spf13/[email protected]/command.go:698 +0x42c
idp.local_1    | github.com/spf13/cobra.(*Command).ExecuteC(0x143fce0, 0xa6eec0, 0x7, 0xa63840)
idp.local_1    |        /go/pkg/mod/github.com/spf13/[email protected]/command.go:783 +0x2c9
idp.local_1    | github.com/spf13/cobra.(*Command).Execute(...)
idp.local_1    |        /go/pkg/mod/github.com/spf13/[email protected]/command.go:736
idp.local_1    | main.Execute()
idp.local_1    |        /go/src/myapp/lite-idp/main.go:38 +0x31
idp.local_1    | main.main()
idp.local_1    |        /go/src/myapp/lite-idp/main.go:79 +0x148
example_idp.local_1 exited with code 2

Cannot generate certs

While trying to generate the certs I get the following error:

go get: github.com/coreos/[email protected] updating to
        github.com/coreos/[email protected]: parsing go.mod:
        module declares its path as: go.etcd.io/bbolt
                but was required as: github.com/coreos/bbolt

When modifying the makefile from:

cfssl:
	go get -u -tags nopkcs11 github.com/cloudflare/cfssl/cmd/cfssl
	go get -u github.com/cloudflare/cfssl/cmd/cfssljson
	go get -u github.com/mattn/goreman

To:

cfssl:
	go get -tags nopkcs11 github.com/cloudflare/cfssl/cmd/cfssl
	go get github.com/cloudflare/cfssl/cmd/cfssljson
	go get -u github.com/mattn/goreman

It works

License???

Have you considered throwing a license on this?

I'm just looking... With some docs it might have been reusable. When I see what commercial offerings charge for a simple saml-LDAP solution that barely works I'm tempted to roll my own :)

Client Certificate is requested

When the IDP login page is opened the first time the server asks for client certificates. It would be nice if this behavior could be disabled via the config.yaml.

	tlsConfig := &tls.Config{
		Certificates: []tls.Certificate{cert},
		//Some but not all operations will require a client cert
		ClientAuth: tls.VerifyClientCertIfGiven,
		MinVersion: tls.VersionTLS12,
	}

Tagging docker images

It would be nice to have docker images tagged with release versions, not just the relative latest tag.

Thanks in advance. 🙂

unsupported signature algorithm error

Hi, I am getting unsupported signature algorithm each time I try to login via SAML.

This is the url data:

https://127.0.0.1:9443/SAML2/Redirect/SSO?RelayState=lTWG557ErB0jdoEZGhp7uSOl7Am_zfx-1-qvj69EFPlRnWbS5SdQqKzH&SAMLRequest=nJJPj9MwEMW%2FiuV7Yudfs7U2kcpWiEoLWzWFA7epM6WWErt4JsB%2Be9R2kcolh73a8%2Ba9n%2F0eCcbhbFYTn%2FwOf05ILP6MgydzuWjkFL0JQI6MhxHJsDXd6vOzyVNtgAgju%2BDlneQ8rznHwMGGQYrNupGuTwqEHrLFYlkdy6yoQBe1Lo9F3R%2BXpa3qQ%2FlwqMqitFJ8w0gu%2BEbmqZZiQzThxhOD50bmOtdJppNc7zNtdGWqOl3UxXcp1kjsPPBVeWI%2Bk1Eqy%2BtUpzrNzLIsC3VJl6sd9i6iZdV1L1Ks%2FsE9BU%2FTiLHD%2BMtZ%2FLp7vu0xSg3BwnAKxOZBa60u%2BAosSbF9o%2FzgfO%2F8j%2FknOdyGyHza77fJ9qXby%2Fb6LebKGMXHEEfg%2BSWXE9cnx%2BuoQc%2BOX2U7k3NEhh4YHtWdVftWhy8w4ma9DYOzr%2B%2Bw5wieHHqWYjUM4fdTRGBsJMcJpWpvlv%2BXrv0bAAD%2F%2Fw%3D%3D

This is the decoded saml request in above url:

<samlp:AuthnRequest xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="id-285c3afff17086a4650f9b0b781198e02974d762" Version="2.0" IssueInstant="2020-10-20T10:39:54.184Z" Destination="https://127.0.0.1:9443/SAML2/Redirect/SSO" AssertionConsumerServiceURL="http://localhost:8000/saml/acs" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"><saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://localhost:8000/saml/metadata</saml:Issuer><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><ds:Reference URI="#id-285c3afff17086a4650f9b0b781198e02974d762"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>WNxqn7Bi51VRJiA/RMxVv7eaYkY=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>OWViufTSJVmmYkWMS8QgAOgmoJob3CNYoZTCYy+Khwt3oGFqRa3xxzG0k1NZoI257wIHNSrs6Za7gZgLN82CPQSs1+sW09u6FGhbOqYK2TJ0oTLLHs+3YyjqW8s5JCWhKYN1G/h8zAkdkYwnvS2T2DXssD9Cbwz0ZDx1O2TrYtfNfhh+4LZwCainB0K6i38FJZuNAry0cKCFullPMBboNRdPHw0jLoMqYje0I3jVe7fQfTfblfZ6U6eGbzz7rAXaQXFUh8AS+eaEId4YmMO5YkZ0qVRf8zczfyuxCcx/oulUE35ybgVq3o9ZYuMD6h7DJo6q+1iys1HX9YFqCJiSag==</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIID6zCCAtOgAwIBAgIUQiPqrlxXdGXbuGCs5b8VAUMpAygwDQYJKoZIhvcNAQELBQAwgYQxCzAJBgNVBAYTAlNHMRIwEAYDVQQIDAlzaW5nYXBvcmUxEjAQBgNVBAcMCXNpbmdhcG9yZTEMMAoGA1UECgwDREJTMQwwCgYDVQQLDANJVFQxEzARBgNVBAMMCm9wLWJhY2tlbmQxHDAaBgkqhkiG9w0BCQEWDW9wZGV2QGRicy5jb20wHhcNMjAwOTA3MDMwMTM0WhcNMjMxMjIxMDMwMTM0WjCBhDELMAkGA1UEBhMCU0cxEjAQBgNVBAgMCXNpbmdhcG9yZTESMBAGA1UEBwwJc2luZ2Fwb3JlMQwwCgYDVQQKDANEQlMxDDAKBgNVBAsMA0lUVDETMBEGA1UEAwwKb3AtYmFja2VuZDEcMBoGCSqGSIb3DQEJARYNb3BkZXZAZGJzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMNAf0/wm0mR19Inl3uwLBB2OBlmDc4W8DoschxdS0FnBDbQFteIJmqsxivylBER9XgN8HICgj7pM2Xd0o93sxSWsd2JdKbLUyBlpC1ElaptgHQYsnncFxlFA6BrWhoSf13KUgpxg+MmtnFhr+5Zab12Yavhm71jcJMsACK1DyWXRxLa+xmODW05e22M6c69m53824sfoQKe/0LA+r1KxeAOtIDTEAzwkdWnw3e9JGcXEE3dzPF2d89dgY2ZTNRYUe3hTyUk6WiIIfcyPivBPqQcZJsMK+jnJ353VhrDkmeVcR193mvVhsW7hit4mwIw+XrCFTSJB+VwSweHQtBaWvECAwEAAaNTMFEwHQYDVR0OBBYEFHlg0nvPdRLB2y9m5NusFtD/wTkdMB8GA1UdIwQYMBaAFHlg0nvPdRLB2y9m5NusFtD/wTkdMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBALtuqY85WuIQ96mVtyt5BzYGdEi55WxXxgK8bLweZ/t+JbfjQleoCk/2zRWZ64aax/kBFMe+MJUWe8agZsIR8QBDdiGY9VBjW0iNGlW98qhQmR6NxDJSh7KxvGZ2kLvsAQxp72JZBJL1Lae4WDXzRoyeKuobRzggjQf8QkKKcMqeOLNpEBK6uAb+mgouodiqjgGt+dFgFcX7vC8lAVq2UBJZ0JZempGkAI8ysGy9qosDpEuHdUMpKEqxiRPd+So8gMqdl+ysIk+4xers9fGDOi/0ohttOlMenMAUXiiD7I9Tm1ranioc64pctZsDtewyiMo/QWZvcJfICueW3t5W7vc=</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature><samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" AllowCreate="true"/></samlp:AuthnRequest>

Here is my config.yaml

artifact-service-path: /SAML2/SOAP/ArtifactResolution
attribute-service-path: /SAML2/SOAP/AttributeQuery
cookie-name: lite-idp-sess
digest-algorithm: http://www.w3.org/2001/04/xmlenc#sha256
ecp-service-path: /SAML2/SOAP/ECP
listen-address: 127.0.0.1:9443
metadata-path: /metadata
redis:
  address: 127.0.0.1:6379
  password: ""
saml-attribute-name-format: urn:oasis:names:tc:SAML:2.0:attrname-format:basic
server-name: 127.0.0.1:9443
signature-algorithm: "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
sps:
- entityid: http://localhost:8000/saml/metadata
  assertionconsumerservices:
  - index: 1
    isdefault: false
    binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
    location: http://localhost:8000/saml/acs
  certificate: MIID6zCCAtOgAwIBAgIUQiPqrlxXdGXbuGCs5b8VAUMpAygwDQYJKoZIhvcNAQELBQAwgYQxCzAJBgNVBAYTAlNHMRIwEAYDVQQIDAlzaW5nYXBvcmUxEjAQBgNVBAcMCXNpbmdhcG9yZTEMMAoGA1UECgwDREJTMQwwCgYDVQQLDANJVFQxEzARBgNVBAMMCm9wLWJhY2tlbmQxHDAaBgkqhkiG9w0BCQEWDW9wZGV2QGRicy5jb20wHhcNMjAwOTA3MDMwMTM0WhcNMjMxMjIxMDMwMTM0WjCBhDELMAkGA1UEBhMCU0cxEjAQBgNVBAgMCXNpbmdhcG9yZTESMBAGA1UEBwwJc2luZ2Fwb3JlMQwwCgYDVQQKDANEQlMxDDAKBgNVBAsMA0lUVDETMBEGA1UEAwwKb3AtYmFja2VuZDEcMBoGCSqGSIb3DQEJARYNb3BkZXZAZGJzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMNAf0/wm0mR19Inl3uwLBB2OBlmDc4W8DoschxdS0FnBDbQFteIJmqsxivylBER9XgN8HICgj7pM2Xd0o93sxSWsd2JdKbLUyBlpC1ElaptgHQYsnncFxlFA6BrWhoSf13KUgpxg+MmtnFhr+5Zab12Yavhm71jcJMsACK1DyWXRxLa+xmODW05e22M6c69m53824sfoQKe/0LA+r1KxeAOtIDTEAzwkdWnw3e9JGcXEE3dzPF2d89dgY2ZTNRYUe3hTyUk6WiIIfcyPivBPqQcZJsMK+jnJ353VhrDkmeVcR193mvVhsW7hit4mwIw+XrCFTSJB+VwSweHQtBaWvECAwEAAaNTMFEwHQYDVR0OBBYEFHlg0nvPdRLB2y9m5NusFtD/wTkdMB8GA1UdIwQYMBaAFHlg0nvPdRLB2y9m5NusFtD/wTkdMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBALtuqY85WuIQ96mVtyt5BzYGdEi55WxXxgK8bLweZ/t+JbfjQleoCk/2zRWZ64aax/kBFMe+MJUWe8agZsIR8QBDdiGY9VBjW0iNGlW98qhQmR6NxDJSh7KxvGZ2kLvsAQxp72JZBJL1Lae4WDXzRoyeKuobRzggjQf8QkKKcMqeOLNpEBK6uAb+mgouodiqjgGt+dFgFcX7vC8lAVq2UBJZ0JZempGkAI8ysGy9qosDpEuHdUMpKEqxiRPd+So8gMqdl+ysIk+4xers9fGDOi/0ohttOlMenMAUXiiD7I9Tm1ranioc64pctZsDtewyiMo/QWZvcJfICueW3t5W7vc=
sso-service-path: /SAML2/Redirect/SSO
temp-cache-duration: 5m
tls-ca: idp\ca\ca.crt
tls-certificate: idp\certificate.pem.crt
tls-private-key: idp\mykey.pem
user-cache-duration: 8h
users:
- attributes:
    FirstName:
    - John
    FullName:
    - John Doe
    SurName:
    - Doe
  name: CN=John Doe, OU=lite-idp sample, O=autogenerated, L=the internet
- attributes:
    FirstName:
    - Aaron
    FullName:
    - Aaron Donovan
    SurName:
    - Donovan
  name: amdonov
  password: $2a$10$U41uarKrlduOofvJRC724.7V7RRZOciyC4TZ4UAQUtWuPuKVvByR.

Metadata file from sp

<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" validUntil="2020-10-22T10:27:56.072Z" entityID="http://localhost:8000/saml/metadata">
  <SPSSODescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" validUntil="2020-10-22T10:27:56.0717049Z" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol" AuthnRequestsSigned="true" WantAssertionsSigned="true">
    <KeyDescriptor use="encryption">
      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
        <X509Data>
          <X509Certificate>MIID6zCCAtOgAwIBAgIUQiPqrlxXdGXbuGCs5b8VAUMpAygwDQYJKoZIhvcNAQELBQAwgYQxCzAJBgNVBAYTAlNHMRIwEAYDVQQIDAlzaW5nYXBvcmUxEjAQBgNVBAcMCXNpbmdhcG9yZTEMMAoGA1UECgwDREJTMQwwCgYDVQQLDANJVFQxEzARBgNVBAMMCm9wLWJhY2tlbmQxHDAaBgkqhkiG9w0BCQEWDW9wZGV2QGRicy5jb20wHhcNMjAwOTA3MDMwMTM0WhcNMjMxMjIxMDMwMTM0WjCBhDELMAkGA1UEBhMCU0cxEjAQBgNVBAgMCXNpbmdhcG9yZTESMBAGA1UEBwwJc2luZ2Fwb3JlMQwwCgYDVQQKDANEQlMxDDAKBgNVBAsMA0lUVDETMBEGA1UEAwwKb3AtYmFja2VuZDEcMBoGCSqGSIb3DQEJARYNb3BkZXZAZGJzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMNAf0/wm0mR19Inl3uwLBB2OBlmDc4W8DoschxdS0FnBDbQFteIJmqsxivylBER9XgN8HICgj7pM2Xd0o93sxSWsd2JdKbLUyBlpC1ElaptgHQYsnncFxlFA6BrWhoSf13KUgpxg+MmtnFhr+5Zab12Yavhm71jcJMsACK1DyWXRxLa+xmODW05e22M6c69m53824sfoQKe/0LA+r1KxeAOtIDTEAzwkdWnw3e9JGcXEE3dzPF2d89dgY2ZTNRYUe3hTyUk6WiIIfcyPivBPqQcZJsMK+jnJ353VhrDkmeVcR193mvVhsW7hit4mwIw+XrCFTSJB+VwSweHQtBaWvECAwEAAaNTMFEwHQYDVR0OBBYEFHlg0nvPdRLB2y9m5NusFtD/wTkdMB8GA1UdIwQYMBaAFHlg0nvPdRLB2y9m5NusFtD/wTkdMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBALtuqY85WuIQ96mVtyt5BzYGdEi55WxXxgK8bLweZ/t+JbfjQleoCk/2zRWZ64aax/kBFMe+MJUWe8agZsIR8QBDdiGY9VBjW0iNGlW98qhQmR6NxDJSh7KxvGZ2kLvsAQxp72JZBJL1Lae4WDXzRoyeKuobRzggjQf8QkKKcMqeOLNpEBK6uAb+mgouodiqjgGt+dFgFcX7vC8lAVq2UBJZ0JZempGkAI8ysGy9qosDpEuHdUMpKEqxiRPd+So8gMqdl+ysIk+4xers9fGDOi/0ohttOlMenMAUXiiD7I9Tm1ranioc64pctZsDtewyiMo/QWZvcJfICueW3t5W7vc=</X509Certificate>
        </X509Data>
      </KeyInfo>
      <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"></EncryptionMethod>
      <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes192-cbc"></EncryptionMethod>
      <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"></EncryptionMethod>
      <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"></EncryptionMethod>
    </KeyDescriptor>
    <KeyDescriptor use="signing">
      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
        <X509Data>
          <X509Certificate>MIID6zCCAtOgAwIBAgIUQiPqrlxXdGXbuGCs5b8VAUMpAygwDQYJKoZIhvcNAQELBQAwgYQxCzAJBgNVBAYTAlNHMRIwEAYDVQQIDAlzaW5nYXBvcmUxEjAQBgNVBAcMCXNpbmdhcG9yZTEMMAoGA1UECgwDREJTMQwwCgYDVQQLDANJVFQxEzARBgNVBAMMCm9wLWJhY2tlbmQxHDAaBgkqhkiG9w0BCQEWDW9wZGV2QGRicy5jb20wHhcNMjAwOTA3MDMwMTM0WhcNMjMxMjIxMDMwMTM0WjCBhDELMAkGA1UEBhMCU0cxEjAQBgNVBAgMCXNpbmdhcG9yZTESMBAGA1UEBwwJc2luZ2Fwb3JlMQwwCgYDVQQKDANEQlMxDDAKBgNVBAsMA0lUVDETMBEGA1UEAwwKb3AtYmFja2VuZDEcMBoGCSqGSIb3DQEJARYNb3BkZXZAZGJzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMNAf0/wm0mR19Inl3uwLBB2OBlmDc4W8DoschxdS0FnBDbQFteIJmqsxivylBER9XgN8HICgj7pM2Xd0o93sxSWsd2JdKbLUyBlpC1ElaptgHQYsnncFxlFA6BrWhoSf13KUgpxg+MmtnFhr+5Zab12Yavhm71jcJMsACK1DyWXRxLa+xmODW05e22M6c69m53824sfoQKe/0LA+r1KxeAOtIDTEAzwkdWnw3e9JGcXEE3dzPF2d89dgY2ZTNRYUe3hTyUk6WiIIfcyPivBPqQcZJsMK+jnJ353VhrDkmeVcR193mvVhsW7hit4mwIw+XrCFTSJB+VwSweHQtBaWvECAwEAAaNTMFEwHQYDVR0OBBYEFHlg0nvPdRLB2y9m5NusFtD/wTkdMB8GA1UdIwQYMBaAFHlg0nvPdRLB2y9m5NusFtD/wTkdMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBALtuqY85WuIQ96mVtyt5BzYGdEi55WxXxgK8bLweZ/t+JbfjQleoCk/2zRWZ64aax/kBFMe+MJUWe8agZsIR8QBDdiGY9VBjW0iNGlW98qhQmR6NxDJSh7KxvGZ2kLvsAQxp72JZBJL1Lae4WDXzRoyeKuobRzggjQf8QkKKcMqeOLNpEBK6uAb+mgouodiqjgGt+dFgFcX7vC8lAVq2UBJZ0JZempGkAI8ysGy9qosDpEuHdUMpKEqxiRPd+So8gMqdl+ysIk+4xers9fGDOi/0ohttOlMenMAUXiiD7I9Tm1ranioc64pctZsDtewyiMo/QWZvcJfICueW3t5W7vc=</X509Certificate>
        </X509Data>
      </KeyInfo>
    </KeyDescriptor>
    <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://localhost:8000/saml/slo" ResponseLocation="http://localhost:8000/saml/slo"></SingleLogoutService>
    <AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://localhost:8000/saml/acs" index="1"></AssertionConsumerService>
  </SPSSODescriptor>
</EntityDescriptor>

Any idea on what's causing the problem?

SP clustering support

thank you for your contributions!

I am wondering if the redis support also extends to SP so that sessions are common in a clustered HA service provider.

Or perhaps there is some other magic?

Config sample

Could you provide a config YAML file to see how a SP should be defined? something like

serviceProviders:
 - EntityId: https://1c61bc0a.ngrok.io
   Certificate: hack/tls-setup/certs/service_provider_cert.pem
   AssertionConsumerServices:
    - Index: 0
      IsDefault: true
      Binding: Artifact
      Location: https://1c61bc0a.ngrok.io/saml/artifact_resolution

Thanks in advance

Documentation

Cloud you compose documentation about installing and using this software?

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.