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

Add documentation for the tsh config file #11531

Merged
merged 1 commit into from
Apr 5, 2022
Merged

Conversation

lxea
Copy link
Contributor

@lxea lxea commented Mar 29, 2022

tsh config file support was added here: #10336

The following syntax is supported

add_headers:
  - proxy: "*.example.com"
    headers:
      foo: bar
  - proxy: us-west-1.example.com
    headers:
      baz: qux

@lxea lxea force-pushed the lxea/tsh-dotfile-doc branch 2 times, most recently from aafdc40 to 020e0be Compare April 1, 2022 08:21
headers: # headers are pairs to include in the http headers
foo: bar # Key/Value to be included in the http request
```

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be great to include an example of when you would use custom HTTP headers in Proxy requests. For example, we could talk about the use case of sending traffic through intermediary proxies that require opaque auth tokens in HTTP headers (https://github.com/gravitational/teleport/pull/9475/files).

Otherwise, users may not know whether this config file is useful for their setup.

Also, are there any values of headers that users should avoid?

Copy link
Contributor Author

@lxea lxea Apr 4, 2022

Choose a reason for hiding this comment

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

Also, are there any values of headers that users should avoid?

I'm not aware of any, there doesnt seem to be anything else modifying headers in the webclient code either, so I think all values should be okay

@lxea lxea force-pushed the lxea/tsh-dotfile-doc branch from 020e0be to 1eae53d Compare April 4, 2022 10:37
Copy link
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

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

lgtm with a couple suggestions.

Copy link
Contributor

@ptgott ptgott left a comment

Choose a reason for hiding this comment

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

Approved with two minor comments

@lxea lxea force-pushed the lxea/tsh-dotfile-doc branch from 1eae53d to c943723 Compare April 5, 2022 09:22
@lxea lxea enabled auto-merge (squash) April 5, 2022 09:22
@lxea lxea force-pushed the lxea/tsh-dotfile-doc branch from c943723 to a609317 Compare April 5, 2022 09:22
@lxea lxea merged commit 759d752 into master Apr 5, 2022
@lxea lxea deleted the lxea/tsh-dotfile-doc branch April 5, 2022 09:27
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.

4 participants