Skip to content

Conversation

@TomShawn
Copy link
Contributor

@TomShawn TomShawn commented Jun 8, 2020

What is changed, added or deleted? (Required)

  • Add TiDB Dashboard 常见问题(reviewer: @CaitinChen
  • TiDB Dashboard 介绍(reviewer:@CaitinChen
  • 部署 TiDB Dashboard(reviewer: @ran-huang
  • 通过反向代理使用 TiDB Dashboard(reviewer:@yikeke
  • 提高 TiDB Dashboard 安全性(reviewer: @ran-huang

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v4.0 (TiDB 4.0 versions)
  • v3.1 (TiDB 3.1 versions)
  • v3.0 (TiDB 3.0 versions)
  • v2.1 (TiDB 2.1 versions)

If you select two or more versions from above, to trigger the bot to cherry-pick this PR to your desired release version branch(es), you must add corresponding labels such as needs-cherry-pick-4.0, needs-cherry-pick-3.1, needs-cherry-pick-3.0, and needs-cherry-pick-2.1.

What is the related PR or file link(s)?

@TomShawn TomShawn added translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. status/WIP This PR is still working in progress. needs-cherry-pick-4.0 labels Jun 8, 2020
@TomShawn TomShawn requested review from breezewish and yikeke June 8, 2020 13:14
@yikeke yikeke requested review from CaitinChen and ran-huang June 9, 2020 02:56
TomShawn and others added 2 commits June 9, 2020 13:34
TomShawn and others added 4 commits June 9, 2020 15:02
Co-authored-by: Caitin <34535727+CaitinChen@users.noreply.github.com>
Co-authored-by: Caitin <34535727+CaitinChen@users.noreply.github.com>
@TomShawn TomShawn mentioned this pull request Jun 9, 2020
5 tasks
@TomShawn
Copy link
Contributor Author

TomShawn commented Jun 9, 2020

@CaitinChen @breeswish Thanks very much for your comments! PTAL again.

Co-authored-by: Caitin <34535727+CaitinChen@users.noreply.github.com>
Co-authored-by: Ran <huangran@pingcap.com>
Copy link
Contributor

@CaitinChen CaitinChen 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
Contributor

@yikeke yikeke left a comment

Choose a reason for hiding this comment

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

dashboard/dashboard-ops-reverse-proxy.md LGTM

@yikeke
Copy link
Contributor

yikeke commented Jun 10, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 10, 2020
@TomShawn TomShawn removed the status/WIP This PR is still working in progress. label Jun 10, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Jun 10, 2020

/run-all-tests

@sre-bot sre-bot merged commit 2f59300 into pingcap:master Jun 10, 2020
sre-bot pushed a commit to sre-bot/docs that referenced this pull request Jun 10, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Jun 10, 2020

cherry pick to release-4.0 in PR #2764

@TomShawn TomShawn deleted the dashboard-4 branch June 10, 2020 03:45
sre-bot added a commit that referenced this pull request Jun 10, 2020

- See [TiDB Dashboard Multi-PD Instance Deployment](/dashboard/dashboard-ops-deploy.md#) to learn the working principle of TiDB Dashboard with multiple PD instances.
- See [Use TiDB Dashboard through a Reverse Proxy](/dashboard/dashboard-ops-reverse-proxy.md) to learn how to correctly configure a reverse proxy.
- See [Improve TiDB Dashboard Security](/dashboard/dashboard-ops-security.md) to learn how to correctly configure the firewall.
Copy link
Member

Choose a reason for hiding this comment

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

Secure TiDB Dashboard

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll create another PR to address the comments.


For security reasons, TiDB Dashboard on PD only monitors the IP addresses specified during deployment (that is, it only listens on one NIC), not on `0.0.0.0`. Therefore, when multiple NICs are installed on the host, you cannot access TiDB Dashboard using another NIC.

If you have deployed TiDB using the `tiup cluster` or `tiup playground` command, currently this problem cannot be solved. It is recommended that you use a reverse proxy to safely expose TiDB Dashboard to another NIC. For details, see [Use TiDB Dashboard through Reverse Proxy](/dashboard/dashboard-ops-reverse-proxy.md).
Copy link
Member

Choose a reason for hiding this comment

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

Use TiDB Dashboard behind a Reverse Proxy

>
> TiDB, TiKV, and other components need to communicate with the PD component through the PD client port, so do not block access to the internal network between components. Otherwise, the cluster will become unavailable.

+ See [Use TiDB Dashboard through Reverse Proxy](/dashboard/dashboard-ops-reverse-proxy.md) to learn how to configure the reverse proxy to safely provide the TiDB Dashboard service on another port to the external network.
Copy link
Member

Choose a reason for hiding this comment

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

Use TiDB Dashboard behind a Reverse Proxy


As mentioned in [Use a firewall to block untrusted access](#use-a-firewall-to-block-untrusted access), the services provided under the PD client port include not only TiDB Dashboard (located at <http://IP:2379/dashboard/>), but also other privileged interfaces in PD (such as <http://IP:2379/pd/api/v1/members>). Therefore, when using a reverse proxy to provide TiDB Dashboard to the external network, ensure that the services **ONLY** with the `/dashboard` prefix are provided (**NOT** all services under the port) to avoid that the external network can access the privileged interface in PD through the reverse proxy.

It is recommended that you see [Use TiDB Dashboard through Reverse Proxy](/dashboard/dashboard-ops-reverse-proxy.md) to learn a safe and recommended reverse proxy configuration.
Copy link
Member

Choose a reason for hiding this comment

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

Use TiDB Dashboard behind a Reverse Proxy


- To learn how to access and log into the TiDB Dashboard UI, see [Access TiDB Dashboard](/dashboard/dashboard-access.md).

- To learn how to enhance the security of TiDB Dashboard, such as configuring a firewall, see [Improve TiDB Dashboard Security](/dashboard/dashboard-ops-security.md).
Copy link
Member

Choose a reason for hiding this comment

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

Secure TiDB Dashboard


> **Warning:**
>
> You must keep the `/dashboard/` path in the `proxy_pass` directive to ensure that only the services under this path are reverse proxied. Otherwise, security risks will be introduced. See [Improve TiDB Dashboard Security](/dashboard/dashboard-ops-security.md).
Copy link
Member

Choose a reason for hiding this comment

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

Secure TiDB Dashboard


> **Warning:**
>
> Keep the `/dashboard/` path in the `proxy_pass` directive to ensure that only the services under this path are reverse proxied. Otherwise, security risks will be introduced. See [Improve TiDB Dashboard Security](/dashboard/dashboard-ops-security.md).
Copy link
Member

Choose a reason for hiding this comment

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

Secure TiDB Dashboard

sre-bot added a commit that referenced this pull request Jun 11, 2020
Co-authored-by: pingcap-github-bot <sre-bot@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/can-merge Indicates a PR has been approved by a committer. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants