Skip to content
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

Add test case for validating WWW-Authorization header when invocating an API with API Keys using invalid Authorization header #13523

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

nisan-abeywickrama
Copy link
Contributor

Purpose

As identified by [1], the WWW-Authorization response header contains null for an API with API-Key enabled. This PR introduces a test case to validate the WWW-Authorization header to validate the presence of the appropriate content.

Implementation

Introduce a new test case which checks if the WWW-Authorization header contains the string "API Key realm=\"WSO2 API Manager\"".

The validation is done under 2 possibilities,

  • Invoking the Api without Authorization header.
  • Invoking the Api with invalid Authorization header.

[1] - wso2/api-manager#3062

Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 14.19%. Comparing base (b36568c) to head (aeeec6b).
Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13523      +/-   ##
============================================
- Coverage     17.83%   14.19%   -3.64%     
+ Complexity      897      668     -229     
============================================
  Files           255      255              
  Lines         11551    11551              
  Branches       1204     1204              
============================================
- Hits           2060     1640     -420     
- Misses         9474     9887     +413     
- Partials         17       24       +7     
Flag Coverage Δ
integration_tests 14.19% <ø> (-3.64%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tgtshanika tgtshanika merged commit 0641b54 into wso2:master Sep 2, 2024
8 of 9 checks passed
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.

2 participants