产品动态
公告
访问方式 | 说明 |
公网访问 | 公网访问支持从互联网访问 DataSight 查看分析日志。仅支持密码鉴权登录。 |
内网访问 | 前提条件:用户办公网与腾讯云通过物理专线、VPN 安全隧道等方式互联互通。 内网访问支持从腾讯云内网访问 DataSight 查看分析日志,互联网无法访问,更安全。支持密码鉴权登录、匿名登录等多种登录方式。 |


配置项 | 配置说明 |
用户名 | 登录 DataSight 的用户名 |
密码 | 登录 DataSight 的用户密码 ,密码要求8 ~ 30位字符,不能以" / "开头,至少包含:小写字母 a ~ z、大写字母 A ~ Z、数字0 ~ 9、()!@#$%^&*|?>< 中的三项。 |
SecretId、SecretKey | |
访问 IP 限制 | 限制访问来源的 IP,支持输入 IP 地址或 CIDR,多个之间使用英文逗号分隔。 白名单:符合白名单的 IP 地址才能访问 DataSight。 黑名单:符合黑名单的 IP 地址将被拒绝访问 DataSight。 |
配置项 | 配置说明 |
SecretId、SecretKey | |
访问 IP 限制 | 限制访问来源的 IP,支持输入 IP 地址或 CIDR,多个之间使用英文逗号分隔。 白名单:符合白名单的 IP 地址才能访问 DataSight。 黑名单:符合黑名单的 IP 地址将被拒绝访问 DataSight。 |

配置项 | 配置说明 |
角色名 | DataSight 的角色名称 |
SecretId、SecretKey |
nginx -V 命令可查看是否已存在该模块。1.12版本以上的 Nginx 默认安装该模块,如果没有安装,请升级 Nginx 版本或参考 ngx_http_auth_request_module 进行安装。git clone https://github.com/TencentCloud/cls-datasight-demo.git
cls-datasight-demo/auth-proxy/ldap 中的 nginx-ldap-auth.conf 文件,并按文档内的提示信息进行修改。nginx-ldap-auth.conf 文件复制到 Nginx 配置文件中,然后重启 Nginx 服务。cp nginx-ldap-auth.conf /etc/nginx/conf.d/nginx-ldap-auth.conf## 请根据实际情况修改文件路径systemctl restart nginx## 重启Nginx服务
cls-datasight-demo/auth-proxy/ldap 中的 .env 文件,按照注释指引,生成并配置 ENCRYPTION_KEY 环境变量。auth-proxy/ldap 下运行 LDAP 校验模块、登录模块。docker build -f Dockerfile-auth -t nginx-ldap-auth .docker build -f Dockerfile-login -t nginx-ldap-login .docker run -d -p 8888:8888/tcp --env-file ".env" nginx-ldap-authdocker run -d -p 9000:9000/tcp --env-file ".env" nginx-ldap-login
python3 -m pip install python-ldap python-dotenv setuptools_rust cryptographynohup python3 nginx-ldap-login.py >login.log 2>&1 &nohup python3 nginx-ldap-auth.py >auth.log 2>&1 &
git clone https://github.com/TencentCloud/cls-datasight-demo.git
cls-datasight-demo/auth-proxy/oauth/keycloak(oidc) 目录。其中 config.yml 是 vouch-proxy 配置文件,nginx-oauth-keycloak.conf 是 nginx 配置文件。 nginx-oauth-keycloak.conf 配置文件并复制到 Nginx 配置文件中,然后重启 Nginx 服务。cp nginx-oauth-keycloak.conf /etc/nginx/conf.d/nginx-oauth-keycloak.conf## 请根据实际情况修改文件路径systemctl restart nginx## 重启Nginx服务
config.yml,放到本地 vouch-proxy 的 config 文件夹中。cp config.yml /root/vouch-proxy/config/config.yml## 请按实际情况自行修改 vouch-proxy 的 config 文件路径
docker run -d \\-p 9090:9090 \\-v ${PWD}/config:/config \\quay.io/vouch/vouch-proxy






# 请根据实际情况,修改此配置示例中<your-domain.com>、<your-domain-cert>、<domain-appid>(datasight域名前缀,支持公网/内网域名)部分# 强烈建议您为自定义域名开启https,并强制http跳转到https,以提升浏览器请求安全性、减少浏览器请求排队等待。# 如不希望强制跳转到https协议,可注释此server配置server {listen 80;server_name your-domain.com;return 301 https://$host$request_uri;}server {# 如希望通过http协议访问,可去掉下行注释# listen 80;listen 443 ssl http2;server_name your-domain.com;ssl_certificate your-domain-cert.pem;ssl_certificate_key your-domain-cert.key;location ~ ^/(.*) {# 可在此处增加自定义访问控制策略,例如:限制指定referer值才可访问#set $match "$1::$http_referer";#if ($match !~* ^(.+)::http[s]*://[www]*[.]*\\1.*$ ) {# return 403;#}proxy_pass https://datasight-111111111.clsconsole.tencent-cloud.com;proxy_set_header Host $proxy_host;proxy_set_header Origin https://$proxy_host;proxy_set_header Referer "https://$proxy_host/$1";proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Proxy true;proxy_set_header X-Proxy-Host $host;proxy_set_header X-Proxy-Real-IP $remote_addr;proxy_set_header X-Proxy-Forwarded-Proto $scheme;proxy_redirect ~^(.*)/login\\?s_url=https?%3A%2F%2F[a-z0-9\\-]+(.internal)?.clsconsole.tencent-cloud.com%2F(.*)$ $1/login?s_url=https%3A%2F%2Fyour-domain.com%2F$3;# 如需要隐藏或自定义DataSight页面的腾讯云图标(favicon),可通过以下两个header实现# proxy_set_header X-DATASIGHT-HIDE-FAVICON true;# proxy_set_header X-DATASIGHT-FAVICON-URL https://github.githubassets.com/favicons/favicon.png;}}

// 一个快速查看效果的样例,请根据自身业务进行调整// 请根据实际情况修改 <domain-appid>(datasight域名前缀)部分function prepareSdkFrame(url) {var ifrm = document.createElement("iframe");ifrm.setAttribute("src", url);ifrm.style.width = "1280px";ifrm.style.height = "960px";document.body.appendChild(ifrm);}const url = 'https://<domain-appid>.clsconsole.tencent-cloud.com/cls/search?region=${Region}&topic_id=${TopicId}&query=${Query}&time=now-h,now&hideWidget=true&hideTopNav=true&hideLeftNav=true'prepareSdkFrame(url)
// 请根据实际情况修改 <domain-appid>(datasight域名前缀)部分https://<domain-appid>.clsconsole.tencent-cloud.com/cls/search?region=<region>&topic_id=<topic_id>
// 请根据实际情况修改 <domain-appid>(datasight域名前缀)部分https://<domain-appid>.clsconsole.tencent-cloud.com/cls/dashboard/d?id=<dashboard_id>
文档反馈