Iframe security with 3rd party content #1145
Answered
by
nothingismagick
slatelayer
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Anytime you pull javascript from the outside universe you are creating a
portal that can be dangerous, especially if you do not trust them. I do
have some recommendations though.
Find an alternative that is just data.
Only ship the API endpoints you need with the acceptlist. This will make
unneeded endpoints unavailable.
Create a nonce at startup, place it in a randomly named object in your JS
&& rust and use that in your authorized messages to validate them.
If you are truly paranoid, use the noise protocol.
The latter two are things I will be designing over the coming weeks, so if
you want to have a discussion about them, ping me on discord.
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
jbolda
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it safe to load 3rd party URLs in iframes?
I guess it would be difficult / impossible for a 3rd party to map your API with the randomization, but is there anything else to worry about?
I need a secure in-app browser context, where there may be many of them open concurrently (and if I use iframes, I need to ignore iframe-options headers), and I would like to lay them out with DOM, like the Chromium
webview
element. Can I do something like that with Tauri?Beta Was this translation helpful? Give feedback.
All reactions