Security headers (HSTS, X-Frame-Options, CSP) for published applications on a custom domain

Are you using our SaaS platform (Baserow.io) or self-hosting Baserow?

SaaS

What are the exact steps to reproduce this issue?

We publish an Application Builder app on our own custom domain (Baserow Cloud). Security scans (internet.nl, securityheaders.com) show that the published site sends none of the common security headers:

Strict-Transport-Security
X-Frame-Options / CSP frame-ancestors
X-Content-Type-Options
Referrer-Policy
Permissions-Policy
Content-Security-Policy

The app has a login page, so clickjacking protection (X-Frame-Options or frame-ancestors) matters to us in particular. Is there a way to enable these headers for published apps on Baserow Cloud, or is it on the roadmap?

Also: is the domain that custom-domain CNAMEs point to (baserow.io) signed with DNSSEC?

Thanks!

Attach screenshots, videos, or logs that demonstrate the issue.

Hi @Rene - welcome to the Baserow community!

A short TLDR is that there is no way to set those headers right now. I’ll be talking with my team on Monday about these points, and we’ll likely create an issue to track the concerns you raised in our roadmap.

Regarding DNSSEC, baserow.io (which custom domains point to) isn’t signed with DNSSEC.

For X-Frame-Options/frame-ancestors, we don’t currently have a way to configure this in the application. We can’t send a DENY by default, since embedding a Baserow app in another site with an iframe is a supported feature. But I think it makes sense to be able to configure it per-app (or per-domain, or both).

For Content-Security-Policy, beyond the frame-ancestors, we could conceivably generate other directives automatically, e.g. connect-src to Baserow’s API host, or other directives based on any custom CSS/JS that the app uses. Ideally, the allow list would be something configurable per-app as well.

For Strict-Transport-Security, we already redirect HTTP → HTTPS. Sending HSTS with a sensible default max-age is something we can enable.

For Referrer-Policy, strict-origin-when-cross-origin is safe to send as a default. The risk right now is small, since browsers already apply it when no policy is sent. In general, a no-referrer would break embedded apps like Google maps, etc. A more strict control per-app makes sense to me.

Permissions-Policy also makes sense as something that should be configurable. X-Content-Type-Options can be on by default.

I should have an update for you sometime early next week, once I’ve had a chance to sync with my team.