department-of-veterans-affairs / next-build

Front-end templating, build, and deploy for VA.gov CMS content.
Creative Commons Zero v1.0 Universal
9 stars 5 forks source link

Next Build Reverse Proxy Empty bucket testing for dev #740

Closed mreed101 closed 2 months ago

mreed101 commented 2 months ago

Description

The goal of this ticket is to properly test changes to the reverse proxy via our test plan. When testing a thread should be started in the #accelerated-publishing slack channel to keep the team updated with passing or failing test. All findings should be recorded with this ticket.

Acceptance Criteria

mreed101 commented 2 months ago
  1. X-ap-debug-message properly returns Processed by @content location. Passed
  2. 400 error displays via openresty. Passed
  3. Having a discussion about the test
  4. 404 page displayed. Passed
  5. 405 Method not allowed. Passed
  6. N/A as next-build is not active during empty bucket check
  7. X-ap-debug-message properly returns Processed by @content location. Passed
  8. Content build content confirmed in staging and prod. Passed
  9. Pages returned with proper header messaging. Passed

Image Image

mreed101 commented 2 months ago

Update around 403 testing

Originally the testing around 403 required that we test https://www.va.gov/va_404.html to return as a 403 forbidden page via openresty. During testing we discovered that va_404.html is not a real page. It is only being created via the reverse proxy and is forcing an error via an internal directive. The route does not appear to be used anywhere inside of our VA repositories https://github.com/search?q=org%3Adepartment-of-veterans-affairs%20va_404&type=code When hitting our s3 bucket it will always return a 403 but there is logic inside of the reverse proxy that converts this 403 into a 404 error. We could modify our bucket policy to return 404s but that is not the configuration that we would use in production so we have opted not to make this change. In conclusion there is not a proper way for us to test that a 403 error has been returned as 403s from our s3 bucket will be converted into 404s.