英文:
Adding headers to a REST-API request before leaving the server
问题
在我们公司内部,我们正在使用Qlik。为了在Qlik内进行身份验证,我需要提供AD用户名和密码。这对于从自己的计算机获取访问权限运作良好。
现在,我们想要在我们的窄播系统上显示一个特定的仪表板,以便整个公司可以在电视屏幕上看到这个仪表板。我们已经创建了一个用户和密码,并将准备好嵌入到窄播方案中的URL。目前的问题是,您会看到登录屏幕,而不是您应该看到的仪表板。
可以通过在请求头中添加身份验证来解决这个问题。但不幸的是,我们的窄播工具不提供这个选项。这个窄播工具是本地安装的,即使Qlik也是在我们的虚拟机之一上本地安装的。
是否有其他方法可以向来自某个虚拟机的REST请求添加标头?或者可能有其他可以应用的技巧吗?
提前感谢!
英文:
Within our company we are making use by Qlik. To authenticate within Qlik I need to provide with AD username and password. This works fine for getting acces from your own machine.
Now we want to show a certain dashboard on our narrowcasting so that the whole company can see this dashboard on the TV screens. We've create a user and a password and I've added the URL which is ready for embedding to the narrowcasting schema. The issue right now is that you get the login screen instead of the dashboard you're supposed to see.
This can be solved by adding the authentication to the request header of the request. But unfortunately our narrowcasting tool doesn't provide this option. This narrowcasting tool is on-premise installed, even Qlik is on-premise installed on one of our virtual machines.
Is there another option to add a header to a rest request from a certain VM towards another VM? Or maybe another trick that we can apply here?
Thanks in advance!
答案1
得分: 2
在这种情况下,使用JWT身份验证设置虚拟代理可能更容易。
如果您已经设置了JWT虚拟代理,然后通过指定的VP前缀访问Qlik,并将生成的JWT作为HTTP标头传递。
为了生成JWT并设置JWT虚拟代理,您需要访问Qlik的证书。
有关如何设置JWT虚拟代理的逐步指南,请查看这里。
附言:您甚至可以创建一个“假”用户,并为该用户生成JWT(而不是使用真实用户)。
英文:
In this case might be easier to setup virtual proxy with JWT authentication.
If you have the JWT VP setup then access Qlik via the specified VP prefix and pass the generated JWT as http header.
In order to generate JWT and set the JWT VP you'll need to have access to Qlik's certificates.
Step-by-step guide how to set JWT VP can be found here
P.S. You can even create a "fake" user and generate JWT for this user (instead of using a real user)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论