tyk
tyk copied to clipboard
TT-8317 Add KeyID to Protobuf
User description
Description
Added the keyID to the session state protobuf so that it can be available to gRPC plugins
Related Issue
https://tyktech.atlassian.net/browse/TT-8317
Motivation and Context
How This Has Been Tested
Wrote a gRPC plugin that printed the keyID to stdout.
Screenshots (if appropriate)
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality)
Checklist
- [ ] I ensured that the documentation is up to date
- [ ] I explained why this PR updates go.mod in detail with reasoning why it's required
- [ ] I would like a code coverage CI quality gate exception and have explained why
PR Type
Enhancement
Description
- Added a new
KeyId
field to theSessionState
struct in the Go codebase, allowing it to store the ID of the key used for API access. - Implemented the
GetKeyId
method to retrieve theKeyId
from aSessionState
instance. - Updated the
ProtoSessionState
function to include theKeyId
field when converting session states. - Modified the Protocol Buffers definition to include a
key_id
field in theSessionState
message, ensuring compatibility with gRPC plugins.
Changes walkthrough 📝
Relevant files | |||||||
---|---|---|---|---|---|---|---|
Enhancement |
|
💡 PR-Agent usage: Comment
/help
on the PR to get a list of all available PR-Agent tools and their descriptions