Move auth to the "run on behalf of" model

オープン
#191 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Python
スター
0
フォーク
1
平均マージ
1日 19時間
マージ済み PR(30日)
13

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DiamondLightSource/daq-queuing-service のほかの issue

DiamondLightSource/daq-queuing-service の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。