如何使用 Azure 移动服务和离子保护数据安全
How to keep data safe with azure mobile services and ionic
我正在通过 javascript 文件连接到我的 Azure 移动服务服务器。意思是我在控制器页面中创建客户端并在那里创建 sort/update/delete 数据。这是访问我的数据库的安全方法吗?我必须使用其他方式吗?
通过 REST API 控制对数据库的访问,您可以在其中进行身份验证和授权检查以及数据验证,这绝对是正确的方法。 Azure Mobile Apps 只是实现目标的一种方式(在我看来,可能有偏见,这是更好的方式之一)。然而,这不是唯一的方法。在做出这样的决定时,您当然应该考虑您的要求。
You can control access to the table as a whole with the access
property:
authenticated
means you must be logged in to access the endpoint. If you are not authenticated, a 401 Unauthorized response will be
returned.
anonymous
means anyone can access the endpoint.
disabled
means the table is invisible. The server will return a 405 Method Not Allowed response.
Normally, you would only use authenticated as an access value at the
table level. You can also set access at the operation level, and that is
why this option exists. Anonymous access is the default.
您可以通过 Azure portal 中的 Easy tables 设置执行此操作。
在将 table 权限更改为 authenticated
之前,您需要先向您的移动应用程序添加身份验证。更多信息请参考this tutorial.
我正在通过 javascript 文件连接到我的 Azure 移动服务服务器。意思是我在控制器页面中创建客户端并在那里创建 sort/update/delete 数据。这是访问我的数据库的安全方法吗?我必须使用其他方式吗?
通过 REST API 控制对数据库的访问,您可以在其中进行身份验证和授权检查以及数据验证,这绝对是正确的方法。 Azure Mobile Apps 只是实现目标的一种方式(在我看来,可能有偏见,这是更好的方式之一)。然而,这不是唯一的方法。在做出这样的决定时,您当然应该考虑您的要求。
You can control access to the table as a whole with the access property:
authenticated
means you must be logged in to access the endpoint. If you are not authenticated, a 401 Unauthorized response will be returned.
anonymous
means anyone can access the endpoint.
disabled
means the table is invisible. The server will return a 405 Method Not Allowed response.Normally, you would only use authenticated as an access value at the table level. You can also set access at the operation level, and that is why this option exists. Anonymous access is the default.
您可以通过 Azure portal 中的 Easy tables 设置执行此操作。
在将 table 权限更改为 authenticated
之前,您需要先向您的移动应用程序添加身份验证。更多信息请参考this tutorial.