Support permissions model via entitlements
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 32/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- linux, rust
- Lĩnh vực
- authentication, authorization, backend-api-design, security
Hướng nghiên cứu
Bắt đầu bằng việc xem xét các kiểm tra quyền ở cấp ứng dụng được hardcode trong credentialsd và cách dự kiến ủy quyền các kiểm tra đó cho xdg-desktop-portal. Sử dụng bản phác thảo entitlement, bảng chân trị và danh sách TODO để xác định định dạng entitlement, nội dung prompt của app store và nền tảng, cũng như ranh giới để loại bỏ các kiểm tra đó; yêu cầu hoàn thành là phải thống nhất về thiết kế trước khi triển khai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
We need to define a permissions model and recommendations for app distributor and platform policies.
Definitions
Credential types
Right now, we have only implemented passkeys, but eventually we intend this portal to accept credential types password,public-key, digital,and identity, corresponding to types in the W3C Credential Management API. For clarification digital credentials refer to Verifiable Digital Credentials, which may represent mobile driver's licenses, passports and various other highly sensitive documents. identity credentials refer to FedCM credentials, which is essentially a way to integrate with federated identity providers with a structured JavaScript API. These are not "identity documents," like digital conveys.
Recommended policies
First, some baseline recommendations:
App distributors
- All unscoped apps should be manually reviewed, as those create universal phishing vectors, regardless of whether the origin is explicitly prompted
- For scoped apps, where automated review is allowed, the distributor may cretae a stricter policy requiring manual review, for example, initiating manual review if there is a long list of origins specified (more than 3?), or if particularly sensitive domains are listed (sites associated with government, financial, cryptocurrency services)
- Distributors should reject apps with origins on the Public Suffix List (this is enforced by the portal for passkeys, but can't be enforced for passwords or TOTPs)
- Passkeys (
type: public-key) are origin-bound and are much less sensitive than passwords, TOTPs, and digital credentials - Distributors should do due diligence to ensure that clients adhere to the "Privacy considerations for clients" section of the WebAuthn specification.
digitalcredentials often represent some sort of human identity, like driver's licenses, passports, work credentials, employee badges, etc. Since these inherently contain highly sensitive PII, these credentials should be prompted for separately from credentials that merely attest to an online account. (Note that these online accounts may grant access to PII, so should also be handled carefully, but digital credentials are.)
Platforms
- If there is no site attestation, then there should be explicit prompts for each origin requested
- Users should be prompted for credential types separately from origins. That is, an app should request specific permission from the user to use
passkeysat all separately from usingpasskeysfor. Platforms can design consent screens to elide the app-specific credential type permission + origin-specific request permission into one screen where applicable. Credential types can be grouped into categories based on sensitivity, for example "online" credentials (password,totp,public-key,identity) can be consented together all at once, whiledigitalcredentials are separate - As mentioned above,
digitalcredentials are highly sensitive, so special consent screens should be display when the app requests them. Regardless of origin, digital credentials should be treated as special, as they typically convey highly sensitive PII that cannot be scoped to an origin.
Permissions Model
Here is a truth table representing the possible states from most sensitive to least sensitive. Here is an explanation of the columns:
- Scoped: The set of origins that an app can request is limited to at static set determined at build time and perhaps reviewed by the app distributor.
- Site-attested: the site listed in the origin
- Manual Review: Whether the app distributor reviews the permissions for the app manually
- Origin Prompt: Whether the platform shows a permission prompt for every new origin that the app requests credentials for. ("App A wants to access credentials for example.com")
(Note that we can't do site-attestation right now, but we should leave room for it in the permissions model to be able to do later.)
| Scoped | Site-attested | Manual Review | Origin Prompt | Purpose/Notes | |
|---|---|---|---|---|---|
| N | N | N | - | X | All unscoped apps should be manually reviewed |
| N | N | Y | N | ✅ | Browsers only |
| N | N | Y | Y | ✅ | Self-hosted apps |
| N | Y | N | - | X | All unscoped apps should be manually reviewed |
| N | Y | Y | N | ✅ | Apps for self-hosted services with manifests configured |
| N | Y | Y | Y | X | If the site attests to the app and it is manually reviewed, I don't see why we can't skip the origin prompt |
| Y | N | N | - | X | Scoped, but unattested apps should be manually reviewed |
| Y | N | Y | N | X | If the app is not attested, we must do origin prompts |
| Y | N | Y | Y | ✅ | If the app is not attested, we must do origin prompts |
| Y | Y | N | N | ✅ | If the site attests the app, then seems fine to skip origin checks. Review can be automated too, as long as the list of origins is not long |
| Y | Y | N | Y | X | If the site attests the app, seems fine to skip origin checks |
| Y | Y | Y | N | ✅ | The app review could be skipped, but also could be manual per distributor policy |
| Y | Y | Y | Y | X | If the site attests the app, seems fine to skip origin checks |
So ignoring the ones that require site attestation, there are 4 levels of permissions that I would like to support (and a two more that we can target later with site attestation[^1]):
- unscoped, silent client: a client that can request credentials from any origin, and does not need permission prompts requesting credentials for a particular origin. This should be reserved for web browsers.
- unscoped, explicit client: a client that can request credentials from any origin, but requires a new permission prompt for each new origin requested. This is useful for apps that do not know what origin the user might use, but will be a small set of origins in typical use. For example, for an app that works with self-hosted software.
- scoped, explicit client: a client that can only request credentials for a specific set of origins
- no-privileged client: And of course, a client that has no permission to request any credentials for apps that don't need it, like a calculator app.
[^1]: Eventually, I'd like to add the ability to express a scoped, silent client, where the set of origins is not only determined by the app developer, but also attested by the origin's site via some manifest referring to the app. That could enable automatic app store approvals and skipping permission prompts (because the permission is verified outside of the control of the local machine). But that requires other ecosystem updates outside of the control of this project and can be done later.
Entitlement Design
So all that being said, we can accomplish this with entitlements. We should iterate on the design of the entitlements to make sure that the above permission model can be easily expressed, understood and parsed by both developers and app distributors/reviewers.
Here is a concrete strawman for the sake of discussion:
[Policy entitlements]
grant=org.freedesktop.portal.Credential
# A client must either declare PrivilegedClient or ScopedClient
# Privileged clients can request any origin, but may or may not require permission prompts for each origin they request credentials from. Their credential types are still restricted and should be prompted for at least at the app level.
[Policy org.freedesktop.portal.Credential.PrivilegedClient]
# Privileged clients still must declare their credential types
types=public-key,password,totp,digital,identity
# Whether the app must obtain consent from the user for each origin.
# `implicit` should be considered highly sensitive and reserved for browsers only.
origin-consent=<implicit,explicit>
# Map of allowed credential types per-origin, along with the location of the attestation URL.
[Policy org.freedesktop.portal.Credential.ScopedClient]
# attestation-url is optional. If specified, the attestation URL's hostname must be from the same origin, and will be checked by the distributor, and by the platform at install time and request time.
# If the check is successful, then origin prompts will be skipped by the platform.
# If the check is not successful, the platform may decide to reject the request, or to display a prompt. A future edition of this entitlement may require the platform to reject the request if the check fails.
https://acme.com=types:public-key,password,digital;attestation-url:https://acme.com/.well-known/manifest.json
https://acme.org=types:public-key,password,digital;attestation-url:https://acme.org/.well-known/manifest.json
TODO
- Decide on format of entitlements
- Provide recommended language for app stores to display
- Provide recommended language for platform permission prompts
- Remove hardcoded app-level permission checks from credentialsd, deferring to checks on xdg-destkop-portal
- Ngôn ngữ chính
- Rust
- Star
- 310
- Fork
- 22
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của linux-credentials/credentialsd
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
linux-credentials/credentialsd#277 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Update screenshotsĐang mởdocumentation good first issue help wanted
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
linux-credentials/credentialsd#87 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
`check_origin_from_privileged_client` drops browser signalling intermediate cross-origin iframesĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 57/100
linux-credentials/credentialsd#276 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
linux-credentials/credentialsd#275 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Cancel request when client disconnectsCó thể đã có người làm @kpanuragh đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
linux-credentials/credentialsd#274 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của linux-credentials/credentialsd
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
pbakaus/impeccable#1620 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
swc-project/swc-next-issues#533 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
nautechsystems/nautilus_trader#5718 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`luvus --remote` cannot start on a host whose login shell is NushellCó thể đã có người làm @schlich đã nhận hôm nay. Đang mởstatus: needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 4 ngày