All Projects → vdenotaris → Spring Boot Security Saml Sample

vdenotaris / Spring Boot Security Saml Sample

Licence: apache-2.0
SBS3 — A sample SAML 2.0 Service Provider built on Spring Boot.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Spring Boot Security Saml Sample

Stormpath Sdk Java
Official Java SDK for the Stormpath User Management REST API
Stars: ✭ 221 (-52.88%)
Mutual labels:  spring-boot, spring, authentication, identity
Cipheridaas
CipherIDaaS —— Open-source IDaaS/IAM product by CipherChina , Hangzhou .
Stars: ✭ 121 (-74.2%)
Mutual labels:  identity, sso, iam, saml
Jbone
jbone基于Spring Cloud框架开发,旨在为中小企业提供稳定的微服务解决方案,为开发人员提供基础开发骨架,jbone包含微服务中所有常用组件,例如注册中心、服务管理、服务监控、JVM监控、内存分析、调用链跟踪、API网关等等。业务功能包括系统权限的统一管理、单点登录、CMS、电商平台、工作流平台、支付平台等等。
Stars: ✭ 961 (+104.9%)
Mutual labels:  spring-boot, spring, sso
Spring Boot Webflux Jjwt
Example Spring Boot and WebFlux (Reactive Web) with Spring Security and JWT for token Authentication and Authorization
Stars: ✭ 71 (-84.86%)
Mutual labels:  spring-boot, spring, authentication
Xxl Sso
A distributed single-sign-on framework.(分布式单点登录框架XXL-SSO)
Stars: ✭ 1,635 (+248.61%)
Mutual labels:  spring-boot, authentication, sso
Saml2.authentication.core
A SAML 2.0 middleware for ASP.NET Core
Stars: ✭ 66 (-85.93%)
Mutual labels:  authentication, sso, saml
Cerberus
A demonstration of a completely stateless and RESTful token-based authorization system using JSON Web Tokens (JWT) and Spring Security.
Stars: ✭ 482 (+2.77%)
Mutual labels:  spring-boot, spring, authentication
Spring Webmvc Pac4j
Security library for Spring Web MVC: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 110 (-76.55%)
Mutual labels:  spring-boot, authentication, saml
Zitadel
ZITADEL - Cloud Native Identity and Access Management
Stars: ✭ 105 (-77.61%)
Mutual labels:  identity, sso, iam
Study
全栈工程师学习笔记;Spring登录、shiro登录、CAS单点登录和Spring boot oauth2单点登录;Spring data cache 缓存,支持Redis和EHcahce; web安全,常见web安全漏洞以及解决思路;常规组件,比如redis、mq等;quartz定时任务,支持持久化数据库,动态维护启动暂停关闭;docker基本用法,常用image镜像使用,Docker-MySQL、docker-Postgres、Docker-nginx、Docker-nexus、Docker-Redis、Docker-RabbitMQ、Docker-zookeeper、Docker-es、Docker-zipkin、Docker-ELK等;mybatis实践、spring实践、spring boot实践等常用集成;基于redis的分布式锁;基于shared-jdbc的分库分表,支持原生jdbc和Spring Boot Mybatis
Stars: ✭ 159 (-66.1%)
Mutual labels:  spring-boot, spring, sso
Product Is
Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
Stars: ✭ 435 (-7.25%)
Mutual labels:  authentication, identity, sso
Authing
🔥Authing - IDaaS/IAM solution that can Auth to web and mobile applications.
Stars: ✭ 247 (-47.33%)
Mutual labels:  identity, iam, saml
Home
Welcome to Janssen: the world's fastest cloud native identity and access management platform
Stars: ✭ 176 (-62.47%)
Mutual labels:  identity, sso, iam
Spring Boot React Oauth2 Social Login Demo
Spring Boot React OAuth2 Social Login with Google, Facebook, and Github
Stars: ✭ 676 (+44.14%)
Mutual labels:  spring-boot, spring, authentication
casdoor
An Identity and Access Management (IAM) / Single-Sign-On (SSO) platform with web UI supporting OAuth 2.0, OIDC, SAML and CAS, QQ group: 645200447
Stars: ✭ 4,147 (+784.22%)
Mutual labels:  saml, iam, sso
Cas
Apereo CAS - Enterprise Single Sign On for all earthlings and beyond.
Stars: ✭ 9,154 (+1851.81%)
Mutual labels:  spring-boot, authentication, sso
Bird Java
bird-java是以Spring Boot为基础的开发增强组件包。
Stars: ✭ 154 (-67.16%)
Mutual labels:  spring-boot, spring, sso
Spring Security Pac4j
pac4j security library for Spring Security: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 231 (-50.75%)
Mutual labels:  spring-boot, authentication, saml
Maxkey
MaxKey is Single Sign On(SSO) System,Leading-Edge Enterprise-Class open source IAM(Identity and Access management) product.
Stars: ✭ 274 (-41.58%)
Mutual labels:  sso, iam, saml
Ockam
End-to-end encrypted messaging and mutual authentication between cloud and edge-device applications
Stars: ✭ 395 (-15.78%)
Mutual labels:  authentication, identity

[SBS3] Spring Boot Sample SAML 2.0 Service Provider

Build Status DOI GitHub release GitHub forks GitHub stars GitHub license


Project description

This project represents a sample implementation of a SAML 2.0 Service Provider, completely built on Spring Framework. In particular, it shows how to develop a web solution devised for Federated Authentication, by integrating Spring Boot and Spring Security SAML. The configuration has been completely defined using Java annotations (no XML).

SSOCircle (ssocircle.com) is used as public Identity Provider for test purpose.

Thanks to Vladimír Schäfer (github.com/vschafer) for supporting my work.

References

Spring Boot

Spring Boot makes it easy to create Spring-powered, production-grade applications and services with absolute minimum fuss. It takes an opinionated view of the Spring platform so that new and existing users can quickly get to the bits they need.

Spring Security SAML Extension

Spring SAML Extension allows seamless inclusion of SAML 2.0 Service Provider capabilities in Spring applications. All products supporting SAML 2.0 in Identity Provider mode (e.g. ADFS 2.0, Shibboleth, OpenAM/OpenSSO, Ping Federate, Okta) can be used to connect with Spring SAML Extension.


Walkthrough

Run as Docker container

To make it even easier, it is possible to run the project "as-is" also as Docker container. A valid account on SSOCircle is needed to perform the authentication process.

Run as container building a Docker image

Run a pre-built fat-jar:

docker run -it --rm -p 8080:8080 -t vdenotaris/spring-saml-sp:latest

or compile the code and run the application with Maven:

docker run -it --rm -p 8080:8080 -t vdenotaris/spring-saml-sp:2.3.1-mvn-jdk-8

Note: the related Docker image is publicly available on Docker Hub.

The Service Provider is deployed as web application. Enter http://localhost:8080/ in a browser to see the application running.

If you’re using Docker natively on Linux, Docker for Mac, or Docker for Windows, then the web app should now be listening on port 8080 on your Docker daemon host. Point your web browser to http://localhost:8080 to find the starting page. If this doesn’t resolve, you can also try http://127.0.0.1:8080/.

If you’re using Docker Machine on a Mac or Windows, use docker-machine ip MACHINE_VM to get the IP address of your Docker host. Then, open http://MACHINE_VM_IP:8080 in a browser. However, please note that the Service Provider is statically registered with localhost as endpoint on SSOCircle. Thus you need to reconfigure the application.


Unit tests

I would like to say thank you to Alexey Syrtsev (github.com/airleks) for his contribution on unit tests.

Metric Result
Coverage % 99%
Lines Covered 196
Total Lines 199

Additional notes

  1. The certificate on https://idp.ssocircle.com/ seems to change on a fairly regular basis. This results in the following exception.

javax.net.ssl.SSLPeerUnverifiedException: SSL peer failed hostname validation for name: null

To update the SSOCircle certificates within the keystore, just run:

cd src/main/resources/saml/ && sh ./update-certifcate.sh 
  1. Sometimes SSO Circle could display you an error during the authenticaton process. In this case, please update your federation metadata directly on https://idp.ssocircle.com:

    Manage Metadata > Service Provider Metadata

    Remove the current record and add a new one, using your FQDN and providing a new copy of your metadata: your can retrieve them at http://localhost:8080/saml/metadata.

  2. When the project version corresponds with the Spring Boot parent version, Maven may give you a warning as follows:

    Version is duplicate of parent version.

    Actually there is nothing wrong with the used configuration, thus you can just ignore that message.


License

Copyright 2020 Vincenzo De Notaris

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].