intersystems-community / intersystems-servermanager

VS Code helper extension defining connections to InterSystems servers
https://marketplace.visualstudio.com/items?itemName=intersystems-community.servermanager
MIT License
12 stars 12 forks source link

White page - VS Simple browser #224

Closed Patresko closed 3 months ago

Patresko commented 3 months ago

Hello,

I followed instruction from this site https://intersystems-community.github.io/vscode-objectscript/extensionui/ to set up all /csp/sys/ WebApplication to AutoDetect cookies for session.

When Im trying to open management portal within VS Code, I got blank white page. Is it something what do I need to set up as well and is not mentioned in documentation?

Thanks

isc-bsaviano commented 3 months ago

@Patresko How are you trying to open the SMP? If you're using the button in the Servers tree then it should work using those steps. If you opened the browser, typed in the URL abd saw the IRIS login page then it won't work. The login page doe snot work with the simple browser. Alos, that's a link to our old docs which will be removed soon. The new page is here.

Patresko commented 3 months ago

Im trying to open from "Wrench" icon

image

image

// Edit:

If I copy URL from simple browser csp/sys/UtilHome.csp?$NAMESPACE=%SYS&CSPCHD=002000010000WmX1ZPMkSljrjhSMjacqFqMkO5D1vuW9Zjzxuz

to regular one, management portal is open without login page.

isc-bsaviano commented 3 months ago

@Patresko In the simple browser, do you see a login page first or just the blank page?

Patresko commented 3 months ago

Nope in simple browser I get directly blank page

isc-bsaviano commented 3 months ago

If you copy that link an open it in a new private browser tab, not a regular one, do you get the same blank page? If so, can you open your browser's developer tools and see if there are any errors in the console or failed requests in the "network" tab? You need to use a peoviare browser for this because a regular browser will use your stored IRIS cookie instead of the CSPCHD query parameter for logging in.

Patresko commented 3 months ago

In the private window link from Simple browser works same way as in normal window, so directly logged as my user in management portal without login screen.

isc-bsaviano commented 3 months ago

Thanks for checking that. I will check internally to see if there have been any security related changes to IRIS that prevents this and check back with you. What's your $ZV?

Patresko commented 3 months ago

IRIS for Windows (x86-64) 2024.1 (Build 267_2U) Tue Apr 30 2024 16:35:10 EDT

isc-bsaviano commented 3 months ago

@Patresko I confirmed that this is caused by a change for IRIS 2024.1. The change adds a X-Frame-Options: SAMEORIGIN header to all SMP pages, which means that VS Code can't embed it in an iframe, which is what the Simple Browser is. It wasn't documented in the incompatibility notes due to confusion about the first version that it's in.

@gjsjohnmurray @isc-rsingh In response to this change, I think we should remove the "Open SMP in Simple Browser" command from the Server Manager extension. If you agree I will open a PR.

gjsjohnmurray commented 3 months ago

Frustrating that there's been an unannounced server-side change on 2024.1. I'm guessing there's been no provision for a server opting out of this heightened security, right?

If we are going to remove this button from what Server Manager offers I suggest it only happens for servers running 2024.1 or later.

isc-rsingh commented 3 months ago

@gjsjohnmurray, agreed. I'm looking into what happened process-wise.