Spring Boot SAML 2.0 - SP with JBoss EAP - java

I need to integrate a Spring Boot backend (2.3.x) with SAML 2.0 authentication (for SSO purpose), implementing the Service Provider side, and then get the User object in the java backend with the various attributes valued by the Identity Provider (name , surname, roles etc ...) remote and already existing (IOM / OAM).
The Spring Boot backend is deployed on JBoss EAP 7.3 (middleware), and for now, I'm following the official RedHat doc to use the PicketLink library. I have already added the "plugin" on JBoss and now I need to configure the SP on the server, but I'm not sure what parameters to enter.
For this, I ask for support from those who have already met this need.
In practice, I need to achieve these two goals:
configure my backend as a Service Provider to an existing Identity Provider (Oracle OIM / OAM)
understand how to retrieve the metadata of the user object from the java backend, and then use them within the application (I specify that the frontend is not implemented with Spring, like Thymeleaf, but with Angular)
At the moment I'm trying to use PicketLink, but it's not mandatory; if you know of other solutions, that's fine.
Many thanks in advance!

If you need just authentication thru SAML you can follow this tutorial: https://developer.okta.com/blog/2017/03/16/spring-boot-saml. If you need database + SAML authentication you can follow this tutorial for authentication with SAML (Okta provider) https://developer.okta.com/blog/2020/10/14/spring-security-saml-database-authentication.

Related

which-azure-spring-boot-sample-active-directory-example-to-use-to-validate-acces-from resource server to server and vice versa calling

I have a frontend application in angular and backend in java language.
Goal:
to secure angular to spring boot application(A) with spring boot security and azure ad.
to secure above spring boot application(A)server api which will call other spring boot application(B) i.e. server to server resource security.
And spring boot application (B) calling spring boot application (A) with spring security.
Above project is a multimodule project.
• Please follow the below documentation link which describes the features and core scenarios of the Spring Boot application for Azure Active Directory (Azure AD). It explains in detail how to connect your spring boot application to an Azure AD tenant and protect your resource server with Azure AD. It uses the OAuth 2.0 protocol to protect web applications and resource servers.
https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/spring-boot-starter-for-azure-active-directory-developer-guide
Do take into consideration that the above steps mentioned in the documentation uses OAuth 2.0 authorization code grant flow for enabling a user to sign in with Microsoft account.
• And you will have to develop and build your own spring boot java application to integrate Azure AD authentication along with resource protection in it. The above documentation will help you configure the accessibility of resource servers from a web application as well as protect that resource server/API or access other resource servers from a resource server. Thus, this satisfies all your requirements promptly if you follow it. Also, please do take into consideration that you will have to have all the prerequisites in place like a supported Java Development Kit version 8, Apache Maven version 3 or later and a spring boot application already registered with Azure AD. Do refer to the link below for starter springboot Java application linked with Azure AD: -
https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory

Spring and Jboss SAML Integration

Is it possible to configure my spring application (which runs on tomcat) as service provider in SAML integration, where identity provider is configured on jboss 7 server? We have several subsystems, integrated via picketlink and now I am struggling to integrate my spring application with them.
I wonder if you have some examples / tutorials on how such integration can be implemented.
Spring Security has a SAML extentions spring-security-saml There is also a sample included.

Spring security with soap

I need to make a SOAP webservice and a web client. I have been trying for several days to implement and configure spring security on the ws to control authentication with a database but without success.
I use spring boot 2.2 with spring security.
I would like the user to authenticate only on certain actions and from a database and not by putting the password in hard.
Could you explain me how works spring security with soap ? I didn't find good and simple explanation.
Thanks for your help

Best way to insert users authorization on standard OSGi with Apache Karaf container and Play framewok

my web application based on standard OSGi with three different bundles that expose the API Rest (CXF library) for back-end otherwise Play framework for Front-end that calls the api exposed from three bundles before cited. Actually there is already authentication process by SSO and password with in front of an Apache proxy configured with virtual host listened on a port defined. How and where can I insert authorization layer to cover all three bundles that expose the API services ? What is your advise ?
You can add a CXF interceptor . Just implement/override the common CXF interceptors to customize the authentification process.

Can I integrate Shibboleth SSO in my Java Webapp without using Apache and shibd?

I'm working on a pure Java web application that uses an embedded Jetty and I want to integrate a Shibboleth login. To do this, I'm following switch.ch's guide for Shibboleth Service Provider Deployment, which states:
The Shibboleth Service Provider consists of a daemon shibd running on
all major operating systems and a web server module mod_shib which is
natively supported by:
Apache web servers (versions 1.3.x, 2.x)
IIS (versions 6, 7 and 8)
My question is, is there a way to integrate Shibboleth SSO in my Java web application without using an Apache web server or IIS running shibd? Maybe somebody has done this before and could provide example Servlets/Filters or the like?
I don't want an Webserver in front of the application just for Shibboleth, because it would complicate the installation. Currently, the installation is just two steps: extract the artefact and run the start script and I would appreciate if I could keep it like this.
The Shibboleth Service Provider takes care of a lot of complex use cases like key rotation, metadata refreshing, and attribute re-mapping. If you have an incredibly simple use case, where you need to authenticate users from one Shibboleth Identity Provider that rarely changes, you can consider validating the SAML 2.0 assertion in your Java code directly.
If you use spring-security already, you should probably start by looking at the spring-security-saml project:
http://projects.spring.io/spring-security-saml/
Alternatively, you can start with a low-level library like OpenSAML (https://wiki.shibboleth.net/confluence/display/OpenSAML/Home) or you can start with a higher level library like the LastPass Java SAML SDK (https://github.com/lastpass/saml-sdk-java).
Putting shibboleth sp with web server in front is the easiest way out. Additionally you can add servlet filter and check header , if you find all attributes released by idp validate them against your identity store just for assertion.

Categories