Move auth to the "run on behalf of" model

Abierto
#191 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
15/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Start by reading the service impersonation example linked in the issue and the existing token-handling code in the queuing service that talks to BlueAPI. The acceptance criteria require a new Keycloak client (requested via the UASHD helpdesk), propagation of the queuing user's identity into the token, and BlueAPI running as that user; the open question of what to do for mail-in items run by beamline staff needs a decision before any patch. Done means the token carries the queuer's identity and BlueAPI executes on their behalf, verified against identity-test.

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

Descripción

Going forward, to improve accountability, we would like to move to a model where services are able to call to the other services they require saying "i want to do X on behalf of this person".

From Neil:

Hi, yes, the functionaity is available on identity-test (it will not be available on identity (production) until 8th December at the earliest).

An example of how to use it can be found here: https://gitlab.diamond.ac.uk/keycloak/keycloak-configuration/-/blob/f0ca975f64854d58a83f153abd3757ff2705b884/utility_scripts/service_impersonation_example.py

You will also need to either request a new client with the feature enabled or request that your existing client is updated. This should be done in the usual way via the UASHD Jira helpdesk

We should give this a go in the queue. There is probably some discussion needed on who the queue is being run on behalf of if it's beamline staff doing mail-in but for the case if someone just using the queue we should just pass through whoever queued the item as the person doing the action

Acceptance Criteria

  • A new DAQ queuing service client is made in keycloak with this feature enabled
  • The identity of the person queing the item is added into the token
  • The token is passed to BlueAPI and it runs as that user
Lenguaje dominante
Python
Estrellas
0
Forks
1
Merge medio
1 d 19 h
PR fusionados (30 d)
13

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 DiamondLightSource/daq-queuing-service

Todos los issues de DiamondLightSource/daq-queuing-service

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.