Configuring 3-legged OAuth 1.0 in Spring Boot via Java Config (not xml)? - spring-boot

Trying to configure both 3-legged and 2-legged authentication with OAuth 1.0(a) and Spring Boot via Java Configuration (not using XML).
Does anyone have any examples/tutorials for a Java-based configuration for either the 2 or 3 legged approaches?
Thank you,
Matt

enroth's answer here worked for me: https://stackoverflow.com/a/42143001/11274383
Note: We are using OAuth 1.0(a) so on the BaseProtectedResourceDetails I added this to be safe:
details.setUse10a(true);

Related

Combine OIDC and SAML in Spring Boot

I'm wondering if we can have a single Spring Boot application that supports both OIDC and SAML as authentication protocols at the same time. I could not find much help on this on the internet. If this is not possible, what are my options?
I integrated both in my local Spring Boot application and built it, but it did not work. I'm not sure if I did something wrong or if this is completely unsupported. Please guide.

Springboot integration with IDP using SAML with a .pem file provided

I am new to spring boot. I am doing an integration with spring security and SAML.
I have
IDP metadata.xml
Certificate.pem
If there are any references which reflects this requirement please share. It would be really of great help.
There are lot many resources in internet available however the one that really helped me to implement the SSO integration using spring boot are
spring-saml2.0-websso-and-jwt-for-mobile-api
spring-security-saml2.0-websso-with-angular-client

Separate spring authenticator server from resource

i m new with spring security.
I want to know if it's possible to have jwt authentication server separate from resource server,
If possible i need a working example.
Thanks!
You could find an example with Oauth2 and Spring Boot 2.1.9.RELEASE here:
https://github.com/buddhiprab/springboot-oauth2-separating-authorization_server-and-resource_server
All the explanation of this example is here: https://medium.com/#buddhiprabhath/spring-boot-oauth-2-0-separating-authorization-service-and-resource-service-1641ebced1f0
This is doing with the client-credentials flow from OAuth2.
Here is another example using password flow:
https://www.javainuse.com/spring/springboot-oauth2-password-grant
Here's an example that shows a separate auth and resource server. This is from Joe Grandja, who is one of the primary authors of Spring Security:
Old way; Spring Security version 5.1 or earlier with separate spring-security-oauth library: https://github.com/jgrandja/spring-security-oauth-2-4-migrate
New way; Spring Security 5.2+: https://github.com/jgrandja/spring-security-oauth-5-2-migrate
Thank`s everyone! i start to understand how it works! i want to integrate jwt now!

Spring boot reactive (webflux) support with #EnableResourceServer

I am trying to migrate my existing spring boot 1.5 resource server (oauth2) to spring boot 2.x, while do so i am facing difficulties in providing reactive support for the same. It looks like i can not use reactive webflux when i use pring-cloud-starter-oauth2, i have few questions:
does spring boot 2.0.3 supports webflux + oauth2 resource servers using #EnableResourceServer, is yes then what is right way to implement it?
If it does not support, what are other possible options? Spring 5 security documentations says that it does not support authorization server and resource server at this moment.
Thank you in advance
Short answer: no.
There's no support to implement your own Authorization nor Resource server using webflux.

how to implement the oauth2 serverconfiguration in spring boot 2.0 M7?

how to implement the oauth2 server using jwt to get clients from database in spring boot 2.0 M7 ? there is any example, I just found an example with spring boot 2.0. M4 but seems it is not compatible with M7 , could someone please provide me a example ?
Support for the spring-security-oauth2 dependency was removed from Spring Boot 2.0 in favor of Spring Security 5’s first class OAuth support. Functionality from the Spring Security OAuth project is still being migrated to core Spring Security. For Authorization server and Resource server support which has not been migrated yet, you will need to add a dependency on an additional jar. See this documentation for more details.

Resources