All Projects → oktadev → okta-spring-boot-saml-example

oktadev / okta-spring-boot-saml-example

Licence: Apache-2.0 license
Spring Boot, SAML, and Okta

Programming Languages

java
68154 projects - #9 most used programming language
HTML
75241 projects
Procfile
174 projects

Projects that are alternatives of or similar to okta-spring-boot-saml-example

okta-jhipster-microservices-oauth-example
A microservices architecture built with JHipster, OAuth 2.0, and Okta
Stars: ✭ 29 (-44.23%)
Mutual labels:  spring-security, okta
workos-node
Official Node SDK for interacting with the WorkOS API
Stars: ✭ 42 (-19.23%)
Mutual labels:  saml, okta
okta-spring-security-5-example
Authentication with Spring Security 5 and Okta OIDC
Stars: ✭ 16 (-69.23%)
Mutual labels:  spring-security, okta
Pac4j
Security engine for Java (authentication, authorization, multi frameworks): OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 2,097 (+3932.69%)
Mutual labels:  saml, spring-security
crowbar
Securily generates temporary AWS credentials through identity providers using SAML
Stars: ✭ 23 (-55.77%)
Mutual labels:  saml, okta
Spring Security Pac4j
pac4j security library for Spring Security: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 231 (+344.23%)
Mutual labels:  saml, spring-security
caddy-security
🔐 Authentication, Authorization, and Accounting (AAA) App and Plugin for Caddy v2. 💎 Implements Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0 (Github, Google, Facebook, Okta, etc.), SAML Authentication. MFA/2FA with App Authenticators and Yubico. 💎 Authorization with JWT/PASETO tokens. 🔐
Stars: ✭ 696 (+1238.46%)
Mutual labels:  saml
clearpass-cloud-service-whitelists
Whitelist entries for cloud identity services
Stars: ✭ 21 (-59.62%)
Mutual labels:  okta
spring-tiles-sample-app
Spring MVC - Apache Tile - AdminLTE Bootstrap template - Sample Application
Stars: ✭ 33 (-36.54%)
Mutual labels:  spring-security
express
快递代拿系统,SpringBoot的最佳实践
Stars: ✭ 178 (+242.31%)
Mutual labels:  spring-security
okta-terraform-demo
Example demos showcasing okta and terraform
Stars: ✭ 14 (-73.08%)
Mutual labels:  okta
spring-boot-login-example
Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example
Stars: ✭ 50 (-3.85%)
Mutual labels:  spring-security
OnlineStore
REST api for an online store using microservices architecture.
Stars: ✭ 27 (-48.08%)
Mutual labels:  spring-security
authentik
The authentication glue you need.
Stars: ✭ 2,941 (+5555.77%)
Mutual labels:  saml
Taroco-Authentication
Taroco-Authentication 统一认证服务
Stars: ✭ 49 (-5.77%)
Mutual labels:  spring-security
spring-boot-refresh-token-jwt
Spring Boot Refresh Token using JWT example - Expire and Renew JWT Token
Stars: ✭ 156 (+200%)
Mutual labels:  spring-security
seezoon-stack
一款基于当前最前沿的前端(Vue3 + Vite + Antdv)和后台(Spring boot)实现的低代码开发平台。
Stars: ✭ 227 (+336.54%)
Mutual labels:  spring-security
spring-boot-jwt-auth
🔑 Sample Spring boot application secured using JWT auth in custom header(X-Auth-Token).
Stars: ✭ 57 (+9.62%)
Mutual labels:  spring-security
Diber-backend
Delivery Service - Spring Boot / Spring Data Jpa / Hibernate / PostgreSQL / OAuth2 Application
Stars: ✭ 22 (-57.69%)
Mutual labels:  spring-security
JavaFamily
【Java面试+Java学习指南】 一份涵盖大部分Java程序员所需要掌握的核心知识。
Stars: ✭ 517 (+894.23%)
Mutual labels:  spring-security

Spring Boot, SAML, and Okta

A Spring Boot example app that shows how to implement single sign-on (SSO) with Spring Security's SAML and Okta.

Please read Get Started with Spring Boot, SAML, and Okta to see how this app was created.

Prerequisites:

Okta has Authentication and User Management APIs that reduce development time with instant-on, scalable user infrastructure. Okta's intuitive API and expert support make it easy for developers to authenticate, manage and secure users and roles in any application.

Getting Started

To install this example application, run the following commands:

git clone https://github.com/oktadeveloper/okta-spring-boot-saml-example.git
cd okta-spring-boot-saml-example

Create a SAML App in Okta

To begin, you'll need an Okta developer account. You can create one at developer.okta.com/signup or install the Okta CLI and run okta register.

Then, log in to your account and go to Applications > Create App Integration. Select SAML 2.0 and click Next. Name your app something like Spring Boot SAML and click Next.

Use the following settings:

  • Single sign on URL: http://localhost:8080/login/saml2/sso/okta
  • Use this for Recipient URL and Destination URL: (the default)
  • Audience URI: http://localhost:8080/saml2/service-provider-metadata/okta

Then click Next. Select the following options:

  • I'm an Okta customer adding an internal app
  • This is an internal app that we have created

Select Finish.

Okta will create your app, and you will be redirected to its Sign On tab. Scroll down to the SAML Signing Certificates and go to SHA-2 > Actions > View IdP Metadata. You can right-click and copy this menu item's link or open its URL. Copy the resulting link to your clipboard. It should look something like the following:

https://dev-13337.okta.com/app/<random-characters>/sso/saml/metadata

Go to your app's Assignment tab and assign access to the Everyone group.

Run the App and Login with Okta

Run your Spring Boot app from your IDE or using the command line:

./gradlew bootRun

Open http://localhost:8080 in your favorite browser and log in with the credentials you used to create your account.

You should see a successful result in your browser.

If you want to make the logout button work and display a user's attributes, please read the blog post.

Links

This example uses Spring Boot and Spring Security SAML to integrate with Okta.

Help

Please post any questions as comments on the blog post, or visit our Okta Developer Forums.

License

Apache 2.0, see 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].