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

Be more specific with the widget permissions #1997

Closed
toger5 opened this issue Oct 31, 2023 · 5 comments
Closed

Be more specific with the widget permissions #1997

toger5 opened this issue Oct 31, 2023 · 5 comments
Assignees

Comments

@toger5
Copy link

toger5 commented Oct 31, 2023

Currently we just approve all of them in the permission callback from the rust sdk.
In EW we only approve what the widget is allowed to:
https://github.com/matrix-org/matrix-react-sdk/blob/d405e85cec36cbc2d15e652726008ebfaca9daab/src/stores/widgets/StopGapWidgetDriver.ts#L123-L178

This should also be done on andoid/ios.

@stefanceriu
Copy link
Member

I was wondering why we can't do this on the rust side but I believe the reason is that the sdk doesn't actually know that this is a specific element call widget. Seeing the web implementation though, I think we should have some sort of simple ElementCallWidgetPermissions struct on the rust side that we should use for both clients.

@toger5
Copy link
Author

toger5 commented Nov 6, 2023

Yes its not on the rust side since this is very widget specific (or even client speicifc actually). The methodology should be that users trust their clients. And the client should run the logic for wha they approve. The default should eb to prompt the user. But for EX ios and EX android the client just autoapproves. But all other clients using the rust sdk which are not developed by element might not autoapprove code ec since they dont trust it.

But a list of permissions / struct of permissions makes a lot of sense and also fits the rest of the call specific code. I would like to call it RequiredPermissionElementCall or similar so that the rust sdk does not give the hint they should be autoapproved. This should be a choice made by the app/client authors.

@stefanceriu
Copy link
Member

I would like to call it RequiredPermissionElementCall

Sounds good to me 👍

@toger5
Copy link
Author

toger5 commented Nov 7, 2023

There is a Draft PR for this: matrix-org/matrix-rust-sdk#2825

@stefanceriu
Copy link
Member

Very nice! 👏

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

No branches or pull requests

3 participants