Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jul 20, 2023

Backport of #49233 to release/8.0-preview7

/cc @captainsafia

This pull request adds a middleware for validating anti-forgery request tokens to ASP.NET. This change helps us unify the anti-forgery token validation experience in ASP.NET and reduces the burden on users to implement their own token validation layer.

Closes #49237 and #38338

Customer Impact

We shipped support for complex-binding for minimal APIs earlier in preview6. Shipping support for an anti-forgery token validation middleware will make it easier for customers to implement secure form-binding code without have to roll out their own token validation manually. This PR also introduces new API that we would like to get feedback on earlier.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

The changes in this PR have been designed in a fashion as so to not impact existing anti-forgery token validation in MVC. We've also established an API for opting out of the on-by-default anti-forgery token validation in the event that users run into an issue.

Verification

  • Manual (required) (via new samples in repo)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@ghost ghost added the area-runtime label Jul 20, 2023
@captainsafia captainsafia added area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares Servicing-consider Shiproom approval is required for the issue and removed area-runtime labels Jul 20, 2023
@ghost
Copy link

ghost commented Jul 20, 2023

Hi @github-actions[bot]. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.

To learn more about how to prepare a servicing PR click here.

@adityamandaleeka adityamandaleeka added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Jul 20, 2023
@ghost
Copy link

ghost commented Jul 20, 2023

Hi @github-actions[bot]. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.

@wtgodbe wtgodbe merged commit 2067158 into release/8.0-preview7 Jul 20, 2023
@wtgodbe wtgodbe deleted the backport/pr-49233-to-release/8.0-preview7 branch July 20, 2023 16:00
@ghost ghost added this to the 8.0-preview7 milestone Jul 20, 2023
@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants