istio 网关开启https访问链接重置

背景:

一上云租户使用平台提供的istio网关,开启https,然后发现访问一直链接重置。

排查过程:

1、检查代理的服务,进行了模拟访问是正常的,排除代理服务的问题。

2、检查网关实例的日志发现无异常,调用网关的接口,查看相应的路由是否添加进去,发现路由添加成功的。

3、模拟访问网关实例,看看网关日志是否记录请求进来。访问结果如下:

sh-4.2# curl -k https://127.0.0.1:30081/muc-app web/telecom

curl: (35)IcP connection reset by peer

通过模拟访问,查看网关日志实例,并未有相关请求日志进入。后来一度认为是开发版本的问题,也找咱们相关网关开发查看,也并未发现问题。

解决方案:

后来自己查询相关istio官方文档,猜测可能是证书存在问题,然后根据官方提供的方式生成证书,重新配置,发现可以正常访问了。如下图:

curl -k --insecure https://127.0.0.1:30081/muc-app-web/telecom\<meta http-equiv=pragma content=no-caccharset=utf-8><meta"no-cache, no-store, must-revalidate">link rel-icon href data:;base4,>title>m程v名显<link rel-"sho<link href-/muc-ap-web/static/css/ap.7c3af2faeeabe3630a65aba7cb7328.css rel-stylesheet>x/headxbodyxdiv id-ap>x/divx<script type-text/javascript3f8754646c1ab7c2.js>x<script typetext/javascript src=/muc-app-web/static/js/vendor.78760e801beaf3de05.jsx/scriptxscript type-text/javasc79a587675da4fd,is>[root@xz-official-view-69d5448798-69spm apps]#

至此问题算是解决,也同步给开发。

相关证书生成命令如下:

mkdir example_certs1

openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -subj '/O=example Inc./CN=example.com' -keyout example_certs1/example.com.key -out example_certs1/example.com.crt

openssl req -out example_certs1/httpbin.example.com.csr -newkey

rsa:2048 -nodes -keyout example_certs1/httpbin.example.com.key -subj

"/CN=httpbin.example.com/O=httpbin organization" openssl x509 -req

-sha256 -days 365 -CA example_certs1/example.com.crt -CAkey example_certs1/example.com.key -set_serial 0 -in

example_certs1/httpbin.example.com.csr -out

example_certs1/httpbin.example.com.crt

mkdir example_certs2

openssl req -x509 -sha256 -nodes -days 365

-newkey rsa:2048 -subj '/O=example Inc./CN=example.com' -keyout example_certs2/example.com.key -out example_certs2/example.com.crt

openssl req -out example_certs2/httpbin.example.com.csr -newkey

rsa:2048 -nodes -keyout example_certs2/httpbin.example.com.key -subj

"/CN=httpbin.example.com/O=httpbin organization" openssl x509 -req

-sha256 -days 365 -CA example_certs2/example.com.crt -CAkey example_certs2/example.com.key -set_serial 0 -in

example_certs2/httpbin.example.com.csr -out

example_certs2/httpbin.example.com.crt

使用httpbin.example.com.key httpbin.example.com.crt

相关推荐
Bright16682 小时前
mkcert实现本地https
网络协议·http·https
锐成19193 小时前
FTPS、HTTPS、SMTPS以及WebSockets over TLS的概念及其应用场景
网络协议·https·ssl
2501_915921433 小时前
高敏感应用如何保护自身不被逆向?iOS 安全加固策略与工具组合实战(含 Ipa Guard 等)
websocket·网络协议·tcp/ip·http·网络安全·https·udp
2501_915106324 小时前
App 上线后还能加固吗?iOS 应用的动态安全补强方案实战分享(含 Ipa Guard 等工具组合)
websocket·网络协议·tcp/ip·http·网络安全·https·udp
2501_915918416 小时前
iOS 项目怎么构建稳定性保障机制?一次系统性防错经验分享(含 KeyMob 工具应用)
websocket·网络协议·tcp/ip·http·网络安全·https·udp
2501_915909066 小时前
从零搭建到 App Store 上架:跨平台开发者使用 Appuploader与其他工具的实战经验
websocket·网络协议·tcp/ip·http·网络安全·https·udp
程序员的世界你不懂6 小时前
(10)Fiddler抓包-Fiddler如何设置捕获Firefox浏览器的Https会话
https·fiddler·firefox
斯普信云原生组7 小时前
K8S主机漏洞扫描时检测到kube-服务目标SSL证书已过期漏洞的一种永久性修复方法
https·kubernetes·ssl
Adorable老犀牛12 小时前
负载均衡将https请求转发后端http服务报错:The plain HTTP request was sent to HTTPS port
nginx·http·https·负载均衡
fydw_71512 小时前
进阶配置与优化:配置 HTTPS 以确保数据安全传输
网络协议·http·https·flask