Skip to content

Conversation

@pathec
Copy link
Contributor

@pathec pathec commented Jan 5, 2026

No description provided.

@pathec pathec requested a review from a team as a code owner January 5, 2026 07:21
@pathec pathec mentioned this pull request Jan 5, 2026
Copy link
Contributor

@YellowFlora YellowFlora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! That is really a problem, for Authentication Provider who enforce the OIDC specification and don't allow other accept headers.

Our tests also uses the JSON as response type and never checked for the correct ACCEPT header.

Could you add a check for the ACCEPT header into the Wiremock stub configuration for the token Endpoint in the different OidcClientTest classes? (package: sda-commons-client-jersey/src/test/java/org/sdase/commons/client/jersey/oidc/)

for example in OidcClientTest itself:

    WIRE.stubFor(
        post("/token")
            .withHeader(ACCEPT, equalTo(APPLICATION_FORM_URLENCODED + "," + APPLICATION_JSON)) //or similar check 
            .willReturn(
                aResponse()
                    .withStatus(200)
                    .withHeader(CONTENT_TYPE, APPLICATION_JSON)
                    .withBodyFile("fixtures/tokenResponse.json")));

so that it is checked, that now both headers are always send to the Authorization Provider?

@pathec pathec force-pushed the feat/issuer-accept-header branch 3 times, most recently from 51740a4 to eaf9f4a Compare January 5, 2026 12:14
@pathec
Copy link
Contributor Author

pathec commented Jan 5, 2026

@YellowFlora thanks for the review. Please have a look again

Copy link
Contributor

@YellowFlora YellowFlora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Its only missing in OidcRequestFilterTest; the stub configuration is at the bottom there

@pathec pathec force-pushed the feat/issuer-accept-header branch from eaf9f4a to 4b73a01 Compare January 5, 2026 15:19
Copy link
Contributor

@YellowFlora YellowFlora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

(i will check sonar tmr morning, not sure yet why it doesnt work)

@pathec
Copy link
Contributor Author

pathec commented Jan 7, 2026

Hi @YellowFlora have you already looked into the sonar issue?

@YellowFlora
Copy link
Contributor

YellowFlora commented Jan 7, 2026

Hi @pathec we downgraded Sonar now, so it should work now

@YellowFlora YellowFlora force-pushed the feat/issuer-accept-header branch from 4b73a01 to ced5dc2 Compare January 7, 2026 07:47
@YellowFlora YellowFlora merged commit 36e0970 into SDA-SE:main Jan 7, 2026
18 checks passed
@SDABot
Copy link
Contributor

SDABot commented Jan 7, 2026

🎉 This PR is included in version 8.1.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@SDABot SDABot added the released label Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants