Questions tagged [spring-oauth2]
The spring-oauth2 tag has no usage guidance, but it has a tag wiki.
671
questions
0
votes
1
answer
42
views
Spring authorization server authenticate for each client
I'm trying to build an Identity Provider using Spring authorization-server that third party applications are going to use for FIM (federated identity management).
We want each OAuth client to require ...
0
votes
1
answer
48
views
+50
Spring security - using WebClient access a resource that is protected via Oauth2 "Password" grant type
How can I access with WebClient a resource that is protected via the Oauth2 'Password' grant type?
Connecting with Oauth2 'client-credentials' works. In this case I need the password grant type.
I get ...
0
votes
0
answers
17
views
Spring authorization server without session
I'm trying to build an IdP that other applications can use to authenticate users using Spring authorization server.
I don't want the user to get logged in automatically, but since the /oauth2/...
-2
votes
1
answer
19
views
Spring Boot Authorizarion Server Authorize Endpoint providing 400
I am trying the below minimal configuration of the spring security authorization server:
https://docs.spring.io/spring-authorization-server/docs/current/reference/html/getting-started.html
My test ...
-1
votes
1
answer
24
views
spring-authorisation-server and email adresses inside user details
So some after fighting with spring-authorisation-server,
it now mostly works behind the oauth2-proxy.
One final problem is now, that the oauth2-proxy is not happy,
that there is no email adress ...
0
votes
0
answers
25
views
Service to Service secure communication among services run behind spring cloud gateway
I have couple of microservices running behind the Spring cloud gateway and all microservices run behind are protected by OAuth2 protocol using spring authorization server. Everything is working fine ...
0
votes
0
answers
44
views
JwtAuthenticationToken is not being saved to HttpSessionSecurityContextRepository: spring authorization server 0.4.0, spring 5.7
I am using spring authorization server for oauth2 authentication, with resource server configuration for handling authentication outside of the server. My use case is as follows:
user makes a request ...
0
votes
0
answers
34
views
Spring boot authorization server (1.0.0) intercept and store login_hint as a query param
I Have a situation when a client send and authorize request as such below:
http://localhost:8080/oauth2/authorize?scope=openid&response_type=code&redirect_uri=https://api.test.local:9443/...
0
votes
0
answers
32
views
Spring Security: OAuth2AuthorizationRequest is null
I'm using Keycloak as the authorization server
Trying to create an authorization endpoint, and redirect that endpoint to the user
Snippet of SecurityConfig.class
@Override
protected void configure( ...
0
votes
1
answer
61
views
Is there a way to receive an additional parameter in the OAuth2 token endpoint?
I'm using Spring Authorization Server in order to implement an OAuth2 Authorization Server. Before switching to this library, I was using Spring Security Authorization server with spring-security-...
0
votes
0
answers
88
views
Token Revocation in new Spring Authorization Server is not working
After revoking token with /oauth2/revoke I can still use this token to request secured data. Actually as I see revoke endpoint does not doing revocation at all it is just removing some metadata. I ...
0
votes
0
answers
50
views
Cannot resolve symbol 'OAuth2AuthenticationToken'
My Configure java file GoogleOAuth2SuccessHandler:
package ru.connor.shopping_app.config;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.Authentication;
import org....
1
vote
1
answer
183
views
Default 401 instead of redirecting for OAuth2 login Spring Security
I support two types of authentication and need to return 401 for most paths instead of redirects. For Keycloak I used the HttpUnauthorizedEntryPoint below and its fine, but for the OAuth2 login, it ...
0
votes
0
answers
48
views
Change principal_name value in oauth2authorizedclient spring security
I am working in social media portal backend with spring boot framework using oauth2 to get access the user account so my app works as client role in oauth2 framework so spring security after success ...
0
votes
0
answers
39
views
Spring OAuth2+OIDC user logged in and pressed back button in browser
I develop an application-Client and Authorization server on Spring Boot.
When user logged in in authorization server, redirected to client app and then press button back, he cames to login page of ...
0
votes
0
answers
23
views
Spring boot oauth2 client and eureka integration
Is there any way to integrate spring oauth2 client with eureka to make client take oauth2 server ip from eureka registry? I've read that article dated two years ago and hope there was some progress ...
0
votes
0
answers
18
views
OAuth 2 authorization server has the implementation of oauth2.1, which does support grant_type password. Is there away to add password grant to it?
Oauth2 auth server from spring, does not supports the ROPC, how would I add/enable the ROPC
The default auth server is working as expected. now I need password grate type. I need to support legacy ...
0
votes
0
answers
42
views
Customize Spring OAuth2TokenEndpointFilter
I need to customize the Authentication Success Handler method for the Spring Authorization Server OAuth2TokenEndpointFilter to simulate a OAuth2 provider with limited capabilities.
I've tried the ...
1
vote
3
answers
777
views
Spring Security Returns with 403 when there is no Bearer token
I could not find a proper solution to my problem yet. I'm using Spring Security Oauth2 resource server to authenticate my requests. And that works fine. But when tested with different scenario it is ...
0
votes
1
answer
196
views
Spring Security Resource Server throws "SpelEvaluationException: EL1011E"
I'm setting up a Resource Server with Spring Security 5.7.3 which authenticates against a Spring Authorization Server 0.3.1. I followed the instructions on https://docs.spring.io/spring-security/...
0
votes
1
answer
135
views
OAuth2 Authorization server with access token
Is it possible for OAuth2 Authorization server side to generate access token that will be get by client side and then transfer it again to server to authorize? The main point is to generate access ...
1
vote
1
answer
91
views
Disable spring security for subdomain
I have an application which can be accessed via different domains of type
www.*.example.com
For ex-
www.test.example.com
www.npc.example.com
www.train.example.com
When configuring the spring ...
0
votes
0
answers
135
views
Spring boot Client Credential
I am trying to access a protected external API from my microservices using libraries spring-oauth2-client. The external protected service uses client credentials - which means I need to request for ...
0
votes
0
answers
73
views
Spring Security check api key in query
I have a service with a few endpoints and for all endpoints, there is a token in the header and the auth mechanism works just fine.
Now I have a new endpoint and the api_key for this endpoint will be ...
1
vote
1
answer
219
views
Reactive Spring: How to pass Access Token from OAuth 2.0 Authorization Code Flow to scheduled task
I'm trying to build an application that periodically fetches data from a Third-Party API that demands a reCAPTCHA protected OAuth 2.0 Authorization Code Flow with PKCE for authentication.
I guess, it ...
0
votes
1
answer
289
views
How to make OAuth2 server read client from database rather than write in memory?
So I want to find a way to read Client credentials (client_id, client_secret,...) from database. I'm currently using SpringBoot 2.7.3.
Every tutorial I found is from 4+ years ago and use deprecated ...
0
votes
0
answers
221
views
JWT parse claims with org.springframework.security.oauth2.jwt
I'm using org.springframework.security.oauth2.jwt library to write a JWT utility class which will be in charge of creating tokens and parsing claims. Now my question is how to I parse claims of my JWT ...
0
votes
1
answer
235
views
Spring OAuth2 - JWT token working on server but not on localhost?
I am seeing that myapp is able to process the OAuth2 JWT token properly on the server, but it is giving token conversion error on localhost.
My Flow is as below -
On Server, the myapp is behind our ...
1
vote
1
answer
358
views
Setup Spring WebClient filter from an OAuth2 refresh_token
I have to consume an external API which uses OAuth2 for security. They do not support the grant type "client_credentials", but instead they give out a long-lived refresh_token that we can ...
2
votes
1
answer
164
views
How does spring oauth2 clientDetails.getAuthorities() help/work?
I am going through this api doc (source) of Spring OAuth2 ClientDetails Interface. And I am not sure how this i.e clientDetails.getAuthorities() works or helps in the authorization flow. The API docs ...
0
votes
1
answer
311
views
Can the new Spring Authorization Server generate tokens other than JWT and Opaque?
I am currently migrating the authorization server from old Spring Security OAuth2 to the new Spring Authorization Server.
It seems that the new Spring Authorization Server generates JWT tokens by ...
0
votes
0
answers
192
views
Spring Cloud Gateway as Oauth Resource + JWK Endpoint
I feel like I have been wasting my time and will continue to do so.
I have setup a spring cloud gateway to act as a single Oauth Resource Server for all my downstream microservices. On startup, it ...
0
votes
1
answer
97
views
Error 403 Despite having a valid JSESSIONID (Spring Boot)
Hihi,
I'm very new to the whole OAuth2 and Spring security. I'm a student and would appreciate any help I can get on this topic.
I want to implement OAuth2 login for my project site. A lot like those ...
2
votes
0
answers
304
views
Refresh token functionality in Spring cloud Gateway
I've setup a project in which I use Spring Cloud Gateway with oauth2 with authorization code flow functionalities and Keycloak as authorization server. The problem is that refresh token functionality ...
0
votes
0
answers
22
views
Spring Oauth2 client app behind api gw aws
Hello i'm trying to expose my app (having spring oauth2 client github and google) via aws gw
when i deploy my app without api gw everything is ok,
but i'm having many troubles when i want to use it ...
1
vote
1
answer
46
views
How and where to use OAuth2RefreshtokensWebFilter?
Hi I am new to both JHipster and Stackoverflow. I tried asking the same question on Should OAuth2RefreshtokensWebFilter Be Used Some Where? however, it was removed for some reason; hence, I am asking ...
0
votes
0
answers
28
views
How to set multiple paths based on the authority in spring security [duplicate]
I have few sets of paths.
public static final String[] ADMIN_URLS = {
"/api/v1/**",
};
public static final String[] MEMBER_URLS = {
"/api/v1/design-code/**",
...
2
votes
0
answers
716
views
OAuth2 Spring security with Google login doesn't work
I found a really good tutorial on third-party login with Spring security in the link below,
It contains both front-end and back-end code.
https://www.callicoder.com/spring-boot-security-oauth2-social-...
0
votes
0
answers
164
views
I am learning spring-security I am getting Unsatisfied Dependency Exception I don't understand what is wrong
error:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': ...
-1
votes
1
answer
479
views
Spring-Security with OAuth2Login & CustomAuthenticationProvider
In my case I have an OAuth2 login with a CustomAuthenticationProvider.
Now I have the problem that the CustomAuthenticationProvider is not called and I don't know why.
The login works so far without ...
0
votes
2
answers
547
views
AccessDeniedException: Access is denied while trying to login OAuth2.0 login form
I have been struggling for days to login and access protected API using OAuth2.0 protocol. I use latest Spring libraries (Spring Security 5). I think I have a problem in Authorization server. So, I ...
1
vote
0
answers
271
views
Spring OAuth 401 exception
I'm building a Spring Boot application with OAuth 2.0 and OpenID. Application is an API client. When the user opens the app, he is redirected to Authorization URI (that works). After login and ...
0
votes
0
answers
547
views
Access JWT token verification mechanism in spring-boot-starter-oauth2-resource-server project
I have an oauth2 protected spring boot project that's using spring-boot-starter-oauth2-resource-server.
I'm enabling jwt token support via WebSecurityConfigurerAdapter:
protected void configure(...
0
votes
1
answer
291
views
How can I write intetgration tests Spring Web Client(Spring MVC) with Oauth2 when using Credentials Flow
I have an Oauth 2 client that actually interacts with another microservice that acts as an authorization server (auth-server).
I have an endpoint (use spring mvc). It has the annotation
@PreAuthorize(&...
-1
votes
1
answer
499
views
spring security oatuh2: how to validate without authorization server
A question has arised to me when I've tried to use spring-boot-starter-oauth2-resource-server dependency and set up my service as a oauth2 resource service.
I've configured spring oauth2 resource ...
0
votes
1
answer
2k
views
Keycloak return Invalid parameter: redirect_uri
I am trying to run some simple app by using spring boot and keycloak. App running on localhost:80. Here is my pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=...
2
votes
1
answer
620
views
Replace WebSecurityConfigurerAdapter in Spring boot for ResourceServerConfigurerAdapter
Since Spring Boot 2.7.x version WebSecurityConfigurerAdapter class is deprecated and there is a guide from spring.io on how to replace those classes and use component-based security configuration.
My ...
0
votes
0
answers
501
views
Spring boot - After Upgrading Spring 1.5 to 2.5, Many methods are deprecated for OAuth 2.0
After Upgrading Spring 1.5 to 2.5, Many methods are deprecated for OAuth 2.0. I am using the JWT token based authentication.
Deprecated -
import org.springframework.security.oauth2.config.annotation....
1
vote
2
answers
2k
views
Calling spring authorization server OAuth2 REST endpoints
Trying to implement the OAuth2 protocol using Spring Authorization Server. Created a simple application with the following configuration.
@SpringBootApplication
class AuthorizationServerApplication
...
0
votes
1
answer
1k
views
Error occurred while attempting to decode the Jwt.The ID Token contains invalid claims
I am adding oauth into an application(Java based) and I'm running into the following error:
[invalid_id_token] An error occurred while attempting to decode the Jwt: The ID Token contains invalid ...