kasmtech / KasmVNC

Modern VNC Server and client, web based and secure
GNU General Public License v2.0
3.37k stars 305 forks source link

Is there any way to disable kasm_user / password in docker image #259

Open yoongeon1206 opened 2 months ago

yoongeon1206 commented 2 months ago

currently, the kasm docker image has a default user and a password. I just try to remove them in dockerfile. We are looking for a way for developers to easily access KASM without receiving the ID password It is necessary to delete the ID and password set by default as the first step. I want to make the developer approach the KASM service without access ID and password.

j-travis commented 2 months ago

We provide a full platform (Kasm Workspaces) with robust user-management, authentication etc. https://kasmweb.com/

j-travis commented 2 months ago

The username and password you see in these containers when used standalone is a function of KasmVNC. Moving this ticket there

mmcclaskey commented 2 months ago

Sorry, I do not understand the requirement clearly. However, Kasm Workspaces handles authentication and session management and integrates with SSO providers that support OIDC or SAML, but also supports managing users within Kasm Workspaces itself. Kasm Workspaces supports unauthenticated access for end users via Casting Sessions, if you really want to provider unauthenticated access.

KasmVNC by itself does have a username and password, and Kasm Workspaces generates random KasmVNC creds for each Kasm Workspaces session and those are hidden from the user. If you wanted to create something on your own that uses KasmVNC, but without Kasm Workspaces you can. You basically would need to put a proxy in front of your KasmVNC sessions and have that proxy inject the Basic Auth credentials for the users based on your own rules.

As for setting the username and password for a KasmVNC user, see the getting started section. There is a command vncpasswd which is a symlink to kasmvncpasswd https://github.com/kasmtech/KasmVNC#getting-started

Here is how we do it in our containers

echo -e "${VNC_PW}\n${VNC_PW}\n" | kasmvncpasswd -u kasm_user -wo
ehfd commented 2 months ago

You can create a kasmvncpassword password file, then disable basic authentication. That's probably the answer OP is looking for.

Ninofj commented 3 weeks ago

You can create a kasmvncpassword password file, then disable basic authentication. That's probably the answer OP is looking for.

Can you explain how to do that?

ehfd commented 3 weeks ago

@Ninofj

Use the option -disableBasicAuth at VNC startup, but still have a generated $HOME/.kasmpasswd file from kasmvncpasswd with an irrelevant password you will not use (KasmVNC checks the existence of such file whether or not -disableBasicAuth was set).