Is it secure for pods to serve html files?

For handling files, I do think that Solid will need a way to request from a Server a time boxed & authentication bound URL for a resource, such that that URL can be used directly via browser native elements (img, audio, video, etc)

Potentially this could be done through a Link header or a separate dedicated endpoint, but the current “well, we can’t send the Authentication header from elements, so we must have the entire file passed through JavaScript” approach is hugely inefficient.

A dedicated endpoint would probably make most sense, as you could then do batch requests for URLs (so 1 request fetching multiple signed URLs).

Edit: as for serving HTML, I don’t think a Pod should ever serve HTML directly, as the security model in the browser just doesn’t make that safe, yes, some risks can be mitigated, but there’s so much attack surface, it’s just better not to do this. For example, you’ve used iframes to isolate runtime, but what about code that installs a service worker? It’ll have access to all requests to the pod, if installed from the context of the pod’s domain.

If you use CSP, then that blocks javascript, which effectively makes serving HTML for most use cases pointless (as folks want this feature as to not have to worry about application hosting), but JavaScript isn’t the only way to exfiltrate data from a page.