mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-16 02:35:12 +00:00
feat: enable iframe use (#4766)
* feat: enable iframe use * cleanup * fix mocks * fix linting * docs: add iframe usage to solution scenarios configurations * improve api * feat(console): security policy * description * remove unnecessary line * disable input button and urls when not enabled * add image to docs Co-authored-by: Max Peintner <[email protected]> Co-authored-by: Fabi <[email protected]>
This commit is contained in:
co-authored by
Max Peintner
Fabi
parent
33e973f015
commit
632639ae7f
@@ -74,3 +74,38 @@ Go to the "Advanced" section, per default login with email address should be all
|
||||
|
||||

|
||||
|
||||
## Embedding ZITADEL in an iFrame
|
||||
|
||||
To maximise the security during login and in the Console UI, ZITADEL follows security best practices by setting a
|
||||
Content-Security-Policy (CSP) and X-Frame-Options:
|
||||
|
||||
```
|
||||
Content-Security-Policy: frame-ancestors 'none'
|
||||
X-Frame-Options: deny
|
||||
```
|
||||
|
||||
These settings block the use of serving it in an iframe to prevents clickjacking attacks.
|
||||
|
||||
### Enable iFrame embedding
|
||||
|
||||
:::caution
|
||||
This change can make you vulnerable to clickjacking attacks.
|
||||
:::
|
||||
|
||||
If your applications need to load ZITADEL inside an iframe, e.g. for a silent login or silent refresh, you can enable the use on an instance level.
|
||||
|
||||
1. Navigate to the Instance Settings.
|
||||
2. Click on the Security Policy tab.
|
||||
3. Enable the "Allow IFrame" and add the host(s) you load the iframe from.
|
||||
|
||||
You can add further hosts later on.
|
||||
|
||||

|
||||
|
||||
This will change the CSP to the following:
|
||||
|
||||
```
|
||||
Content-Security-Policy: frame-ancestors https://custom-domain.com
|
||||
```
|
||||
|
||||
and remove the X-Frame-Options header.
|
||||
|
||||
Reference in New Issue
Block a user