简体   繁体   English

App ID登录流程成功登录后移除入口服务根路径

[英]App ID login flow removes ingress service root path after successful login

I'm facing the following error while running Node.js WEB app on IBM Cloud Kubernetes with AppId: The WEB app is accessed via ingress URL: https://<host url>/ar-studio我在使用 AppId 在 IBM Cloud Kubernetes 上运行 Node.js WEB 应用程序时遇到以下错误:WEB 应用程序是通过入口 URL 访问的: https://<host url>/ar-studio

ar-studio is the backend service path as is configured in ingress. ar-studio是在 ingress 中配置的后端服务路径。 index.html has the following HTML line index.html 有以下 HTML 行

<div class="button"><a id="signin" href="protected/protected.html" title="Sign In to service">Sign In to service</a></div>
  1. User clicks on the Sign In link and IBM AppId login widget is displayed with the correct redirect uri.用户单击登录链接,IBM AppId 登录窗口小部件将显示正确的重定向 uri。
  2. User successfully logs in (using cloud directory), and the client page is redirected to https://<host url>/protected/protected.html instead of using the service root path https://<host url>/ar-studio/protected/protected.html用户登录成功(使用云目录),客户端页面被重定向到https://<host url>/protected/protected.html而不是使用服务根路径https://<host url>/ar-studio/protected/protected.html

How can I fix it so the browser will be redirected to https://<host url>/ar-studio/protected/protected.html ?如何修复它以便浏览器将被重定向到https://<host url>/ar-studio/protected/protected.html The app works great without ingress, on my local docker engine.在我的本地 docker 引擎上,该应用程序在没有入口的情况下运行良好。 Here are the relevant ingress yaml fields (some values replaced with ... for security reasons):以下是相关的入口 yaml 字段(出于安全原因,某些值替换为... ):

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    ingress.bluemix.net/client-max-body-size: size=400m;
    ingress.bluemix.net/rewrite-path: |
      serviceName=ar-studio rewrite=/;
    nginx.ingress.kubernetes.io/x-forwarded-prefix: "True"
  creationTimestamp: "..."
  generation: 20
  name: ...
  namespace: ...
  resourceVersion: "..."
  selfLink: ...
  uid: ...
spec:
  rules:
  - host: dev.cvar.eu-gb.containers.appdomain.cloud
    http:
      paths:
      - backend:
          serviceName: ar-studio
          servicePort: http
        path: /ar-studio/
        pathType: ImplementationSpecific
  tls:
  - hosts:
    - dev.cvar.eu-gb.containers.appdomain.cloud
    secretName: ...
status:
  loadBalancer:
    ingress:
    - ip: ...

我想您需要将 App ID 的 bluemix 注释添加到您的入口资源ingress.bluemix.net/appid-auth - https://cloud.ibm.com/docs/containers?topic=containers-ingress_annotation 上的说明#appid-auth

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Kubernetes Ingress Controller 重定向到基本登录路径,不持有指定服务的入口端口或服务路径 - Kubernetes Ingress Controller redirects to basic login path, does not hold the ingress port or the service path for the specified service Kube.netes 不同服务的 Ingress ROOT 路径 - Kubernetes Ingress ROOT Path to Different Service 路径上的应用程序而不是根目录不适用于 Kubernetes 入口 - app on path instead of root not working for Kubernetes Ingress 使用非根路径时 Kubernetes Ingress 上的 Angular 应用程序 - Angular app on Kubernetes Ingress when using non-root path Ingress-nginx 返回 503 到 app-root 路径 - Ingress-nginx returning 503 to app-root path 在 kubernetes 设置中使用 Ingress controller, WSO2 ZDB974238714CA8DE634A7CE1D083A 重定向到 loginF4 流管理器 1 - In kubernetes setup using Ingress controller, WSO2 API Manager redirects to 9443 for login flow 无法在非根上下文路径中通过kubernetes ingress-nginx获取websocket应用程序 - Unable to get a websocket app work through kubernetes ingress-nginx in a non-root context path 在我使用 mongodb 的简单注册/登录应用程序上从入口获取 502。 nginx 入口 ip 与 api 请求 ip 不匹配 - getting 502 from ingress on my simple signup/login app with mongodb. nginx ingress ip not matching api requests ip 如何在入口中使用服务路径的 map 主机路径? - How to map host path with service path in ingress? Nginx 入口路径未指向服务/路径 - Nginx Ingress path is not pointing to service / path
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM