workspaces-issues icon indicating copy to clipboard operation
workspaces-issues copied to clipboard

[Feature Request] - Allow sharing without an account

Open rlowevoiply opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. A am looking to use Kasm for our team to troubleshoot with customers, but when sending a share link it requires a login.

Describe the solution you'd like Allow share sessions to have logins without a user account on the system, view only.

Describe alternatives you've considered A tried to setup casting, but it also required a login.

rlowevoiply avatar Jan 13 '23 18:01 rlowevoiply

We do have an internal ticket tracking this FR, KASM-3693, as we have had multiple requests for this.

mmcclaskey avatar Jan 19 '23 13:01 mmcclaskey

any updates would love this!

reaperofpower avatar Apr 24 '24 00:04 reaperofpower

The ticket has not been selected for development. However, you can achieve this using the developer API today.

Use the /api/public/join_kasm and leave off the user_id in the JSON body of the request. If you don't specify a user_id, it will auto generate an anonymous user. The returned JSON will include a kasm_url. Append this to the end of your base URL. The kasm_url contains a pre-signed token that will authorized the user for the session.

This requires that you configure a developer API token and add the User and Users Auth Session permissions token to that dev api token.

https://www.kasmweb.com/docs/latest/developers/developer_api.html#join-kasm

Here is an example of calling the dev API with curl to create a pre-signed URL for a unauthenticated user.

curl 'https://10.0.0.137/api/public/join_kasm'   -H 'Content-Type: application/json'   --data-raw '{"api_key": "O4Ysl8F3W0vH", "api_key_secret": "HxVfVx7eloLU9I18tmwczD9etZzeY1n6", "share_id": "2f831cac" }' -k

mmcclaskey avatar Apr 24 '24 11:04 mmcclaskey

Use the /api/public/join_kasm and leave off the user_id in the JSON body of the request. If you don't specify a user_id, it will auto generate an anonymous user. The returned JSON will include a kasm_url. Append this to the end of your base URL.

I did this and indeed received a kasm_url, looking like /#/connect/join/[SHARE_ID]/[SOME_HEX]/[SOME_UUID]. When I now visit https://10.0.0.137/#/connect/join/[SHARE_ID]/[SOME_HEX]/[SOME_UUID] though, I just get bumped to https://10.0.0.137/#/staticlogin with a "Login failed".

I traced this into the kasm_api container and found a jwt.exceptions.DecodeError: Not enough segments and it kind of makes sense: My session_token is just a UUID with hex digits, definitely not a JWT as suggested by the docs at your provided URL https://www.kasmweb.com/docs/latest/developers/developer_api.html#join-kasm.

Help is appreciated!

ldericher avatar Jun 09 '24 00:06 ldericher