-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Merging to release-5.3.0: [TT-11405] Updating JSON tags and field names for TLS max and min versions (#6078) #6083
Merging to release-5.3.0: [TT-11405] Updating JSON tags and field names for TLS max and min versions (#6078) #6083
Conversation
…sions (#6078) ## **User description** <!-- Provide a general summary of your changes in the Title above --> ## Description Updating JSON tags and field names for TLS max and min versions. https://tyktech.atlassian.net/browse/TT-11405 <!-- Describe your changes in detail --> ## Related Issue https://tyktech.slack.com/archives/C02AS4BP5HN/p1709041100516449 <!-- This project only accepts pull requests related to open issues. --> <!-- If suggesting a new feature or change, please discuss it in an issue first. --> <!-- If fixing a bug, there should be an issue describing it with steps to reproduce. --> <!-- OSS: Please link to the issue here. Tyk: please create/link the JIRA ticket. --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? --> ## How This Has Been Tested <!-- Please describe in detail how you tested your changes --> <!-- Include details of your testing environment, and the tests --> <!-- you ran to see how your change affects other areas of the code, etc. --> <!-- This information is helpful for reviewers and QA. --> ## Screenshots (if appropriate) ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] 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 <!-- Go over all the following points, and put an `x` in all the boxes that apply --> <!-- If there are no documentation updates required, mark the item as checked. --> <!-- Raise up any additional concerns not covered by the 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 ___ ## **Type** enhancement ___ ## **Description** - Updated JSON tags and field names related to TLS version configuration across multiple files to improve clarity and consistency. - Renamed `MinVersion` and `MaxVersion` to `TLSMinVersion` and `TLSMaxVersion` in `HttpServerOptionsConfig` for better readability. - Adjusted references in the TLS configuration setup in various parts of the codebase to align with the new field names. - Ensured TLS version consistency and updated the default TLS max version to `VersionTLS12` in the gateway server configuration. ___ ## **Changes walkthrough** <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>config.go</strong><dd><code>Update TLS version field names and JSON tags</code> </dd></summary> <hr> config/config.go <li>Updated JSON tags for <code>MaxVersion</code> and <code>MinVersion</code> to <code>tls_max_version</code> and <br><code>tls_min_version</code> respectively in <code>StorageOptionsConf</code>.<br> <li> Renamed fields <code>MinVersion</code> and <code>MaxVersion</code> to <code>TLSMinVersion</code> and <br><code>TLSMaxVersion</code> in <code>HttpServerOptionsConfig</code>. </details> </td> <td><a href="https://pull/6078/files#diff-fe44f09c4d5977b5f5eaea29170b6a0748819c9d02271746a20d81a5f3efca17">+4/-4</a> </td> </tr> <tr> <td> <details> <summary><strong>dashboard_register.go</strong><dd><code>Align TLS version configuration references</code> </dd></summary> <hr> gateway/dashboard_register.go <li>Updated references from <code>MinVersion</code> and <code>MaxVersion</code> to <code>TLSMinVersion</code> and <br><code>TLSMaxVersion</code> in the TLS configuration. </details> </td> <td><a href="https://pull/6078/files#diff-f504c88b3d2fa3b56b74c252aab41a934156879ef1150d33714225749e6cc94c">+2/-2</a> </td> </tr> <tr> <td> <details> <summary><strong>proxy_muxer.go</strong><dd><code>Update TLS version configuration in proxy muxer</code> </dd></summary> <hr> gateway/proxy_muxer.go <li>Adjusted TLS configuration to use the new <code>TLSMinVersion</code> and <br><code>TLSMaxVersion</code> fields. </details> </td> <td><a href="https://pull/6078/files#diff-89fb6731880400cb95ba8860c935a308de5f55aaa41aa2c76abf3ee4773d7a87">+2/-2</a> </td> </tr> <tr> <td> <details> <summary><strong>rpc_storage_handler.go</strong><dd><code>Update RPC storage handler TLS version configuration</code> </dd></summary> <hr> gateway/rpc_storage_handler.go <li>Updated RPC configuration to use <code>TLSMinVersion</code> and <code>TLSMaxVersion</code> for <br>SSL version control. </details> </td> <td><a href="https://pull/6078/files#diff-8875f75b602664c44b62b67a4da41d748124ad270573a44db4ec977ee5d68021">+2/-2</a> </td> </tr> <tr> <td> <details> <summary><strong>server.go</strong><dd><code>Enforce TLS version consistency and update defaults</code> </dd></summary> <hr> gateway/server.go <li>Ensured TLS version consistency and updated the default TLS max <br>version to <code>VersionTLS12</code>.<br> <li> Updated checks and assignments to use <code>TLSMinVersion</code> and <code>TLSMaxVersion</code>. </details> </td> <td><a href="https://pull/6078/files#diff-4652d1bf175a0be8f5e61ef7177c9666f23e077d8626b73ac9d13358fa8b525b">+4/-4</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > ✨ **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions (cherry picked from commit 6dac26d)
PR Description updated to latest commit (4d237e1) |
API Changes --- prev.txt 2024-02-29 13:44:59.536410939 +0000
+++ current.txt 2024-02-29 13:44:56.728420631 +0000
@@ -5747,11 +5747,11 @@
// Maximum TLS version that is supported.
// Options: ["1.0", "1.1", "1.2", "1.3"].
// Defaults to "1.3".
- MaxVersion string `json:"max_version"`
+ TLSMaxVersion string `json:"tls_max_version"`
// Minimum TLS version that is supported.
// Options: ["1.0", "1.1", "1.2", "1.3"].
// Defaults to "1.2".
- MinVersion string `json:"min_version"`
+ TLSMinVersion string `json:"tls_min_version"`
}
func (config *StorageOptionsConf) HostAddrs() (addrs []string) |
PR Review
Code feedback:
✨ Review tool usage guide:Overview:
With a configuration file, use the following template:
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
With a configuration file, use the following template:
See the improve usage page for a more comprehensive guide on using this tool. |
Quality Gate passedIssues Measures |
API tests result - postgres15-sha256 env: success ✅ |
API tests result - mongo44-sha256 env: success ✅ |
API tests result - postgres15-murmur64 env: success ✅ |
API tests result - mongo44-murmur64 env: success ✅ |
User description
[TT-11405] Updating JSON tags and field names for TLS max and min versions (#6078)
User description
Description
Updating JSON tags and field names for TLS max and min versions.
https://tyktech.atlassian.net/browse/TT-11405
Related Issue
https://tyktech.slack.com/archives/C02AS4BP5HN/p1709041100516449
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
functionality to change)
coverage to functionality)
Checklist
why it's required
explained why
Type
enhancement
Description
across multiple files to improve clarity and consistency.
MinVersion
andMaxVersion
toTLSMinVersion
andTLSMaxVersion
inHttpServerOptionsConfig
for better readability.the codebase to align with the new field names.
version to
VersionTLS12
in the gateway server configuration.Changes walkthrough
config.go
Update TLS version field names and JSON tags
config/config.go
MaxVersion
andMinVersion
totls_max_version
andtls_min_version
respectively inStorageOptionsConf
.MinVersion
andMaxVersion
toTLSMinVersion
andTLSMaxVersion
inHttpServerOptionsConfig
.dashboard_register.go
Align TLS version configuration references
gateway/dashboard_register.go
MinVersion
andMaxVersion
toTLSMinVersion
andTLSMaxVersion
in the TLS configuration.proxy_muxer.go
Update TLS version configuration in proxy muxer
gateway/proxy_muxer.go
TLSMinVersion
andTLSMaxVersion
fields.rpc_storage_handler.go
Update RPC storage handler TLS version configuration
gateway/rpc_storage_handler.go
TLSMinVersion
andTLSMaxVersion
forSSL version control.
server.go
Enforce TLS version consistency and update defaults
gateway/server.go
version to
VersionTLS12
.TLSMinVersion
andTLSMaxVersion
.Type
enhancement
Description
TLSMaxVersion
andTLSMinVersion
respectively.Changes walkthrough
config.go
Update JSON tags and field names for TLS versions
config/config.go
MaxVersion
toTLSMaxVersion
.MinVersion
toTLSMinVersion
.connection_handler.go
Adapt TLS version field references in connection handler
storage/connection_handler.go
MaxVersion
toTLSMaxVersion
.MinVersion
toTLSMinVersion
.