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

[TT-11405] Updating JSON tags and field names for TLS max and min versions #6078

Merged
merged 3 commits into from
Feb 29, 2024

Conversation

mativm02
Copy link
Contributor

@mativm02 mativm02 commented Feb 27, 2024

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

  • 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

  • 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

Relevant files
Enhancement
config.go
Update TLS version field names and JSON tags                         

config/config.go

  • Updated JSON tags for MaxVersion and MinVersion to tls_max_version and
    tls_min_version respectively in StorageOptionsConf.
  • Renamed fields MinVersion and MaxVersion to TLSMinVersion and
    TLSMaxVersion in HttpServerOptionsConfig.
  • +4/-4     
    dashboard_register.go
    Align TLS version configuration references                             

    gateway/dashboard_register.go

  • Updated references from MinVersion and MaxVersion to TLSMinVersion and
    TLSMaxVersion in the TLS configuration.
  • +2/-2     
    proxy_muxer.go
    Update TLS version configuration in proxy muxer                   

    gateway/proxy_muxer.go

  • Adjusted TLS configuration to use the new TLSMinVersion and
    TLSMaxVersion fields.
  • +2/-2     
    rpc_storage_handler.go
    Update RPC storage handler TLS version configuration         

    gateway/rpc_storage_handler.go

  • Updated RPC configuration to use TLSMinVersion and TLSMaxVersion for
    SSL version control.
  • +2/-2     
    server.go
    Enforce TLS version consistency and update defaults           

    gateway/server.go

  • Ensured TLS version consistency and updated the default TLS max
    version to VersionTLS12.
  • Updated checks and assignments to use TLSMinVersion and TLSMaxVersion.
  • +4/-4     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link
    Contributor

    github-actions bot commented Feb 27, 2024

    API Changes

    --- prev.txt	2024-02-29 12:47:34.840436876 +0000
    +++ current.txt	2024-02-29 12:47:32.180442937 +0000
    @@ -5752,11 +5752,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)

    Copy link
    Contributor

    PR Description updated to latest commit (01b2fad)

    Copy link
    Contributor

    PR Review

    ⏱️ Estimated effort to review [1-5]

    2, because the changes are straightforward and localized to specific fields and their usage across multiple files. The main focus is on renaming and ensuring consistency in TLS version configuration.

    🧪 Relevant tests

    No

    🔍 Possible issues

    Inconsistency in JSON tag renaming for MinVersion and MaxVersion in config/config.go. The JSON tags were changed to tls_min_version and tls_max_version, but the corresponding changes were not made in HttpServerOptionsConfig, leading to potential confusion and misconfiguration.

    Potential issue with default TLS version setting logic in gateway/server.go. If the configuration does not specify TLS versions, it defaults to TLS 1.2, which might not be the intended default behavior, especially considering TLS 1.3 is now widely supported and recommended.

    🔒 Security concerns

    No

    Code feedback:
    relevant fileconfig/config.go
    suggestion      

    Consider maintaining consistency in JSON tag names for TLS version fields across different structs. If renaming MinVersion and MaxVersion to include a tls_ prefix in one struct, ensure all related structs are updated accordingly to avoid confusion. [important]

    relevant lineMaxVersion string `json:"tls_max_version"`

    relevant fileconfig/config.go
    suggestion      

    Update the JSON tags for TLSMinVersion and TLSMaxVersion in HttpServerOptionsConfig to match the new naming convention (tls_min_version and tls_max_version) for consistency and clarity. [important]

    relevant lineTLSMinVersion uint16 `json:"min_version"`

    relevant filegateway/server.go
    suggestion      

    Reevaluate the default TLS version setting logic. Consider setting TLS 1.3 as the default maximum version if none is specified, aligning with current best practices for security. [medium]

    relevant lineif gwConfig.HttpServerOptions.TLSMaxVersion == 0 {

    relevant filegateway/server.go
    suggestion      

    Ensure that the logic for setting the minimum and maximum TLS versions does not inadvertently downgrade the TLS version. Add checks or documentation to guide configuration towards secure defaults. [medium]

    relevant lineif gwConfig.HttpServerOptions.TLSMinVersion > gwConfig.HttpServerOptions.TLSMaxVersion {


    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
    When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:

    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    

    With a configuration file, use the following template:

    [pr_reviewer]
    some_config1=...
    some_config2=...
    
    Utilizing extra instructions

    The review tool can be configured with extra instructions, which can be used to guide the model to a feedback tailored to the needs of your project.

    Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify the relevant sub-tool, and the relevant aspects of the PR that you want to emphasize.

    Examples for extra instructions:

    [pr_reviewer] # /review #
    extra_instructions="""
    In the 'possible issues' section, emphasize the following:
    - Does the code logic cover relevant edge cases?
    - Is the code logic clear and easy to understand?
    - Is the code logic efficient?
    ...
    """
    

    Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable.

    How to enable\disable automation
    • When you first install PR-Agent app, the default mode for the review tool is:
    pr_commands = ["/review", ...]
    

    meaning the review tool will run automatically on every PR, with the default configuration.
    Edit this field to enable/disable the tool, or to change the used configurations

    Auto-labels

    The review tool can auto-generate two specific types of labels for a PR:

    • a possible security issue label, that detects possible security issues (enable_review_labels_security flag)
    • a Review effort [1-5]: x label, where x is the estimated effort to review the PR (enable_review_labels_effort flag)
    Extra sub-tools

    The review tool provides a collection of possible feedbacks about a PR.
    It is recommended to review the possible options, and choose the ones relevant for your use case.
    Some of the feature that are disabled by default are quite useful, and should be considered for enabling. For example:
    require_score_review, require_soc2_ticket, and more.

    Auto-approve PRs

    By invoking:

    /review auto_approve
    

    The tool will automatically approve the PR, and add a comment with the approval.

    To ensure safety, the auto-approval feature is disabled by default. To enable auto-approval, you need to actively set in a pre-defined configuration file the following:

    [pr_reviewer]
    enable_auto_approval = true
    

    (this specific flag cannot be set with a command line argument, only in the configuration file, committed to the repository)

    You can also enable auto-approval only if the PR meets certain requirements, such as that the estimated_review_effort is equal or below a certain threshold, by adjusting the flag:

    [pr_reviewer]
    maximal_review_effort = 5
    
    More PR-Agent commands

    To invoke the PR-Agent, add a comment using one of the following commands:

    • /review: Request a review of your Pull Request.
    • /describe: Update the PR title and description based on the contents of the PR.
    • /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
    • /ask <QUESTION>: Ask a question about the PR.
    • /update_changelog: Update the changelog based on the PR's contents.
    • /add_docs 💎: Generate docstring for new components introduced in the PR.
    • /generate_labels 💎: Generate labels for the PR based on the PR's contents.
    • /analyze 💎: Automatically analyzes the PR, and presents changes walkthrough for each component.

    See the tools guide for more details.
    To list the possible configuration parameters, add a /config comment.

    See the review usage page for a comprehensive guide on using this tool.

    Copy link
    Contributor

    github-actions bot commented Feb 27, 2024

    PR Code Suggestions

    Suggestions                                                                                                                                                     
    enhancement
    Add validation for TLS version fields to ensure they are within supported options.

    Consider adding validation for MaxVersion and MinVersion to ensure they are within the
    supported options ["1.0", "1.1", "1.2", "1.3"].

    config/config.go [157-161]

    -MaxVersion string `json:"tls_max_version"`
    -MinVersion string `json:"tls_min_version"`
    +// Example validation function (to be adjusted and placed appropriately)
    +func validateTLSVersion(version string) bool {
    +    switch version {
    +    case "1.0", "1.1", "1.2", "1.3":
    +        return true
    +    default:
    +        return false
    +    }
    +}
     
    security
    Set sensible defaults for TLS version configurations to avoid insecure setups.

    Ensure that TLSMinVersion and TLSMaxVersion are set to sensible defaults if not
    configured, to avoid insecure configurations.

    gateway/dashboard_register.go [80-81]

    -MinVersion:         gw.GetConfig().HttpServerOptions.TLSMinVersion,
    -MaxVersion:         gw.GetConfig().HttpServerOptions.TLSMaxVersion,
    +// Example default setting (to be adjusted and placed appropriately)
    +tlsMinVersion := gw.GetConfig().HttpServerOptions.TLSMinVersion
    +if tlsMinVersion == 0 {
    +    tlsMinVersion = tls.VersionTLS12 // Set to a sensible default
    +}
    +tlsMaxVersion := gw.GetConfig().HttpServerOptions.TLSMaxVersion
    +if tlsMaxVersion == 0 {
    +    tlsMaxVersion = tls.VersionTLS13 // Set to a sensible default
    +}
     
    Validate TLS version settings for RPC storage handler to prevent invalid configurations.

    Validate SSLMinVersion and SSLMaxVersion to ensure they are within acceptable ranges
    before using them in the rpcConfig.

    gateway/rpc_storage_handler.go [129-130]

    -SSLMinVersion:         r.Gw.GetConfig().HttpServerOptions.TLSMinVersion,
    -SSLMaxVersion:         r.Gw.GetConfig().HttpServerOptions.TLSMaxVersion,
    +// Example validation (to be adjusted and placed appropriately)
    +if !isValidTLSVersion(r.Gw.GetConfig().HttpServerOptions.TLSMinVersion) || !isValidTLSVersion(r.Gw.GetConfig().HttpServerOptions.TLSMaxVersion) {
    +    log.Error("Invalid TLS version configuration for RPC storage handler.")
    +    // Handle error appropriately
    +}
     
    maintainability
    Simplify the logic for setting default TLSMaxVersion to improve code readability.

    Refactor the conditional logic for setting TLSMaxVersion to reduce redundancy and improve
    readability.

    gateway/server.go [1311-1317]

    -if gwConfig.HttpServerOptions.TLSMaxVersion == 0 {
    -    gwConfig.HttpServerOptions.TLSMaxVersion = tls.VersionTLS12
    -}
    -if gwConfig.HttpServerOptions.TLSMinVersion > gwConfig.HttpServerOptions.TLSMaxVersion {
    -    gwConfig.HttpServerOptions.TLSMaxVersion = gwConfig.HttpServerOptions.TLSMinVersion
    +// Simplified version
    +if gwConfig.HttpServerOptions.TLSMaxVersion == 0 || gwConfig.HttpServerOptions.TLSMinVersion > gwConfig.HttpServerOptions.TLSMaxVersion {
    +    gwConfig.HttpServerOptions.TLSMaxVersion = max(tls.VersionTLS12, gwConfig.HttpServerOptions.TLSMinVersion)
     }
     
    possible issue
    Log a warning if TLSMinVersion is greater than TLSMaxVersion to highlight potential misconfigurations.

    Consider logging a warning or error if TLSMinVersion is greater than TLSMaxVersion to
    alert about potential misconfiguration.

    gateway/proxy_muxer.go [526-527]

    -MinVersion:         httpServerOptions.TLSMinVersion,
    -MaxVersion:         httpServerOptions.TLSMaxVersion,
    +// Example logging (to be adjusted and placed appropriately)
    +if httpServerOptions.TLSMinVersion > httpServerOptions.TLSMaxVersion {
    +    log.Warn("TLSMinVersion is greater than TLSMaxVersion, which may lead to misconfiguration.")
    +}
     

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.
    When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:

    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    

    With a configuration file, use the following template:

    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    
    Enabling\disabling automation

    When you first install the app, the default mode for the improve tool is:

    pr_commands = ["/improve --pr_code_suggestions.summarize=true", ...]
    

    meaning the improve tool will run automatically on every PR, with summarization enabled. Delete this line to disable the tool from running automatically.

    Utilizing extra instructions

    Extra instructions are very important for the improve tool, since they enable to guide the model to suggestions that are more relevant to the specific needs of the project.

    Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify relevant aspects that you want the model to focus on.

    Examples for extra instructions:

    [pr_code_suggestions] # /improve #
    extra_instructions="""
    Emphasize the following aspects:
    - Does the code logic cover relevant edge cases?
    - Is the code logic clear and easy to understand?
    - Is the code logic efficient?
    ...
    """
    

    Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable.

    A note on code suggestions quality
    • While the current AI for code is getting better and better (GPT-4), it's not flawless. Not all the suggestions will be perfect, and a user should not accept all of them automatically.
    • Suggestions are not meant to be simplistic. Instead, they aim to give deep feedback and raise questions, ideas and thoughts to the user, who can then use his judgment, experience, and understanding of the code base.
    • Recommended to use the 'extra_instructions' field to guide the model to suggestions that are more relevant to the specific needs of the project, or use the custom suggestions 💎 tool
    • With large PRs, best quality will be obtained by using 'improve --extended' mode.
    More PR-Agent commands

    To invoke the PR-Agent, add a comment using one of the following commands:

    • /review: Request a review of your Pull Request.
    • /describe: Update the PR title and description based on the contents of the PR.
    • /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
    • /ask <QUESTION>: Ask a question about the PR.
    • /update_changelog: Update the changelog based on the PR's contents.
    • /add_docs 💎: Generate docstring for new components introduced in the PR.
    • /generate_labels 💎: Generate labels for the PR based on the PR's contents.
    • /analyze 💎: Automatically analyzes the PR, and presents changes walkthrough for each component.

    See the tools guide for more details.
    To list the possible configuration parameters, add a /config comment.

    See the improve usage page for a more comprehensive guide on using this tool.

    config/config.go Outdated Show resolved Hide resolved
    config/config.go Outdated Show resolved Hide resolved
    config/config.go Outdated Show resolved Hide resolved
    @buger
    Copy link
    Member

    buger commented Feb 27, 2024

    API tests result - mongo44-sha256 env: success
    Branch used: refs/heads/master
    Commit: 6dac26d [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

    • 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

    • 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

    Relevant files
    Enhancement
    config.go
    Update TLS version field names and JSON tags                         

    config/config.go

  • Updated JSON tags for MaxVersion and MinVersion to tls_max_version and
    tls_min_version respectively in StorageOptionsConf.
  • Renamed fields MinVersion and MaxVersion to TLSMinVersion and
    TLSMaxVersion in HttpServerOptionsConfig.
  • +4/-4     
    dashboard_register.go
    Align TLS version configuration references                             

    gateway/dashboard_register.go

  • Updated references from MinVersion and MaxVersion to TLSMinVersion and
    TLSMaxVersion in the TLS configuration.
  • +2/-2     
    proxy_muxer.go
    Update TLS version configuration in proxy muxer                   

    gateway/proxy_muxer.go

  • Adjusted TLS configuration to use the new TLSMinVersion and
    TLSMaxVersion fields.
  • +2/-2     
    rpc_storage_handler.go
    Update RPC storage handler TLS version configuration         

    gateway/rpc_storage_handler.go

  • Updated RPC configuration to use TLSMinVersion and TLSMaxVersion for
    SSL version control.
  • +2/-2     
    server.go
    Enforce TLS version consistency and update defaults           

    gateway/server.go

  • Ensured TLS version consistency and updated the default TLS max
    version to VersionTLS12.
  • Updated checks and assignments to use TLSMinVersion and TLSMaxVersion.
  • +4/-4     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools
    and their descriptions
    Triggered by: push (@mativm02)
    Execution page

    @buger
    Copy link
    Member

    buger commented Feb 27, 2024

    API tests result - postgres15-sha256 env: success
    Branch used: refs/heads/master
    Commit: 6dac26d [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

    • 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

    • 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

    Relevant files
    Enhancement
    config.go
    Update TLS version field names and JSON tags                         

    config/config.go

  • Updated JSON tags for MaxVersion and MinVersion to tls_max_version and
    tls_min_version respectively in StorageOptionsConf.
  • Renamed fields MinVersion and MaxVersion to TLSMinVersion and
    TLSMaxVersion in HttpServerOptionsConfig.
  • +4/-4     
    dashboard_register.go
    Align TLS version configuration references                             

    gateway/dashboard_register.go

  • Updated references from MinVersion and MaxVersion to TLSMinVersion and
    TLSMaxVersion in the TLS configuration.
  • +2/-2     
    proxy_muxer.go
    Update TLS version configuration in proxy muxer                   

    gateway/proxy_muxer.go

  • Adjusted TLS configuration to use the new TLSMinVersion and
    TLSMaxVersion fields.
  • +2/-2     
    rpc_storage_handler.go
    Update RPC storage handler TLS version configuration         

    gateway/rpc_storage_handler.go

  • Updated RPC configuration to use TLSMinVersion and TLSMaxVersion for
    SSL version control.
  • +2/-2     
    server.go
    Enforce TLS version consistency and update defaults           

    gateway/server.go

  • Ensured TLS version consistency and updated the default TLS max
    version to VersionTLS12.
  • Updated checks and assignments to use TLSMinVersion and TLSMaxVersion.
  • +4/-4     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools
    and their descriptions
    Triggered by: push (@mativm02)
    Execution page

    @mativm02 mativm02 requested a review from titpetric February 27, 2024 14:20
    Copy link
    Contributor

    @titpetric titpetric left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    LGTM

    Copy link

    @titpetric titpetric changed the title Updating JSON tags and field names for TLS max and min versions [TT-11405] Updating JSON tags and field names for TLS max and min versions Feb 28, 2024
    @mativm02 mativm02 enabled auto-merge (squash) February 29, 2024 12:47
    Copy link
    Contributor

    💥 CI tests failed 🙈

    git-state

    all ok

    Please look at the run or in the Checks tab.

    1 similar comment
    Copy link
    Contributor

    💥 CI tests failed 🙈

    git-state

    all ok

    Please look at the run or in the Checks tab.

    Copy link

    @mativm02 mativm02 merged commit 6dac26d into master Feb 29, 2024
    31 checks passed
    @mativm02 mativm02 deleted the fix/tls-min-max-version branch February 29, 2024 13:41
    @mativm02
    Copy link
    Contributor Author

    /release to release-5.3

    Copy link

    tykbot bot commented Feb 29, 2024

    Working on it! Note that it can take a few minutes.

    @mativm02
    Copy link
    Contributor Author

    /release to release-5.3.0

    tykbot bot pushed a commit that referenced this pull request Feb 29, 2024
    …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>&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://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://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://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://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://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
    
    (cherry picked from commit 6dac26d)
    buger added a commit that referenced this pull request Feb 29, 2024
    … for TLS max and min versions (#6078)
    
    [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://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://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://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://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://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
    Copy link

    tykbot bot commented Feb 29, 2024

    @mativm02 Succesfully merged PR

    Copy link

    tykbot bot commented Feb 29, 2024

    Working on it! Note that it can take a few minutes.

    tykbot bot pushed a commit that referenced this pull request Feb 29, 2024
    …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>&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://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://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://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://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://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
    
    (cherry picked from commit 6dac26d)
    Copy link

    tykbot bot commented Feb 29, 2024

    @mativm02 Seems like there is conflict and it require manual merge.

    mativm02 added a commit that referenced this pull request Feb 29, 2024
    …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://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://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://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://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://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://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://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 <[email protected]>
    @buger
    Copy link
    Member

    buger commented Feb 29, 2024

    API tests result - postgres15-murmur64 env: success
    Branch used: refs/heads/master
    Commit: 6dac26d [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

    • 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

    • 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

    Relevant files
    Enhancement
    config.go
    Update TLS version field names and JSON tags                         

    config/config.go

  • Updated JSON tags for MaxVersion and MinVersion to tls_max_version and
    tls_min_version respectively in StorageOptionsConf.
  • Renamed fields MinVersion and MaxVersion to TLSMinVersion and
    TLSMaxVersion in HttpServerOptionsConfig.
  • +4/-4     
    dashboard_register.go
    Align TLS version configuration references                             

    gateway/dashboard_register.go

  • Updated references from MinVersion and MaxVersion to TLSMinVersion and
    TLSMaxVersion in the TLS configuration.
  • +2/-2     
    proxy_muxer.go
    Update TLS version configuration in proxy muxer                   

    gateway/proxy_muxer.go

  • Adjusted TLS configuration to use the new TLSMinVersion and
    TLSMaxVersion fields.
  • +2/-2     
    rpc_storage_handler.go
    Update RPC storage handler TLS version configuration         

    gateway/rpc_storage_handler.go

  • Updated RPC configuration to use TLSMinVersion and TLSMaxVersion for
    SSL version control.
  • +2/-2     
    server.go
    Enforce TLS version consistency and update defaults           

    gateway/server.go

  • Ensured TLS version consistency and updated the default TLS max
    version to VersionTLS12.
  • Updated checks and assignments to use TLSMinVersion and TLSMaxVersion.
  • +4/-4     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools
    and their descriptions
    Triggered by: push (@mativm02)
    Execution page

    @buger
    Copy link
    Member

    buger commented Feb 29, 2024

    API tests result - mongo44-murmur64 env: success
    Branch used: refs/heads/master
    Commit: 6dac26d [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

    • 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

    • 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

    Relevant files
    Enhancement
    config.go
    Update TLS version field names and JSON tags                         

    config/config.go

  • Updated JSON tags for MaxVersion and MinVersion to tls_max_version and
    tls_min_version respectively in StorageOptionsConf.
  • Renamed fields MinVersion and MaxVersion to TLSMinVersion and
    TLSMaxVersion in HttpServerOptionsConfig.
  • +4/-4     
    dashboard_register.go
    Align TLS version configuration references                             

    gateway/dashboard_register.go

  • Updated references from MinVersion and MaxVersion to TLSMinVersion and
    TLSMaxVersion in the TLS configuration.
  • +2/-2     
    proxy_muxer.go
    Update TLS version configuration in proxy muxer                   

    gateway/proxy_muxer.go

  • Adjusted TLS configuration to use the new TLSMinVersion and
    TLSMaxVersion fields.
  • +2/-2     
    rpc_storage_handler.go
    Update RPC storage handler TLS version configuration         

    gateway/rpc_storage_handler.go

  • Updated RPC configuration to use TLSMinVersion and TLSMaxVersion for
    SSL version control.
  • +2/-2     
    server.go
    Enforce TLS version consistency and update defaults           

    gateway/server.go

  • Ensured TLS version consistency and updated the default TLS max
    version to VersionTLS12.
  • Updated checks and assignments to use TLSMinVersion and TLSMaxVersion.
  • +4/-4     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools
    and their descriptions
    Triggered by: push (@mativm02)
    Execution page

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants