Skip to content

v5.3.0-rc5: Merging to release-5.3.0: [TT-11405] Updating JSON tags and field nam…

Pre-release
Pre-release
Compare
Choose a tag to compare
@nerdydread nerdydread released this 04 Mar 17:06
· 14 commits to release-5.3.0 since this release
9f08de5
…es for TLS max and min versions (#6078) (#6083)

## **User description**
[TT-11405] Updating JSON tags and field names for TLS max and min
versions (#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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </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:/TykTechnologies/tyk/pull/6078/files#diff-fe44f09c4d5977b5f5eaea29170b6a0748819c9d02271746a20d81a5f3efca17">+4/-4</a>&nbsp;
&nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
<summary><strong>dashboard_register.go</strong><dd><code>Align TLS
version configuration references</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </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:/TykTechnologies/tyk/pull/6078/files#diff-f504c88b3d2fa3b56b74c252aab41a934156879ef1150d33714225749e6cc94c">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
<summary><strong>proxy_muxer.go</strong><dd><code>Update TLS version
configuration in proxy muxer</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </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:/TykTechnologies/tyk/pull/6078/files#diff-89fb6731880400cb95ba8860c935a308de5f55aaa41aa2c76abf3ee4773d7a87">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
<summary><strong>rpc_storage_handler.go</strong><dd><code>Update RPC
storage handler TLS version configuration</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </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:/TykTechnologies/tyk/pull/6078/files#diff-8875f75b602664c44b62b67a4da41d748124ad270573a44db4ec977ee5d68021">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
<summary><strong>server.go</strong><dd><code>Enforce TLS version
consistency and update defaults</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </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:/TykTechnologies/tyk/pull/6078/files#diff-4652d1bf175a0be8f5e61ef7177c9666f23e077d8626b73ac9d13358fa8b525b">+4/-4</a>&nbsp;
&nbsp; &nbsp; </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


___

## **Type**
enhancement


___

## **Description**
- Renamed JSON tags and field names for TLS max and min versions to
`TLSMaxVersion` and `TLSMinVersion` respectively.
- Updated all references in the codebase to match the new field names.


___



## **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 JSON tags and field
names for TLS versions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

config/config.go
<li>Renamed <code>MaxVersion</code> to <code>TLSMaxVersion</code>.<br>
<li> Renamed <code>MinVersion</code> to <code>TLSMinVersion</code>.


</details>
    

  </td>
<td><a
href="https:/TykTechnologies/tyk/pull/6083/files#diff-fe44f09c4d5977b5f5eaea29170b6a0748819c9d02271746a20d81a5f3efca17">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
<summary><strong>connection_handler.go</strong><dd><code>Adapt TLS
version field references in connection handler</code>&nbsp;
</dd></summary>
<hr>

storage/connection_handler.go
<li>Updated references from <code>MaxVersion</code> to
<code>TLSMaxVersion</code>.<br> <li> Updated references from
<code>MinVersion</code> to <code>TLSMinVersion</code>.


</details>
    

  </td>
<td><a
href="https:/TykTechnologies/tyk/pull/6083/files#diff-72363b0f8dc68eaf5cbf796451f0363df87931fc33077d8c1f1e7f0a2def928f">+2/-2</a>&nbsp;
&nbsp; &nbsp; </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

Co-authored-by: Matias <matipvp02@gmail.com>