如何实现身份与服务的关系?

发布于 2024-10-06 14:30:38 字数 223 浏览 0 评论 0原文

我正在使用 Zend Framework 构建一个应用程序,出于常见原因我在其中使用 SOA,但我遇到了一个我不确定如何解决的问题。该应用程序有一个身份验证步骤,我也想在那里获取 ACL,但问题是我不知道如何让服务了解用户身份而不使所有内容都不可模拟。问题是我想要在服务内部进行 ACL 检查。

你平时怎么做?将身份传递给服务实例?使其可以通过某种注册表进行访问?我喜欢事情是自动的,但我在这里想不出一个好的解决方案

I'm using Zend Framework to build an application where i make use of SOA for the usual reasons, and i've come across a problem i'm not sure how to solve. The app has an authentication step and i want to get ACL in there as well, but the problem is i don't know how to get service aware of a user identity without making everything unmockable. Thing is i'd like ACL checks inside services.

How do you usually do? Pass the identity to a service instance? Make it accessible via some kind of registry? I like when things are automagic, but i can't come up with a good solution here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

单调的奢华 2024-10-13 14:30:38

我还没有直接遇到过这个问题,而且我也不是 PHP 开发人员,所以我不确定这会有多大帮助。

我认为传递身份会很好,但不确定你最好如何做到这一点。

  • 如果您可以信任信息的来​​源(并且消息没有被篡改),那么您可以将身份作为标识符传递,然后您可以查找该标识符。
  • 最好是更安全的东西,例如哈希(? )
  • 我想如果您可以加密消息(或其中的敏感位),那么

您建议如何检查服务“内部”的用户身份?

I haven't come up against this first-hand, and I'm not a PHP developer so I'm not sure how helpful this will be.

I think passing the identify would be fine, but not sure how you'd best do that.

  • If you could trust where the information was coming from (and that messages weren't tampered, then you could pass the identity as an identifier, which you could then look up.
  • better woudl be something a bit more secure, like a hash (?).
  • I guess if you can encrypt the messages (or the sensitive bits in them) then it'd be okay.

How would you propose checking the identity of the user "inside" a service?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文