ging / fiware-idm

OAuth 2.0-based authentication of users and devices, user profile management, Single Sign-On (SSO) and Identity Federation across multiple administration domains.
https://keyrock-fiware.github.io
MIT License
36 stars 80 forks source link

Allow to set form-action for CSP header #272

Closed dwendland closed 2 years ago

dwendland commented 2 years ago

Proposed changes

Modern browsers like Chrome follow the Content-Security-Policy directives. With the current version of helmet this is set to 'self' only: https://github.com/helmetjs/helmet/blob/main/CHANGELOG.md#changed-3 Due to this, the forwarding to callback URLs during authorization is blocked by the browsers, if the host of the callback URL is not specified as form-action in the CSP header.

This change allows to configure the form-action parameter. If nothing is configured, it will still use the default of helmet.

Types of changes

What types of changes does your code introduce to the project: Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

github-actions[bot] commented 2 years ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️

dwendland commented 2 years ago

Also added option to overwrite CSP script-src directive

aalonsog commented 2 years ago

Thanks and apologies for the delay. We are working on this and will merge during next week