SOLVED TrueNAS scale - Support embedding/iframe?

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
I'd suggest describing your set-up and why its needed... then perhaps a solution can be found.
 

TheMunk

Cadet
Joined
Jun 10, 2017
Messages
8
I'd suggest describing your set-up and why its needed... then perhaps a solution can be found.
I am using Organizr as a frontend for my server management, so all my apps are iframed into that. All other apps I have support iframe - and my truenas core install did too. But scale doesn't.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
I am using Organizr as a frontend for my server management, so all my apps are iframed into that. All other apps I have support iframe - and my truenas core install did too. But scale doesn't.
Thanks.. that is good context.
Which version of SCALE are you running?


Anyone else running Organizr?
If no-one has a solution, then put in a feature request, but be specific about organizr.
Without that info, there's no good test case.
 

TheMunk

Cadet
Joined
Jun 10, 2017
Messages
8
Thanks.. that is good context.
Which version of SCALE are you running?
22.12.0
I have used Organizr on and off, but I have spawn off new tabs when I click on link so I don’t have this problem
Yea this is an "okay" workaround for now. Just sad when it used to work.


For apps like qbittorrent you have to disable clickjacking protection and CSRF protection - incase that information is of any use.
1676634227666.png
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
22.12.0

Yea this is an "okay" workaround for now. Just sad when it used to work.


For apps like qbittorrent you have to disable clickjacking protection and CSRF protection - incase that information is of any use.
View attachment 63712


Did it work with 22.02.x?

SCALE UI is more sophisticated...with slide-out panels etc. I'm wondering if that impacts iframe use.

if it didn't work with 22.02.x.. then you can start another bug ticket with these details. It might be just a documentation issue.
 

ksimm1

Dabbler
Joined
Dec 7, 2020
Messages
42
Did it work with 22.02.x?

SCALE UI is more sophisticated...with slide-out panels etc. I'm wondering if that impacts iframe use.

if it didn't work with 22.02.x.. then you can start another bug ticket with these details. It might be just a documentation issue.

It hasn't worked since 22.02 RC1-2. I filed the ticket referenced above (and OP is correct that the PR waqar merged never really fixed the issue) https://ixsystems.atlassian.net/browse/NAS-113943
 

nerdspar

Cadet
Joined
Mar 5, 2023
Messages
4
Did anyone submit this as a feature request I can pile on? I'm in the exact same boat with Organizr and TrueNAS is my only tab that won't load in an iFrame.
 

ksimm1

Dabbler
Joined
Dec 7, 2020
Messages
42
So I got a response on the above ticket. This functionality was previously re-enabled, but according to the ticket its only available to change via commandline.
I just confirmed this will allow truenas to be in an iframe:
Code:
cli -c 'system general update ui_x_frame_options=ALLOW_ALL'


You need to do a system reboot after running that command.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
So I got a response on the above ticket. This functionality was previously re-enabled, but according to the ticket its only available to change via commandline.
I just confirmed this will allow truenas to be in an iframe:
Code:
cli -c 'system general update ui_x_frame_options=ALLOW_ALL'


You need to do a system reboot after running that command.
Once it is working, could you also check it survives a software update... then we can close the case.
 

nerdspar

Cadet
Joined
Mar 5, 2023
Messages
4
When I tried this, all of my domain forwarding through Traefik stopped working, and the console got flooded with 'no destination available' messages for a multitude of ports. Hoping someone can help me out. I imagine it's a stupid quick fix.
 

nerdspar

Cadet
Joined
Mar 5, 2023
Messages
4
When I tried this, all of my domain forwarding through Traefik stopped working, and the console got flooded with 'no destination available' messages for a multitude of ports. Hoping someone can help me out. I imagine it's a stupid quick fix.
Ugh. Ignore me. I was able to manually restart all containers, and it seems to be working fine now.
 

TheMunk

Cadet
Joined
Jun 10, 2017
Messages
8
So I got a response on the above ticket. This functionality was previously re-enabled, but according to the ticket its only available to change via commandline.
I just confirmed this will allow truenas to be in an iframe:
Code:
cli -c 'system general update ui_x_frame_options=ALLOW_ALL'


You need to do a system reboot after running that command.
Hi Ksimm,
I tried this and Organizr now doesn't show me the alert that the url can't be iFramed, but still noting renders.
Did you test this with Organizr?
 

VisVask

Cadet
Joined
Oct 13, 2023
Messages
2
So I got a response on the above ticket. This functionality was previously re-enabled, but according to the ticket its only available to change via commandline.
I just confirmed this will allow truenas to be in an iframe:
Code:
cli -c 'system general update ui_x_frame_options=ALLOW_ALL'


You need to do a system reboot after running that command.

Eh... Anyone knows the default value?

After changing the option, it occurred to me that I didn't want to reboot the NAS today, so I figured I could solve the same problem on my reverse proxy instead.

Turned out it was easy. Just added the CSP header like so (I use Traefik):
Code:
contentSecurityPolicy: "frame-ancestors 'self' https://my-domain.com;"


I think nginx would be something like this:

Code:
location / {
    add_header Content-Security-Policy "frame-ancestors 'self' http://your-allowed-domain.com;";
}


and apache:
Code:
<Location />
    Header always set Content-Security-Policy "frame-ancestors 'self' http://your-allowed-domain.com;"
</Location>



Hope this is helpful to someone else as well :)
 
Top