Project

General

Profile

Actions

Bug #49204

open

Ceph dashboard SAML2 - 415 Unsupported Media Type

Added by Pavel Sorejs about 3 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Security & Auth
Target version:
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I am using Keycloak for SSO.

After redirect from keycloak back to ceph dashboard /auth/saml2 i get the following error:

{"status": "415 Unsupported Media Type", "detail": "Expected an entity of content type application/json, text/javascript", "request_id": "03130529-6bf2-4f37-aed1-7e4dff96c298"}

I have following hypothesis (i can't test it as creating the whole development environment for ceph is beyond my skill level for now):

Keycloak is making POST request in browser to /auth/saml2 as a form of redirect after successful login - this is asked by ceph dashboard in SAML request. Here https://github.com/ceph/ceph/blob/bdf3eebcd22d7d0b3dd4d5501bee5bac354d5b55/src/pybind/mgr/dashboard/module.py#L145 the CherryPy is clearly told to enforce JSON on input, so the error makes sense as the content-type is really application/x-www-form-urlencoded and not text/javascript.

It looks like there is @allow_empty_body annotation declared here https://github.com/ceph/ceph/blob/bdf3eebcd22d7d0b3dd4d5501bee5bac354d5b55/src/pybind/mgr/dashboard/controllers/__init__.py#L957 which looks like is supposed to counter the content-type check. Is it possible, that this annotation is missing here https://github.com/ceph/ceph/blob/bdf3eebcd22d7d0b3dd4d5501bee5bac354d5b55/src/pybind/mgr/dashboard/controllers/saml2.py#L45 ?

Also there is this - https://tracker.ceph.com/issues/48211 but for older versions, so maybe it is the same bug.


Related issues 2 (1 open1 closed)

Related to Dashboard - Bug #58657: mgr/dashboard: SAML2 - 415 Unsupported Media Type on mgr failoverIn ProgressAvan Thakkar

Actions
Related to Dashboard - Bug #48211: SAML - 415 Unsupported Media TypeCan't reproduce

Actions
Actions #1

Updated by Greg Farnum almost 3 years ago

  • Project changed from Ceph to Dashboard
  • Category deleted (msgr)
Actions #2

Updated by Ernesto Puerta almost 2 years ago

  • Category set to Security & Auth
Actions #3

Updated by Ernesto Puerta 11 months ago

  • Related to Bug #58657: mgr/dashboard: SAML2 - 415 Unsupported Media Type on mgr failover added
Actions #4

Updated by Ernesto Puerta 11 months ago

  • Related to Bug #48211: SAML - 415 Unsupported Media Type added
Actions

Also available in: Atom PDF