oData 服务中的安全性(身份验证)
我的数据库位于 SQLAzure,我正在尝试使用 oData 来获取记录。我在开发 Android 应用程序时使用了 oData4j java 库。一切正常。
我可以使用 oData4j 库从 SQLAzure 检索数据,但问题是...
如果有人获取我的 SVC 文件 URL,那么他们就可以轻松获取我的数据库并使用它。所以我想进行身份验证,以便只有授权的人才能检索数据并使用它。
我怎样才能做到这一点。我尚未创建 oData PROducer 或 SVC 文件。这一切都是由 SQLAzure 完成的。
谢谢
My Database is located at SQLAzure and i am trying to use oData to get records. I have used oData4j java library as i am developing android application. Everything is working fine.
I am able retrieve data from SQLAzure using oData4j library but the problem is ...
If someone gets my SVC file URL, so they can easily get my database and play with it. so i want to put authentication so that only authorized person can retrieve data and work with it.
How can i achieve this. I have not created oData PRoducer or SVC file. All this thing is done by SQLAzure.
thnks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
有一系列有关 OData 服务和身份验证的博客文章:http://blogs。 msdn.com/b/astoriateam/archive/tags/authentication/
There's a series of blog posts about OData services and authentication: http://blogs.msdn.com/b/astoriateam/archive/tags/authentication/
您查看了 ACS 访问密钥吗?我个人没有使用过它们,但这旨在提供一种联合身份形式,以便您可以管理谁可以使用 oData 服务。 ACS 是 Azure 平台提供的一项服务。
由于您可以将每个 ACS 映射到特定的数据库用户,因此您可以完全自由地确保只有授权人员才能访问您的数据。
Did you look at the ACS access keys? I haven't personally used them, but this is meant to provide a form of federated identity so that you can manage who can consume the oData service. ACS is a service provided by the Azure platform.
Since you can map each ACS to a specific database user, you have complete freedom to ensure only authorized people can access you data.
看看下面的帖子。这包含来自 Astoria 团队的 odata 和身份验证相关博客文章的指针:
http://kashyapas.com/2011/05/odata-and-authetication/
这应该给你指点
Take a look at the following post. This has pointers to odata and authentication related blog posts from Astoria Team:
http://kashyapas.com/2011/05/odata-and-authetication/
That should give you pointers
Windows Azure Toolkit for Android 的示例应用程序可能会有所帮助。
如何:使用 Windows Azure Toolkit for Android 中的示例 Android 应用程序
https://github.com/WindowsAzure-Toolkits/wa-toolkit-android
The sample application for Windows Azure Toolkit for Android might help.
How to: Use the Sample Android Application in the Windows Azure Toolkit for Android
https://github.com/WindowsAzure-Toolkits/wa-toolkit-android