-
Notifications
You must be signed in to change notification settings - Fork 6
Proposal for an 'allowed widgets' setting #311
Conversation
Will it be possible to trust widgets per domain? |
Trusting per domain is unreliable because the widget itself is likely to be wrapped by an integration manager. If you were to trust all of scalar.vector.im for instance, it would potentially open you up to an attacker's custom widget which steals your data. Partly because of this reason, riot-web has been requiring each widget to be individually accepted. We do have the additional feature where if the logged in user is also the creator of the widget then we don't require them to approve the widget (they created it, so they implicitly trust it) - this is more of an implementation detail for the user story though. |
Due to complications in trying to read the events, it's a bit better to just store all the widget IDs in one place.
@manuroe I've changed this to put all the widget IDs into one event rather than spreading them out. Please let me know what you think. This is mostly because trying to implement the |
Sure. I guess we are not at the point we can trust an integration manager provider for that. But in the future, such provider could curate, validate and sign widgets they propose to the user. Note that nothing prevents malicious update of a widget already accepted by the the user. As widgets instances have unique ids, if a user accepts an instance of a room widget called "The super widget" in a room, they will have to accept again and again any other instances of "The super widget" they will meet after. I am still trying to check how to make use of widgets for users as smooth as possible because I barely see users accepting every single widget. |
The answer is yes. We made this decision so that we do not leak the user id within the the widget url. |
So do I, but empirically it has been fine so far. It looks like riot-web trusts the URL (before replacing template variables) in addition to the widget ID - will make this reflect that. |
I'm blocking this on the decisions needed in element-hq/user-stories#7 |
and promptly unblocked |
One day we'll figure this out
Do you think we can add some granularity in We could add an additional layer like That will look like: {
"widgets": {
"$1543854381213sKqbg:example.org": true
},
"vendors": {
"https://modular.im/"
}
} |
@manuroe added, though I'm seriously unconvinced that we'll need the |
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.
How is the user going to be prompted to accept a widget? What information will be presented to them? This implies they need to see and approve the contents of the 'data' object too, and therefore know how any given widget will behave (ie. that 'custom widget' will load the page in curl
). How is the user going to make a decision on this?
I can't help but think that if the user is going to have to re-approve the widget every time it's edited, this is only incrementally better than them having to re-approve it after each login.
This is all for the user story and out of scope here. This proposal is just to track the information, and the requirement down the pipe is that every edit needs to be tracked as a new flag (which includes
This thought has been brought up about 20 times but doesn't seem to be a hard enough blocker. |
OK - will take it to the user story |
```json | ||
{ | ||
"widgets": { | ||
"$1543854381213sKqbg:example.org": true |
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.
According to the requirements, we should re-ask permission if the widget changes. Not sure how it can change, maybe an edition of the event? In this case is it enough to just store a boolean? maybe a kind content hash also?
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.
The event ID changes when the state event changes.
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.
Just a comment regarding the 'if widget changes' requirement
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.
Talked it through and I think basically this is fine: Tom's going to update the user story to reflect how we're using the widget whitelist to infer behaviour for thing like the 'custom widget' widget (ie. what we do now). I think this makes it OK in the sense that we're sort of doing a lot more than we strictly should in order to fix this more expediently in lieu of making changes to the the integration managers / widget spec.
and with that, all the stakeholders approve so this can unblock the user story now. |
No description provided.