Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Proposal: Default-Roles configurable via property

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java

調査の方向性

src/main/java/org/ohdsi/webapi/shiro/management/AtlasSecurity.java にあるハードコードされたデフォルトロールから始め、既存の security.ad.default.import.group プロパティと比較します。提案されている security.default.roles 設定を OIDC およびその他の認証にどのように適用すべきか、また OIDC roles-claim の代替案を対象範囲に含めるかどうかを判断します。データベースの準備なしでデフォルトロールを設定でき、サポートされている認証パスについてその動作がカバーされていれば完了です。

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

説明

Current Behavior

When Webapi is setup with e.g. OIDC and a new User signs in, it defaults to the public role. Without any preparation on the database, an admin has to set the actual roles afterwards. It would be more comfortable if the default roles could be configurable, similar to the User-Import from AD via the property security.ad.default.import.group.

The default role is hardcoded here: https://github.com/OHDSI/WebAPI/blob/3f9e90c5a62dac4557f34f85b2d0ce70d58b439d/src/main/java/org/ohdsi/webapi/shiro/management/AtlasSecurity.java#L79

Proposal

Define a new property security.default.roles, that sets the default roles:

// in AtlasSecurity.java
@Value("${security.default.roles}#{T(java.util.Set).of('public')}")
protected Set<String> defaultRoles;

This would apply to all authentications.

Alternative for OIDC

Allow to define a roles claim in the access token. By default Keycloak already sets this claim and pac4j parses it.
May add a property in webapi, that switches interpreting of the supplied roles. The huge advantage here is, that authorization can be managed by the IDP/Keycloak.

主要言語
Java
スター
153
フォーク
186
平均マージ
2日 12時間
マージ済み PR(30日)
13

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

OHDSI/WebAPI のほかの issue

OHDSI/WebAPI の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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