问题描述
我正在创建一个仪表板,它使用一些 iframe 来引入 Solarwinds 数据.现在的问题是,每次加载 iframe 时,我都必须输入用户名和密码并手动登录.
I am creating a dashboard which uses a few iframes to bring in Solarwinds data. The problem righ now is that, everytime I load the iframe I have to type in the username and password and manually login.
有没有办法通过将用户名和密码传递到 URL 中来做到这一点.我的 iframe 调用以加载 Solarwinds 数据的 URL 是:
Is there a way to do this by passing userid and password into the URL. The URL that my iframe calls to load the Solarwinds data is:
"http://myserver/Orion/DetachResource.aspx?ResourceID=XXXX&NetObject="
Note: xxxx = a 4 digit Resource ID
推荐答案
是的,这是可能的,但它会将密码暴露给任何查看您仪表板的人,因为它就在源代码中以及任何观看的人网络流量或能够浏览浏览器缓存.如果这不是您在您的环境中关心的事情,您可以在 URL 中包含凭证以及 AccountID 和 Password 查询字符串参数.像这样:
Yes, this is possible, but it will expose the password to anyone who views your dashboard since it will be right there in the source code as well as anyone watching network traffic or able to poke around the browser cache. If this is not something you are concerned about in your environment, you can include the credentials in the URL with the AccountID and Password query string parameters. Like this:
http://myserver/Orion/DetachResource.aspx?ResourceID=XXXX&NetObject=&AccountID=guest&Password=NotASecretAnymore
这篇关于自动验证到 SolarWinds 并使用 URL 查看数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!