[BUG] Deserializer of grant type 'on_behalf_of' does not work #23348
Labels
azure-spring
All azure-spring related issues
azure-spring-aad
Spring active directory related issues.
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
Milestone
Describe the bug
Deserializer of grant type 'on_behalf_of' does not work when loading OAuth2AuthorizedClient of OBO client from JacksonHttpSessionOAuth2AuthorizedClientRepository
Exception or Stack Trace
To Reproduce
Steps to reproduce the behavior:
Use Sample Code as in https://github.com/Azure-Samples/azure-spring-boot-samples/tree/main/aad/azure-spring-boot-starter-active-directory/aad-resource-server-obo
The first time we send a request everything works fine, we get an OBO token and the downstream call works fine. However, if the request is excuted a second time, the authorized client is loaded from the session cache and deserialization fails...
Code Snippet
The bug seems to be known, since there is already a comment in the corresponding code:
https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/aad/AADOAuth2AuthorizedClientRepository.java#L59
Expected behavior
If the code from the Azure-Samples is used, there should not be any exceptions...
Loading of an authorized client from session cache should not cause an exception with on-behalf-of flow.
Setup (please complete the following information):
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: