Move auth to the "run on behalf of" model

Aperta
#191 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Python
Stelle
0
Fork
1
Merge medio
1g 19h
PR unite (30g)
13

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DiamondLightSource/daq-queuing-service

Tutte le issue di DiamondLightSource/daq-queuing-service

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.