[QUERY] How to use AadAuthenticationFilter with spring-cloud-azure-starter-active-directory #43749
Labels
azure-spring
All azure-spring related issues
Client
This issue points to a problem in the data-plane of the library.
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
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Query/Question
I am trying to use AadAuthenticationFilter since I am trying to do a custom SecurityFilterChain with two possible ways of authentication.
Under the path /aad/*** the user will be authenticated using the AadAuthenticationFilter
Under the path /jwt/*** the user will be authenticated using a custom JWT filter
My current implementation looks like this:
With it I am getting the following Error:
[Failed to initialize UserPrincipal.] with root cause com.nimbusds.jose.proc.BadJOSEException: Signed JWT rejected: Another algorithm expected, or no matching key(s) found
I am using the current version of
spring-cloud-azure-starter-active-directory
: 5.19.0Spring boot version is: 3.3.4
Packages I use:
Configuration:
spring.cloud.azure.active-directory.enabled=true
spring.cloud.azure.active-directory.session-stateless=false
spring.cloud.azure.active-directory.credential.client-id=${TM_APS_AD_CLIENT_ID}
spring.cloud.azure.active-directory.credential.client-secret=${TM_APS_AD_CLIENT_SECRET}
spring.cloud.azure.active-directory.profile.tenant-id=${TM_APS_AD_TENANT_ID}
spring.cloud.azure.active-directory.app-id-uri=api://...../default/use.basic
spring.cloud.azure.active-directory.authorization-clients.graph.scopes[0]=https://graph.microsoft.com/User.Read
Why is this not a Bug or a feature Request?
Because I need guidance with how to use / configure certain parts of the software.
Setup (please complete the following information if applicable):
com.azure.spring:spring-cloud-azure-starter-active-directory:5.19.0
org.springframework.boot:spring-boot-starter-web:3.3.4
More detailed stacktrace of Error I am getting:
The text was updated successfully, but these errors were encountered: