本文介绍了是否可以同时在Kubernetes Ingress中使用web和api类型配置AppId?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,如果未提供身份验证,浏览器将显示登录页面,但后端也将接受带有有效承载令牌头的呼叫.

So that a browser would show the login page if no authentication is provided, but the backend would accept calls with a valid bearer token header as well.

有可能吗?如果可以,怎么办?

Is that possible? If so, how?

我们在入口后面的同一个命名空间中有多个kubernetes服务,并用

We have several kubernetes services in the same namespace behind an ingress and annotated the ingress with

ingress.bluemix.net/appid-auth: "bindSecret=binding-appidname namespace=somenamespace requestType=api serviceName=service-a"

requestType=web也可以,但是requestType=api,web无效,对于相应的请求类型也不能两次添加注释.

requestType=web will work too, but requestType=api,web does not work, neither does adding the annotation twice with the respective request types.

AppId文档( https://console.bluemix .net/docs/services/appid/tutorial-kubernetes-auth.html )在"serviceName"的描述中表示:To use multiple request types in the same cluster, configure an instance of App ID to use web and another to use api.,所以我觉得应该可以同时使用两者

The AppId Documentation (https://console.bluemix.net/docs/services/appid/tutorial-kubernetes-auth.html) states in the descriptino of "serviceName": To use multiple request types in the same cluster, configure an instance of App ID to use web and another to use api., so I got the impression it should be possible to use both at the same time.

推荐答案

您可以使用Ingress批注保护同一名称空间中具有不同requestTypes的多个服务.语法为:

You can protect multiple services with different requestTypes in the same namespace using Ingress annotation. The syntax is:

ingress.bluemix.net/appid-auth: "bindSecret=binding-appid-01 requestType=web serviceName=service1;bindSecret=binding-appid-01 requestType=api serviceName=service2;bindSecret=binding-appid-02 requestType=web serviceName=service3;"

这篇关于是否可以同时在Kubernetes Ingress中使用web和api类型配置AppId?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 17:08