Coder Social home page Coder Social logo

wicg / anonymous-iframe Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 9.0 675 KB

Give developers the ability to embed third party HTML documents inside a new and ephemeral context. In return, COEP embedding rules can be relaxed. Thanks to anonymous iframe, developers using COEP can now embed third party content that do not.

License: Other

Makefile 0.03% HTML 99.97%

anonymous-iframe's People

Contributors

arthursonzogni avatar camillelamy avatar dontcallmedom avatar ivanlish avatar johannhof avatar tidoust avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anonymous-iframe's Issues

Consider to rename "anonymous" to "credentialless" or some such

Seems like the spec doesn't try to create really anonymous iframes (anonymous feels rather strong word) but rather just credentialless.
The iframes aren't blocked from accessing each others or anything like that and they can access iframes which aren't anonymous.

(this was discussed during a Mozilla meeting on what we think of the proposal)

Is a boolean attribute sufficient?

It seems that if the attribute is not set, it's value means "inherit", not "false". Could there be a future where we want to express "false"?

"This nonce will be recomputed every time the top-level frame navigates."

I don't quite understand this part of the explainer.

If the top-level page does a same-document navigation, e.g. from https://example.com/ to https://example.com/#foo, then probably you do not want to change the nonce??

And if the top-level page does a cross-document navigation, e.g. from https://example.com/ to https://example.com/bar, then all iframes will be blown away as part of creating an entirely new document.

Maybe you are talking about what happens if the iframe does a cross-document navigation, and then using bfcache we return back to the original document? I guess you would reset the nonce then?

Or is the intent instead, just, generate a new nonce for every top-level document, which all anonymous iframe descendants of that document will use?

window.anonymous reference leftover in explainer

The state of the anonymous flag is exposed to the Window through a read-only constant attribute:

window.anonymous

It is true for Window loaded immediately inside an anonymous iframe, or deeper below it.

This should presumably be window.isAnonymouslyFramed.

Broken references in Iframe credentialless

Policy container

Should the anonymous bit be stored on a policy container? It seems like it is meant to inherit into all the relevant places.

Meta: overtaking Window interface definition?

The DOM Standard got this build error:

LINK ERROR: Multiple possible 'Window' idl refs.
Arbitrarily chose https://html.spec.whatwg.org/multipage/nav-history-apis.html#window
To auto-select one of the following refs, insert one of these lines into a <pre class=link-defaults> block:
spec:html; type:interface; text:Window
spec:anonymous-iframe; type:interface; text:Window
{{Window}}

Could you please resolve that?

Forcing all iframes to be credentialless / dealing with iframes created by external scripts

Not sure if this is the right place to post this but I ran into the following issue trying to use the credentialless attribute with Twitter tweet embeds:

The iframes in this case are created by an external script (https://platform.twitter.com/widgets.js) which of course doesn't add the credentialless attribute. There is an event mechanism to run code when a tweet is rendered but it only triggers after the tweet is added to the DOM which appears to be too late.

I guess one kinda ugly workaround would be to do the tweet embedding inside a credentialless iframe but that's not really a great solution.

Ideally, there would be some way to say "please make all iframes credentialless", presumably via an HTTP header. This also would solve the issue of having to add the attribute to all iframes.

Clarify/enable postMessage behaviour with SharedArrayBuffer

I could not find any information about this online hence this post.

Is there any way one can postMessage a SharedArrayBuffer from a cross-origin iframe to it's parent window? Every combination of headers or even setting the credentialless attribute on the iframe does not work it seems.

The real-life use case here is a WASM application/plugin inside a cross-origin iframe, who's memory needs to be read by the parent window. The memory can not be copied because of performance reasons (>100mb of data up to 100 times per second).

I would've expected the credentialless attribute on the iframe to allow this as it ensures no sensitive data is inside the iframe, but instead the current behaviour is a postmessage error event when trying to send the shared array buffer from the iframe to the parent.

putting the cross-origin iframe behind a reverse proxy so it has the same-origin is also not an option, because then the (untrusted) iframe has access to all parent state. While the parent just needs to have access to the iframe shared array buffer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.