Skip to content

Conversation

@mgaffigan
Copy link
Contributor

  • Refactor to allow CSRF bypass (optional X-Requested-With header) on endpoints that opt-in with @DontRequireRequestedWith
  • Improve error logging for API authoring on a few sharp edges

In support for future merge of mgaffigan:feature/add-oidc-auth

@mgaffigan
Copy link
Contributor Author

@tonygermano, rewrote history here as well by topic.

@kpalang kpalang requested review from a team, jonbartels, kayyagari, kpalang and tonygermano and removed request for a team September 8, 2025 15:32
Copy link
Contributor

@kpalang kpalang left a comment

Choose a reason for hiding this comment

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

Could you explain why you've chosen to go with static configuration in the class instead of the previous instantiation approach?

@mgaffigan mgaffigan force-pushed the maint/add-server-error branch from c5443b7 to 8620766 Compare October 11, 2025 13:26
@mgaffigan mgaffigan requested a review from kpalang October 11, 2025 14:32
@kpalang kpalang requested a review from a team October 11, 2025 15:27
kpalang
kpalang previously approved these changes Oct 11, 2025
jonbartels
jonbartels previously approved these changes Oct 14, 2025
Copy link
Member

@tonygermano tonygermano left a comment

Choose a reason for hiding this comment

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

I made a few comments and questions. The headers should be addressed. The questions may just need to be answered with no changes if you don't think any are necessary.

I'm assuming that since there are not any methods yet which use the DontRequireRequestedWith annotation that it is not possible for someone to manually test whether it is working as intended or not?

Signed-off-by: Mitch Gaffigan <mitch.gaffigan@comcast.net>
@mgaffigan
Copy link
Contributor Author

@tonygermano, as far as how to test the behavior dynamically:

  1. Test an existing API endpoint without X-Requested-With: foo, observe 400 response
  2. Test an existing API endpoint with X-Requested-With: foo, observe normal response
  3. Add annotation to an endpoint (example use), test without X-Requested-With, observe normal response

@mgaffigan mgaffigan force-pushed the maint/add-server-error branch 2 times, most recently from 9bf0fd5 to dbdadd3 Compare November 27, 2025 00:34
Signed-off-by: Mitch Gaffigan <mitch.gaffigan@comcast.net>
@mgaffigan mgaffigan force-pushed the maint/add-server-error branch from dbdadd3 to b5a5f4d Compare November 27, 2025 00:35
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.

4 participants