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

Remove transient permissions after 24h #990

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

GeorgesStavracas
Copy link
Member

... and as long as the app is running.

Draft because Chromium seems still be able to restore this token, despite it bring dropped (!) - you can verify that by changing the timeout to, say, 5 seconds.

@grulja do you know why is that?

We'll soon have to store more than just the GVariant, so in
preparation for that, store the variant in a custom struct,
and proxy that variant when retrieving the transient permission.
This is really old and available in Ubuntu 18.04 (!) so since we're
going to start using functions from that version, might as well
declare that in the build system.
This should never normally trigger, but seems like a good warning
to have. We can't print the permission id, as that could leak the
token in the journal log.
This comes after a recent discussion. Transient permissions are
modeled mainly towards browsers who have to do IPC and cannot
share the PipeWire node directly. Instead, they can request a
transient permission that allows restoring the stream that one
process requested, but without granting the browser "eternal"
access to that stream subsequently.

However, an oversight of the original implementation was the
case where we grant the permission, but the app stays open for
very long times, which is fairly common when it comes to browsers.

Expire transient permission tokens after 24 hours have passed.

Closes flatpak#981
@GeorgesStavracas
Copy link
Member Author

Soft depends on #977 (I didn't even bother changing Autotools)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Triaged
Development

Successfully merging this pull request may close these issues.

1 participant