做网站流量要钱吗,站内营销推广方式,cms+wordpress+国内,企业cms源码前言#xff1a;
大数据集群集成 Kerberos 后#xff0c;很多 WEBUI 打开都会提示输入用户名和密码。由于我想获取 flink 任务的详情#xff0c;且KNOX 并不支持Flink api#xff0c;查看KNOX 直接的列表#xff1a;https://docs.cloudera.com/cdp-private-cloud-base/7.…前言
大数据集群集成 Kerberos 后很多 WEBUI 打开都会提示输入用户名和密码。由于我想获取 flink 任务的详情且KNOX 并不支持Flink api查看KNOX 直接的列表https://docs.cloudera.com/cdp-private-cloud-base/7.1.7/knox-authentication/topics/security-knox-supported-services-matrix.html。所以只能是直接请求由 kerberos 保护的rest 地址了。
这里介绍如何使用 curl 命令行的方式来访问受 Kerberos HTTP SPNEGO 保护的 URL。 前提
curl 版本需支持 GSS-Negotiatekeytab 文件或者 kerberos 用户/密码curl -u 参数不可省略但是username/password 可以省略
具体步骤
要访问受 Kerberos HTTP SPNEGO 保护的 URL请确保您的 版本支持 GSS 并且能够运行 。
curl -V
curl 7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l
zlib/1.2.3
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: GSS-Negotiate IPv6 Largefile NTLM SSL libz使用 kinit 登录到 KDC。
kinit /opt/keytab/test.keytab test或者
kinit
Please enter the password for usernameLOCALHOST:使用 curl 获取受保护的 URL。
我这里是调用的 flink on yarn 程序累加器的rest 请求。
curl --negotiate -u : http://1.1.1.1:8088/proxy/application 1694747643798_0956/jobs/c88ce26450f1f9dc6423eeodec31ada7/accumulators–negotiate 在curl 中开启 SPNEGO-u 该选项是必需的但用户名和密码可以省略
参考
https://docs.cloudera.com/runtime/7.2.0/scaling-namespaces/topics/hdfs-curl-url-http-spnego.htmlhttps://hadoop.apache.org/docs/current/hadoop-hdfs-httpfs/UsingHttpTools.html