-
Notifications
You must be signed in to change notification settings - Fork 457
Azure Active Directory Stateless implementation #661
Comments
You're right thats exactly what I need thanks |
Its almost one year old post here. Is the stateless implementation of Azure AD spring boot starter released as maven repository yet ? |
@cybersuv |
When? What version? How would people following this issue ever have known that without noticing how old it is and trying to bump the conversation? |
Good to know this. But, why I am still receiving the below error ?
Is there any specific type of app registration needed to support stateless implementation ? My use case is as below. I have a react front end application which is acquiring token from Azure AD using react-adal library and I want my back-end micro-services (written in Java, spring-boot) to acknowledge/validate the same token passed in Authorization header as Bearer. Further detail : Spring Boot Version : 2.2.4
|
In your case both stateful and stateless filters could be used. But the configurations you listed are for OAuth 2 login which is not suitable for your case. If you want to use users' groups (will send requests to Microsoft Graph) to do authorization, please refer to this sample. Otherwise, this is the sample leverages |
Using the second sample link, I updated my code. But, getting following error.
|
Hi @afrancoc2000 , Can you please help me understand the solution here? I am in the exact same situation as you were. After login all the requests are passing with JSESSIONID and the token received from How can I make use of the token and not the JSESSIONID. I am fairly new with Spring Security and is having difficulty finding it on my own. |
Hi, @sanalsfingent Thanks for reaching out. Could you please try this sample (aad-resource-server)? If the sample cannot satisfy your requirement, could you please create a new issue in azure-sdk-for-java repo? |
Hi @chenrujun Need a help here with stateless implementation. The current example for stateless implementation works with oauth2 implicit grant which is no longer recommended according to the docs. With the current version, Is it possible to use the stateless feature with authorization code flow or any way to work around it? Thanks. |
HI, @moarychan , As mentioned in the scrum meeting by @saragluna , could you please help about this? |
@sm0217 , since this issue had been closed for a long time, could you help open a new issue in this repo azure-sdk-for-java to tell us your detailed scenario? |
Environment
Spring boot starter:
OS Type: Windows
Java version:
Summary
I'm successfuly authenticating using this example, but The authentication is associated to a JSESSIONID , and I have a microservices aproach and would like it to be stateless. Do you have an example of this kind of authentication? so instead of sending a cookie with the JSESSIONID you could send the JWT? or it needs to be manually handled?
Reproduce steps
This is my app code:
SecurityConfig Class
Application.properties:
A Controller:
Expected Results
I would like to get a cookie with the JWT in the front end
Actual Results
I'm getting a cookie with the JSESSIONID, I found these articles with stateless implementations: example 1 and example 2 but both are custom implementations. So I was wondering if the library created for Azure AD had this problem already resolved.
Also something weird happens to me, only GET requests are successfully authenticated POST requests returned a 403 error before I disabled the csrf token and now return a 500 error with a AuthenticationCredentialsNotFoundException: "An Authentication object was not found in the SecurityContext"
Thanks!
The text was updated successfully, but these errors were encountered: