EPA-WG / custom-element

Declarative Custom Element
Apache License 2.0
19 stars 1 forks source link

Security scopes #2

Open sashafirsov opened 1 year ago

sashafirsov commented 1 year ago

Some DCE would act as "mediator" and pipe the content transparently with a little adjustment of content. Whether it is an UX activities analytics, localization, or accessibility decorator application author needs a level of control what particular DCE instance/html include/html module has access to and able to change. The reasons would vary. From security( why accessibility layer should track user activities?) to insulation of apps from different domains( why give app keys access to foreign domain).

What would scope control?

scope presets

In addition to none and anonymous the scopes can be defined and named by context owner.

Using the scope of same name defines the concept of library - a related set of components which share same configuration and insulation layers.

scope inheritance

Since scopes are working within context, it's hierarchy is applied for scopes. But on the outer(owner) level the inner scopes can be redefined and passed through. For example, Bootstrap CSS library can be named on page level as bootstrap-css and components which use or override its rules would have scope="bootstrap-css".

sashafirsov commented 1 year ago

Is there a need for explicit scopes mix? scope="a,b"?

sashafirsov commented 1 year ago

scope definition

Is a subset of DWA descriptor. Perhaps is identical?

sashafirsov commented 1 year ago

The scope is a candidate for [Proposal] context and scope in DCE, HTML module, DWA, HTML include, template in https://discourse.wicg.io/

sashafirsov commented 1 year ago

History

Since very beginning of HTML the scopes been extensively used

Glossary

sashafirsov commented 1 year ago

domain and subdomain scope

in similar fashion as cookies. If Domain is specified, then subdomains are always included.

sashafirsov commented 1 year ago

the scope in DCE POC is limited to DCE root as associated data slice set. Other scopes or page level interaction is not exposed, hence no need for scope limitations.