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

Implement contextual identity? #11777

Open
asajeffrey opened this issue Jun 17, 2016 · 8 comments
Open

Implement contextual identity? #11777

asajeffrey opened this issue Jun 17, 2016 · 8 comments
Assignees
Labels

Comments

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jun 17, 2016

Firefox is getting contextual identity: https://wiki.mozilla.org/Security/Contextual_Identity_Project/Containers Implementing something like this in Servo should be straightforward, once we've got private browsing in place.

@asajeffrey asajeffrey self-assigned this Jun 17, 2016
@jdm
Copy link
Member

@jdm jdm commented Jun 17, 2016

The difficulty with the "one channel per context" scheme that #11544 is implementing is that we can't select over a dynamic set of channels.

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Jun 17, 2016

Isn't the idea that each producer/consumer only uses one of the channels? (e.g. a Work pipeline only uses the Work channel, which talks to the Work cookie store.)

@jdm
Copy link
Member

@jdm jdm commented Jun 17, 2016

Sure; that system works as long as there is a static set of contexts defined, rather than a dynamic set.

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Jun 17, 2016

Hmm, isn't the point of the capability-based version of private browsing that a script thread at security level L only needs access to one channel, whose other end is the resource thread at security level L? There shouldn't be any threads which need both the high-security and low-security channels. Presumably, I am missing something!

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Jun 17, 2016

@jdm
Copy link
Member

@jdm jdm commented Jun 17, 2016

@asajeffrey In the current model, context is determined by channel and there's a single thread that selects over the different channels and responds appropriately. An alternate model is that we have a separate thread per context (which would enable dynamic numbers of different contexts), but that seems like an inefficient use of resources to me.

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Jun 17, 2016

@jdm: we would be using one thread per context, but I think this a reasonable penalty since a) there's not very many of them (I think the default is something like 6) and b) it's going to be a lot easier to security audit. For example, we could make the private browsing cookie jar in-memory, and then audit the code for "doesn't touch the file system".

@notriddle
Copy link
Contributor

@notriddle notriddle commented Jun 18, 2016

I thought you could select over a dynamic set of channels. You have to rebuild the select structure if you want to change it, and the underlying API isn't safe, but it can be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.