Written by

Enterprise Application Development Consultant at The Ohio State University Wexner Medical Center
MOD
Question Scott Roth · Jun 16, 2023

Web Terminal - HTTP ERROR 401

I am trying to add Web Terminal as a feature for my team to use. 

I installed webterminal via zpm "install webterminal" ran on %SYS on our Development box.

%SYS>zpm "install webterminal"

[%SYS|webterminal]      Reload START (/ensemble/DEV/mgr/.modules/%SYS/webterminal/4.9.6/)
[%SYS|webterminal]      Reload SUCCESS
[webterminal]   Module object refreshed.
[%SYS|webterminal]      Validate START
[%SYS|webterminal]      Validate SUCCESS
[%SYS|webterminal]      Compile START
Recompiling WebTerminal, skipping the deletion...
Installing WebTerminal application to %SYS
Updating web application "/terminal"...
WEB application "/terminal" is updated.
Assigning role %DB_IRISSYS to a web application; resulting roles: :%DB_IRISSYS
Updating web application "/terminalsocket"...
WEB application "/terminalsocket" is updated.
Mapping %WebTerminal package into all namespaces: %All
WebTerminal package successfully mapped into all namespaces.
[%SYS|webterminal]      Compile SUCCESS
[%SYS|webterminal]      Activate START
[%SYS|webterminal]      Configure START

And configured the web application/terminal...

and gave my Developer Role access to Read, Use, Write Web Terminal. However when I go to try to launch the web terminal I am getting 

 

I am not running any kind of SSL requirements through the Web Gateway or built in Apache. Can someone tell me if I missed something or how do I resolve this issue? If I change the Web Application to unauthentication then a page will load but it will be blank.

We use Delegated Authentication against AD to verify the user group before allowing access, because I am using ZAUTHENTICATE could that be an issue?

 

What I noticed by looking at the Security Audit is that when I click on the Web Terminal link it is claiming I am a UnknownUser - /terminal login failure. How to I get it to prompt a user for a user name and password?

Product version: IRIS 2022.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2023.1 (Build 229U) Fri Apr 14 2023 17:16:34 EDT

Comments

Robert Cemper · Jun 16, 2023

just a hint:
Webterminal uses 2 connections:

  1. http/https
  2. wss/ws       websockets

this might cause problems. just my guess

In WEBCOMMAND I use just 1 connection (rather straight CSP)
with less  comfort

0
Brett Saviano · Jun 16, 2023

Hi @Scott Roth, when 2023.2 is released VS Code will support an integrated WebSocket-based terminal that's implemented as a new Atelier API endpoint. It will be available in kits by default and the vscode-objectscript. It's documented here and the newest beta version of the vscode-objectscript extension and 2023.2 previews have the needed code.

0
Scott Roth  Jun 16, 2023 to Brett Saviano

I don't think we will be going to 2023.2 anytime soon, as we just got to 2022.1 in May. It will be another year at least before we upgrade again. I am just trying to use this on the version we have currently and not through VSCode, I was trying to get this running for my team to use in edition to the Management Portal.

0
Dmitry Maslennikov · Jun 17, 2023

and another way to access terminal through web, is by using ttyd, I use it for irissqlcli-web. ttyd helps to webify any terminal application, it can be bash, or iris session

0
Yaron Munz · Jun 19, 2023

Which browser do you use? I noticed that in Edge the credentials box is not popped-up resulting an 401 error, so you need to work with "IE mode" (on chrome, it does pop-up).

0
Scott Roth · Jun 20, 2023

I did try Chrome, but now I am receiving...

WebTerminal lost connection with server (code 1006).

0
Eduard Lebedyuk · Jun 20, 2023

Can you show the definition for /terminalsocket web app please?

If it's a DEV server, add %ALL to it and check if it works.

Also, check Audit DB for PROTECT errors.

0
Scott Roth  Jun 20, 2023 to Eduard Lebedyuk

%ALL was the issue. Why will this only work in Chrome and not Microsoft Edge? Chrome is a pig when it comes to Memory so I have been looking for an alternative.

0
Eduard Lebedyuk  Jun 21, 2023 to Scott Roth

Why will this only work in Chrome and not Microsoft Edge?

Is that a local server? Edge does not allow websockets on localhost.

In the Edge open About:flags page. Enable the "allow Localhost Loopback" feature.

0
Scott Roth · Feb 15, 2024

How do I configure Apache/Web Gateway to allow this connection to happen?

0