Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Kasm OpenID Configueration failing with a "Missing access token parameter" error #51

Closed
1 task done
obadaahmar opened this issue Apr 3, 2024 · 5 comments
Closed
1 task done

Comments

@obadaahmar
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Kasm is facing an "Internal Error" whenever I try to authenticate via Authentik's OpenID setup, the logs spits out this error: "oauthlib/oauth2/rfc6749/parameters.py", line 451, in validate_token_parameters\noauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter."

Expected Behavior

To be able to use OpenID (OAuth or OIDC) to login to KASM, in this case using Authentik's OpenID feature.

Steps To Reproduce

  1. Go to 'kasm.domain.tld'
  2. Click on 'login via Authentik'
  3. Get"Internal Error" page.

Screenshots
Included are the Authentik and Kasm OpenID setup:
1
2
3
4
5
6

Application authroized log from Authentik:

Context
{
    "asn": {
        "asn": 43357,
        "as_org": "Owl Limited",
        "network": "103.136.147.0/24"
    },
    "geo": {
        "lat": -33.8715,
        "city": "Sydney",
        "long": 151.2006,
        "country": "AU",
        "continent": "OC"
    },
    "flow": "4a09a248d5cexxxxxxxxxxxxxxxxxxxxxx",
    "scopes": "profile email openid",
    "http_request": {
        "args": {
            "scope": "email openid profile",
            "state": "708228d4803e4907870cdbxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "client_id": "cGjahZGUW7dxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "redirect_uri": "https://kasm.domain.tld/api/oidc_callback",
            "response_type": "code"
        },
        "path": "/api/v3/flows/executor/default-provider-authorization-implicit-consent/",
        "method": "GET",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"
    },
    "authorized_application": {
        "pk": "d2d9f364xxxxxxxx",
        "app": "authentik_core",
        "name": "Kasm",
        "model_name": "application"
    }
}
User
{
    "pk": 9,
    "email": "[email protected]",
    "username": "firstlast"
}

Environment

- OS: Unraid 6.12.8
- How docker service was installed: Using the Unraid's native docker to install this image: lscr.io/linuxserver/kasm:latest

CPU architecture

x86-64

Docker creation

docker run
  -d
  --name='kasm'
  --net='watan-network'
  --privileged=true
  -e TZ="Australia/Sydney"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="Watan"
  -e HOST_CONTAINERNAME="kasm"
  -e '--admin-password'='xxxxx'
  -e '--user-password'='xxxxx'
  -e 'KASM_PORT'='6333'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='https://[IP]:[PORT:3000]'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/kasm-logo.png'
  -p '3000:3000/tcp'
  -p '6333:6333/tcp'
  -v '/mnt/user/appdata/kasm':'/opt':'rw'
  -v '/mnt/user/appdata/kasm/profiles':'/profiles':'rw' 'lscr.io/linuxserver/kasm:latest'

Container logs

"message": "Unhandled exception occurred\nTraceback (most recent call last):\n  File \"cherrypy/_cprequest.py\", line 628, in respond\n  File \"cherrypy/_cprequest.py\", line 687, in _do_respond\n  File \"cherrypy/lib/encoding.py\", line 219, in __call__\n  File \"cherrypy/_cpdispatch.py\", line 54, in __call__\n  File \"utils.py\", line 99, in wrapper\n  File \"client_api.py\", line 952, in oidc_callback\n  File \"authentication/oidc/__init__.py\", line 52, in process_callback\n  File \"requests_oauthlib/oauth2_session.py\", line 360, in fetch_token\n  File \"oauthlib/oauth2/rfc6749/clients/base.py\", line 427, in parse_request_body_response\n  File \"oauthlib/oauth2/rfc6749/parameters.py\", line 441, in parse_token_response\n  File \"oauthlib/oauth2/rfc6749/parameters.py\", line 451, in validate_token_parameters\noauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter."
Copy link

github-actions bot commented Apr 3, 2024

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@LinuxServer-CI
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@aldervall
Copy link

Getting this on Zitadel also.

Unhandled exception occurred
Traceback (most recent call last):
File "cherrypy/_cprequest.py", line 628, in respond
File "cherrypy/_cprequest.py", line 687, in _do_respond
File "cherrypy/lib/encoding.py", line 219, in call
File "cherrypy/_cpdispatch.py", line 54, in call
File "utils.py", line 99, in wrapper
File "client_api.py", line 947, in oidc_callback
KeyError: 'state'

@LinuxServer-CI
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@LinuxServer-CI LinuxServer-CI closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2024
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Aug 16, 2024
Copy link

This issue is locked due to inactivity

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

3 participants