Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zanzibar: Google’s Consistent, Global Authorization System #1

Open
linxuyalun opened this issue Apr 9, 2021 · 4 comments
Open

Zanzibar: Google’s Consistent, Global Authorization System #1

linxuyalun opened this issue Apr 9, 2021 · 4 comments
Labels
distributed system distributed system arch, resource scheduling done Finish reading

Comments

@linxuyalun
Copy link
Owner

No description provided.

@linxuyalun linxuyalun added the todo todo label Apr 9, 2021
@linxuyalun
Copy link
Owner Author

Zanzibar 整体来说只有这个 API 模型有意思,Zanzibar 对外提供了一种中心式的鉴权服务,保证了两点;

  1. 尊重因果一致性,即 Bob 删除了 Marry 的权限后,Marry 没有返回权限
  2. 外部一致性,即 Bob 删除了 Marry 的权限后,Marry 一定没有返回权限,而不会时有时没有
    但是上述两点保证都是靠它底层的 infra (即 spanner)做到的,光这篇文章本身而言,并不具有那么亮点的内容

@linxuyalun
Copy link
Owner Author

Zanzibar 通过一种简明的方式表示关系,如下图,User A 拥有 video X 的阅读权限:
image

但是有时候,用户的权限可能会更复杂,比如某个用户属于某个组,因此 userset 是可以嵌套的,如下图:
image

可以预想得到的是,通过这种简单的模型它来描述所有权限,因此有些地方的三元组可能就会涉及多个嵌套

@linxuyalun
Copy link
Owner Author

权限的更新涉及一个问题,new enemy protection,举个例子,Bob 一开始有阅读 Alice 文档的权限:

image

然后 Alice 撤回了 Bob 的阅读权限:

image

Zanzibar 必须在这方面保证外部一致性和因果性,否则就会可能导致 Bob 在被撤销权限后仍能看到 Alice 文档。

为此,他们基于 spanner 利用时间去构造了 ACL(Access control list) Check 保证 ACL 更新顺序:

image

@linxuyalun
Copy link
Owner Author

剩下这套关于时间的保证,就是靠 spanner 了

@linxuyalun linxuyalun added distributed system distributed system arch, resource scheduling done Finish reading and removed todo todo labels Apr 10, 2021
Repository owner locked as resolved and limited conversation to collaborators Apr 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
distributed system distributed system arch, resource scheduling done Finish reading
Projects
None yet
Development

No branches or pull requests

1 participant