Skip to content

Commit

Permalink
Merging to release-5.5.0: [DX-1599] Update ports_whitelist config doc…
Browse files Browse the repository at this point in the history
…umentation (#6454)

[DX-1599] Update ports_whitelist config documentation (#6454)

### **User description**
<!-- Provide a general summary of your changes in the Title above -->

## Description

Update `ports_whitelist` based on customer feedback reported by
@davegarvey. For further details please refer to the ticket below.

[DX-1599](https://tyktech.atlassian.net/browse/DX-1599)

This PR updates the description as follows:

```
    // Defines the ports that will be available for the API services to bind to in the format 
    // documented here https://tyk.io/docs/key-concepts/tcp-proxy/#allowing-specific-ports.
    // Ports can be configured per protocol, e.g. https, tls etc.
    // If configuring via environment variable `TYK_GW_PORTWHITELIST` then remember to escape
    // JSON strings.
```

## Related Issue

<!-- 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: -->

- [x] 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. -->

- [x] 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


[DX-1599]:
https://tyktech.atlassian.net/browse/DX-1599?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ


___

### **PR Type**
Documentation


___

### **Description**
- Updated the documentation for the `ports_whitelist` configuration in
`config/config.go`.
- Added details on configuring ports per protocol (e.g., https, tls).
- Included a note on escaping JSON strings when configuring via the
`TYK_GW_PORTWHITELIST` environment variable.
- Provided a reference link to the relevant documentation on Tyk's
website.


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Documentation</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>config.go</strong><dd><code>Update `ports_whitelist`
configuration documentation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

config/config.go

<li>Updated the documentation for <code>ports_whitelist</code>
configuration.<br> <li> Added details on configuring ports per
protocol.<br> <li> Included a note on escaping JSON strings when using
environment <br>variables.<br> <li> Provided a reference link to the
relevant documentation.<br>


</details>


  </td>
<td><a
href="https://github.com/TykTechnologies/tyk/pull/6454/files#diff-fe44f09c4d5977b5f5eaea29170b6a0748819c9d02271746a20d81a5f3efca17">+5/-3</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: Simon Pears <[email protected]>
  • Loading branch information
buger and Simon Pears authored Aug 12, 2024
1 parent 6fc5069 commit b8f10fb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,11 @@ type Config struct {
// A policy can be defined in a file (Open Source installations) or from the same database as the Dashboard.
Policies PoliciesConfig `json:"policies"`

// Defines the ports that will be available for the API services to bind to in the following format: `"{“":“”}"`. Remember to escape JSON strings.
// This is a map of protocol to PortWhiteList. This allows per protocol
// configurations.
// Defines the ports that will be available for the API services to bind to in the format
// documented here https://tyk.io/docs/key-concepts/tcp-proxy/#allowing-specific-ports.
// Ports can be configured per protocol, e.g. https, tls etc.
// If configuring via environment variable `TYK_GW_PORTWHITELIST` then remember to escape
// JSON strings.
PortWhiteList PortsWhiteList `json:"ports_whitelist"`

// Disable port whilisting, essentially allowing you to use any port for your API.
Expand Down

0 comments on commit b8f10fb

Please sign in to comment.