-
Notifications
You must be signed in to change notification settings - Fork 9
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
TAG feedback #64
Comments
Thank you, @xfq and TAG members, for the in-depth review. I agree. We need to synchronize and have conversations with these groups. As we discussed in the November WG meeting, we can start collecting input from the MiniApp vendors for a more fruitful discussion. So, we will compile the options and identify the best approach to handle these recommendations. Early analysis of Web PackagingThe current specification derives from the incubation CG work that researched the different options and possibilities to choose the best solution for a packaging mechanism. At that time, the group analyzed the existing technologies, considering other options, such as WICG's Web Package. Of course, the specification evolved, so this may fit better now. The conclusion of the Web Package analysis was that this method is too oriented to Web resources, focused on HTTP exchanges (i.e., HTTP requests, responses, signatures, and other metadata), and establishing HTTP-specific signature mechanisms, which was not suitable for MiniApp. Note that MiniApps do not always rely on HTTP exchanges since they can be distributed in different ways (e.g., directly installed from the local filesystem). Also, this solution (now under the denomination of Web Bundles) is based on CBOR instead of ZIP, which was used by all the MiniApps analyzed (e.g., Baidu Mini Program, Quick App, Alibaba Mini Program) and very common in the industry (e.g., Chrome Apps and Extensions, Firefox OS apps, APK,...). The analysis spotted the ZIP's potential lack of efficiency on the Web (suggested in TAG's document), but valuable for MiniApp implementations due to its versatility and wide range of tools in the market. TAG's recommendations and insightsI'll extract the relevant points for discussion and recommendations provided by the TAG.
I agree, we need to preserve the origin model and secure context. One of the main use cases is to guarantee the integrity of the package (i.e., has the app been tampered with?), and we need to establish mechanisms for protecting the security of the apps.
There are also other options out there to solve this. For instance, JAR uses the
As an additional note for those unfamiliar with this WG's activities: this proposal strives to maintain and maximize compatibility with the popular existing MiniApp implementations, helping developers reuse the existing MiniApps with minimum effort across platforms and maximizing the alignment with the Web standards. Also, MiniApp packaging should not be considered a recommended model for other web-based applications. |
I'm part of the team working on Web Bundles in Chrome. Of note:
On the topic of Origin I'd be more than happy to discuss in more details, and hear about your use cases or constraints. |
After the discussion at the TPAC meeting we decided to keep the conversations with the TAG, clarifying and refining the current specs to cover all the security concerns pointed. The group is looking for concrete solutions that complement the existing proposals, minimizing the impact of the agreed contents and architecture. So, I would like to have the feedback from the WG participants about this: Security aspects of the current specificationsMost MiniApp implementations analyzed (i.e., Quick Apps, Alipay, and Baidu Mini Programs) consider a centralized origin. The release of apps is continuously verified by a central authority that checks and verifies their specific quality standards. Later, the MiniApps are published in marketplaces linked to each platform. Some MiniApps are not bound to an origin, as can happen with native apps. Some environments, like Quick Apps, enable debugging the applications from the local system and signing them like Android APKs. The solution to mitigate security risks is hashing and signing the MiniApp packages. This process guarantees the integrity of the package and enables the validation of the developer and the publisher (some cases are like in Android, allowing self-signed certificates). However, in these cases, we cannot keep the origin principle. How can we preserve the original principle of MiniApps on the Web?First, the user agent must require SSL/TSL over TCP connection. Second, the MiniApp package may include explicit information about the origin (i.e., where the package was fetched from). After the (secure) fetch, the user agent may check that the origin domain is the same as the one specified in the manifest. This Cross-Origin ResourcesMiniApps are usually designed to use only local resources. However, there are cases where MiniApps can fetch external resources (e.g., media resources and stylesheets). Moreover, they may include webView elements to embed HTML documents. The different MiniApp platforms implement various methods to prevent unwanted cross-origin calls, most based on allow lists with trusted SSL/TSL domains. Web sources in both Alipay and Baidu MiniApp platforms are limited to an explicit list of authorized domains. This list is defined within the developer's platform. In the case of the Quick App, there is a manifest member called Concrete proposal to increase security and mitigate risks in MiniApps, based on the current packaging specification:
The definition of the new manifest CSP member should be based on the standard Content Security Policy Directives. I already proposed this time ago (w3c/miniapp-manifest#42). |
The TAG wrote a feedback document on MiniApps: https://github.com/w3ctag/design-reviews/blob/main/reviews/miniapp_packaging_feedback.md
We need to discuss it, and possibly organise teleconferences with the TAG and/or Web Bundles folks.
Chinese translation
The text was updated successfully, but these errors were encountered: