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

Add [InsecureContext] #471

Closed
ddorwin opened this issue Nov 2, 2017 · 5 comments
Closed

Add [InsecureContext] #471

ddorwin opened this issue Nov 2, 2017 · 5 comments

Comments

@ddorwin
Copy link
Contributor

ddorwin commented Nov 2, 2017

To make it clear which (new) APIs are available on insecure contexts and encourage spec authors to make a conscious decision, I propose adding [InsecureContext] as a peer to [SecureContext].

Such an attribute would also enable tools, such as Bikeshed and IDL compilers, to ensure that one or the other has been specified.

@mikewest
Copy link
Member

mikewest commented Nov 2, 2017

I like the idea of making the choice explicit!

That said, since this is a binary option, it might make more sense to treat what you've called "InsecureContext" as a variant of the existing attribute (e.g. [SecureContext=Nope]). That also makes secureness marginally simpler to type. :)

@tobie
Copy link
Collaborator

tobie commented Nov 2, 2017

See #420 (comment).

@annevk
Copy link
Member

annevk commented Nov 3, 2017

If we actually think we can manage to do this I'd suggest we flip the default instead as the plan of action seems to be to make most things restricted to secure contexts. That way if you don't think about it it's fine, as you'll be doing the right thing. And if you do think about it and make the wrong choice, it's more easily spotted.

@annevk
Copy link
Member

annevk commented Jan 15, 2018

I suspect we want both after all, since sometimes the majority of an interface will be insecure and so having insecure as the default makes sense until it becomes time to flip. Unless it seems reasonable that all existing members get annotated with [LegacyInsecureContext] when you need to add a "secure" one.

@annevk
Copy link
Member

annevk commented Aug 3, 2021

Let's duplicate this into #876.

@annevk annevk closed this as completed Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants