Skip to content

Add tests for splitAuthScheme and sealed authorization handling#7

Closed
drkaangunduz wants to merge 2 commits intomainfrom
feature/sealed-auth-tests
Closed

Add tests for splitAuthScheme and sealed authorization handling#7
drkaangunduz wants to merge 2 commits intomainfrom
feature/sealed-auth-tests

Conversation

@drkaangunduz
Copy link
Copy Markdown
Collaborator

Summary

  • Add test coverage for splitAuthScheme helper and sealed authorization header handling in the proxy

Test plan

  • Tests included in this PR

Made with Cursor

- Introduced `TestSplitAuthScheme` to validate the behavior of the `splitAuthScheme` function, ensuring it correctly separates known auth scheme prefixes from their ciphertexts.
- Added `TestProxy_SealedBearerPrefixStripped` to verify that the proxy correctly handles sealed authorization headers, ensuring the Bearer prefix is retained after decryption.
- Updated `processSealedHeaders` to utilize `splitAuthScheme` for improved handling of sealed headers.
- Introduced `TestEngine_GlobTrailingWildcardWithMidPathWildcard` to validate the behavior of glob patterns that include both trailing and mid-path wildcards.
- Enhanced the `MatchGlob` function to correctly handle mid-path wildcards by promoting trailing wildcards to multi-segment matching.
- Added test cases to ensure expected behavior for various path inputs against defined rules.
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.

1 participant