Skip to content

Conversation

@ydiarra
Copy link

@ydiarra ydiarra commented Dec 16, 2025

Previously, OIDC session cookies always included Secure flags, causing authentication to fail in local development over HTTP.

This change conditionally adds these security flags only when the request is made over a secure connection, enabling local HTTP development while maintaining security in production.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

yannisdia added 3 commits December 15, 2025 18:19
Previously, OIDC session cookies always included HttpOnly and Secure
flags, causing authentication to fail in local development over HTTP.

This change conditionally adds these security flags only when the
request is made over a secure connection, enabling local HTTP
development while maintaining security in production.
This change modifies several test cases in `test_oidc.py` to include the `isSecure` attribute in the mocked request objects. This ensures that the tests accurately simulate secure requests, which is essential for validating the behavior of OIDC session cookies under secure conditions.
…urity

This update introduces two new test cases in `test_oidc.py` to verify that OIDC session cookies are set with the appropriate HttpOnly and Secure flags depending on whether the request is secure or not. The tests ensure that cookies are configured correctly for both secure and non-secure requests, enhancing the validation of cookie security in the OIDC flow.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


yannisdia seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ydiarra ydiarra marked this pull request as ready for review December 16, 2025 09:38
@ydiarra ydiarra requested a review from a team as a code owner December 16, 2025 09:38
@moufmouf
Copy link

This closes #19303

moufmouf added a commit to workadventure/workadventure that referenced this pull request Dec 17, 2025
v1.141.0 introduces a breaking change in OIDC authentication in http with Webkit

See issue: element-hq/synapse#19303
See PR: element-hq/synapse#19309
moufmouf added a commit to workadventure/workadventure that referenced this pull request Dec 17, 2025
v1.141.0 introduces a breaking change in OIDC authentication in http with Webkit

See issue: element-hq/synapse#19303
See PR: element-hq/synapse#19309
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants