可以路由到使用SSL保护的服务吗?

huangapple 未分类评论52阅读模式
英文:

Is it possible to route to service secured with SSL?

问题

我有一个简单的Zuul配置:

zuul:
  routes:
    users:
      path: /myusers/**
      url: https://example.com/users_service

例如,URL https://example.com/users_service 需要证书认证。是否可以为这个特定的路由配置 .p12 证书?

英文:

I have simple Zuul configuration:

zuul:
  routes:
    users:
      path: /myusers/**
      url: https://example.com/users_service

For example URL https://example.com/users_service needs certificate authentication. Is is to possible to configure .p12 certificate for this particular route ?

答案1

得分: 0

如果您想重定向到https URL,那么不应该有任何问题。

重定向后,浏览器将具有控制权,并将处理所有证书协商。
确保您已在计算机的“个人”证书存储区域安装了个人证书(.p12)。
浏览器将从那里获取它,然后在实际发送到“example.com”之前向您显示弹出窗口。

如果您想从后端“调用”https URL(例如调用REST并获取响应),则必须为Java提供自定义密钥库(包含.p12或您也可以直接使用.p12)。

英文:

If you want to redirect to the https URL, then there should not be any issue.

After redirection, browser will have the control and it will take care of all the certificate negotiations.<br>
Make sure you have installed the personal certificate (.p12) on your machine's 'personal' section of certificate store.<br>
Browser will pick it up from there, will show you the pop-up before actually sending it to 'example.com'.

If you want to 'invoke' the https URL from the backend (like invoking REST and get the response back), then you will have to provide custom keystore to the java (keystore containing .p12 or you can directly use .p12 also).

huangapple
  • 本文由 发表于 2020年7月27日 16:19:06
  • 转载请务必保留本文链接:https://java.coder-hub.com/63111303.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定