Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Security] Add logout configuration for Clear-Site-Data header #17900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

maxbeckers
Copy link
Contributor

This PR is related to symfony/symfony#49306.

Enhance security by issuing a Clear-Site-Data header on logout.

Add the documentation with code examples to the Security Configuration Reference (SecurityBundle).

@carsonbot carsonbot added this to the 6.3 milestone Feb 13, 2023
@javiereguiluz javiereguiluz added the Waiting Code Merge Docs for features pending to be merged label Feb 13, 2023
@carsonbot carsonbot modified the milestones: 6.3, next Feb 13, 2023
fabpot added a commit to symfony/symfony that referenced this pull request Mar 10, 2023
…a header (maxbeckers)

This PR was merged into the 6.3 branch.

Discussion
----------

[Security] Add logout configuration for Clear-Site-Data header

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #49266
| License       | MIT
| Doc PR        | symfony/symfony-docs#17900

Enhance security by issuing a Clear-Site-Data header on logout.
* [Clear-Site-Data](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Clear-Site-Data#sign_out_of_a_web_site) Documentation
* Example: https://www.w3.org/TR/clear-site-data/#example-signout

Default config is off.

Config example for all:
```yaml
security:
    # ...
    firewalls:
        main:
            # ...
            logout:
                path: app_logout
                clear_site_data:
                    - "*"
```
Instead of all with the ``*`` it's also possible to add a set of  ``cache``, ``cookies``, ``storage``, ``executionContexts``. For example without cookies it will look like this:
```yaml
security:
    # ...
    firewalls:
        main:
            # ...
            logout:
                path: app_logout
                clear_site_data:
                    - cache
                    - storage
                    - executionContexts
```

**TODO**
- [x] Doc PR symfony/symfony-docs#17900

Commits
-------

f9e76c1 [Security] Add logout configuration for Clear-Site-Data header
symfony-splitter pushed a commit to symfony/security-http that referenced this pull request Mar 10, 2023
…a header (maxbeckers)

This PR was merged into the 6.3 branch.

Discussion
----------

[Security] Add logout configuration for Clear-Site-Data header

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #49266
| License       | MIT
| Doc PR        | symfony/symfony-docs#17900

Enhance security by issuing a Clear-Site-Data header on logout.
* [Clear-Site-Data](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Clear-Site-Data#sign_out_of_a_web_site) Documentation
* Example: https://www.w3.org/TR/clear-site-data/#example-signout

Default config is off.

Config example for all:
```yaml
security:
    # ...
    firewalls:
        main:
            # ...
            logout:
                path: app_logout
                clear_site_data:
                    - "*"
```
Instead of all with the ``*`` it's also possible to add a set of  ``cache``, ``cookies``, ``storage``, ``executionContexts``. For example without cookies it will look like this:
```yaml
security:
    # ...
    firewalls:
        main:
            # ...
            logout:
                path: app_logout
                clear_site_data:
                    - cache
                    - storage
                    - executionContexts
```

**TODO**
- [x] Doc PR symfony/symfony-docs#17900

Commits
-------

f9e76c1e47 [Security] Add logout configuration for Clear-Site-Data header
symfony-splitter pushed a commit to symfony/security-bundle that referenced this pull request Mar 10, 2023
…a header (maxbeckers)

This PR was merged into the 6.3 branch.

Discussion
----------

[Security] Add logout configuration for Clear-Site-Data header

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #49266
| License       | MIT
| Doc PR        | symfony/symfony-docs#17900

Enhance security by issuing a Clear-Site-Data header on logout.
* [Clear-Site-Data](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Clear-Site-Data#sign_out_of_a_web_site) Documentation
* Example: https://www.w3.org/TR/clear-site-data/#example-signout

Default config is off.

Config example for all:
```yaml
security:
    # ...
    firewalls:
        main:
            # ...
            logout:
                path: app_logout
                clear_site_data:
                    - "*"
```
Instead of all with the ``*`` it's also possible to add a set of  ``cache``, ``cookies``, ``storage``, ``executionContexts``. For example without cookies it will look like this:
```yaml
security:
    # ...
    firewalls:
        main:
            # ...
            logout:
                path: app_logout
                clear_site_data:
                    - cache
                    - storage
                    - executionContexts
```

**TODO**
- [x] Doc PR symfony/symfony-docs#17900

Commits
-------

f9e76c1e47 [Security] Add logout configuration for Clear-Site-Data header
@maxbeckers
Copy link
Contributor Author

Codemerge has been done.

@OskarStark OskarStark removed the Waiting Code Merge Docs for features pending to be merged label Mar 11, 2023
@maxbeckers maxbeckers force-pushed the firewall_logout_clear_site_data branch from fe7b280 to 6b66970 Compare March 14, 2023 06:10
@maxbeckers
Copy link
Contributor Author

Hi @OskarStark,
do you have any idea, why this build error is comming up? Cannot reproduce that error. Is there anywhere an old dependency during the build run?

@maxbeckers maxbeckers force-pushed the firewall_logout_clear_site_data branch 2 times, most recently from 3ef5d36 to e2d1138 Compare March 14, 2023 07:01
@maxbeckers maxbeckers force-pushed the firewall_logout_clear_site_data branch from e2d1138 to 1ab4d04 Compare March 14, 2023 07:10
@OskarStark
Copy link
Contributor

I don't know, but we can ignore it I guess

@javiereguiluz javiereguiluz modified the milestones: next, 6.3 Mar 22, 2023
@javiereguiluz javiereguiluz merged commit 26d61e1 into symfony:6.3 Mar 22, 2023
@javiereguiluz
Copy link
Member

Max, what a great first contribution to Symfony Docs! Thanks and congrats 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants