-
Notifications
You must be signed in to change notification settings - Fork 170
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
Security Context protocol #1106
Conversation
42e4aad
to
3e1bbc4
Compare
Should fix CI build. I'm not sure about the use of `Arc` in `MemoryRenderBuffer`. It seems `MemoryRenderBufferInner` isn't `Send` because `Box<dyn Any>>` isn't. `Send` can be added there if a `Send` bound is added on `TextureId`. But then `GlesTexture` isn't `Send` so that presumably isn't desired in general.
608f151
to
56d2741
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1106 +/- ##
==========================================
- Coverage 24.01% 23.94% -0.07%
==========================================
Files 140 142 +2
Lines 21591 21756 +165
==========================================
+ Hits 5184 5209 +25
- Misses 16407 16547 +140
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
The Anvil implementation excludes clients crated through a security context from seeing the security context global (as required by the protocol), but doesn't currently use the context for anything else.
56d2741
to
d284280
Compare
Rebased on top of #1108, so CI can pass. This seems to be working correctly now, testing Anvil with a flatpak containing the wayland-rs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me in general, though I wonder, if we should force can_view
to just return false for any client, that already has a security context?
While I am all for flexibility, I am not sure, for what scenario you could want a faulty implementation.
A filter for more restrictive filtering could still be provided.
I think so, but I couldn't think of a good way to do that. The If Smithay doesn't use the security context for anything except excluding clients with a security context from using this protocol, the filter function already handles that so it's a bit redundant to add anything else. |
We could add a trait requirement on
Smithay itself wouldn't do anything else, but I think it is a good idea to allow downstream to add additional filters. |
I don't think there's anywhere we could a dd a trait bound for the |
Yeah, I remember creative workarounds to this I wrote in the past. They wouldn't really add any more safety over this approach. |
Yeah, I thought about something like that. Though you couldn't even call And if it's only going to be used to test |
Right. I am gonna merge this as is, once the CI-PR has been sorted out. |
The compositor should not expose the
wp_security_context_manager_v1
global to clients connected to a security context. Otherwise, I guess this would be up to the compositor to set its own restrictions.This implementation is currently incomplete.