RStudio代理身份验证 [英] RStudio proxied authetication

查看:331
本文介绍了RStudio代理身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为RStudio服务器设置了代理身份验证.

I've setup proxied authentication for RStudio Server.

RStudio服务器正在重定向到使用Express JS实现的中间件 中间件创建一个到身份验证服务器的请求,然后解析来自它的响应.

RStudio Server is redirecting to a middleware implemented using Express JS The middleware creates a request to the authentication server and then parses the response from it.

然后,中间件将X-RStudio-Username标头添加到响应中,这是对RStudio的重定向.但是,标头已添加到来自中间件的响应中,然后当浏览器重定向到RStudio服务器时,浏览器便不保留它

Then the middleware adds the X-RStudio-Username header to the response, which is a re-direction to the RStudio. However, the header is added to the response from the middleware, and then the browser doesn't keep it when it redirects to RStudio Server

由于浏览器请求没有必需的标头,因此RStudio再次请求身份验证,从而创建无限循环

Since the browser request doesn't have the required header, RStudio requests the authentication again creating an infinite loop

我应该如何处理这种情况?

How should I approach this case?

为RStudio服务器添加所需标头的最佳方法是什么?

What would be the best way to add the required header for RStudio Server?

推荐答案

浏览器不会为您添加此标头.您需要将其添加到代理流量到RStudio服务器的层中.如果您还没有这样的图层,则需要使用例如Nginx.该层可以使用您的身份验证提供程序支持的任何机制对请求进行身份验证,并添加X-RStudio-Username标头(出于安全原因,我们建议重命名).

The browser won't add this header for you. You need to add it in the layer that proxies traffic through to RStudio Server. If you don't have such a layer already, you will need to add it using e.g. Nginx. This layer could authenticate the request using whatever mechanism your auth provider supports and add the X-RStudio-Username header (which we recommend renaming for security reasons).

由于您使用的是RStudio Server Pro,我们的支持团队很乐意为您提供帮助:

Since you're using RStudio Server Pro, our support team would be happy to help you with this:

support@rstudio.com

support@rstudio.com

您也将很高兴知道我们正在为即将发布的RStudio Server Pro版本提供SAML支持!

You'll also be glad to know that we're working on SAML support for an upcoming release of RStudio Server Pro!

这篇关于RStudio代理身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆