✨(feature) Resource server: accept tokens issued by menshen (HTTP Basic introspection)

Abierto
#3,046 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
django, python

Línea de trabajo

Start in core/external_api/backends.py and the OIDC_RS_BACKEND_CLASS setting, then compare with django-lasuite's ResourceServerBackend, which sends client_id and client_secret in the introspection body. The issue leaves open whether the fix belongs here, in django-lasuite, or in menshen, so confirm with maintainers before writing code. Done means an opt-in Basic-auth introspection backend with tests, and behaviour unchanged when the setting is absent.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

backend
What problem do you want to fix?

Docs' resource-server API (/external_api/v1.0/) rejects tokens issued by menshen, La Suite's token-exchange server. django-lasuite's ResourceServerBackend sends client_id and client_secret in the introspection request body (client_secret_post). menshen's introspection endpoint accepts only HTTP Basic (client_secret_basic), answers 401, and every request carrying a menshen token fails with SuspiciousOperation: Could not fetch introspection.

Context: master's thesis at JMU Würzburg in collaboration with La Suite, discussed with Samuel Paccoud @sampaccoud . The client is a desktop agent that reads a user's own documents through the external API after exchanging the user's token at menshen.

Possible solution?

An opt-in BasicAuthResourceServerBackend in core/external_api/backends.py, selected with the existing setting OIDC_RS_BACKEND_CLASS, that sends the client credentials as HTTP Basic and only token in the body. Nothing changes unless the setting is used. I have this implemented with tests and documentation and can open it as a draft PR once you tell me it is welcome here.

Do you have an alternative?

Two other homes for the same fix: a setting for the client authentication method in django-lasuite, which would solve it for every La Suite application using its resource server, or menshen also accepting client_secret_post. Which do you prefer? I will move the change wherever you think it belongs.

Upload

No response

Contact Details

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct
Lenguaje dominante
TypeScript
Estrellas
17k
Forks
705
Merge medio
4 d 13 h
PR fusionados (30 d)
47

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de suitenumerique/docs

Todos los issues de suitenumerique/docs

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.