Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impl oidc #1887

Merged
merged 14 commits into from
May 8, 2024
Merged

impl oidc #1887

merged 14 commits into from
May 8, 2024

Conversation

motoki317
Copy link
Member

@motoki317 motoki317 commented Jul 24, 2023

traefik-forward-authや別traQインスタンスでとりあえず動くような、Authorization Code Flowを利用した一部分のみの実装
どちらも現在のOAuth2で実際事足りているが、主に興味本位で実装した

limitations

  • (元々) OAuth2のimplicit flowが未実装
    • response_mode で fragment をサポートしていない
      • response_type で token, id_token をサポートする場合、セキュリティ上 fragment に乗せる必要があるらしい
    • grant_type で implicit をサポートしていない
  • id_token_signing_alg_values_supported で RS256 をサポートしていない
    • OIDC spec では必要と書かれているが、必要...?
    • 現在は決め打ちで ES256 だけ
    • ちなみに Authorization Code Flow の場合はjwtにsignしない none でもいいらしい

マージしたあとに必要な改修:

  • traQ UIのconsentの画面でopenid, profile, emailスコープの説明が必要
  • bot-consoleでopenid, profile, emailスコープを登録できるようにする

refs

イメージをビルドするためのコマンドメモ
docker buildx build --platform "linux/amd64,linux/arm64" --build-arg "TRAQ_VERSION=3.15.1-p1" --build-arg "TRAQ_REVISION=$(git rev-parse --short HEAD)" -t registry.toki317.dev/pub/traq:3.15.1-p1 --push .

@motoki317 motoki317 force-pushed the impl/oidc branch 2 times, most recently from f479e8d to 90a6a05 Compare July 25, 2023 02:51
@motoki317 motoki317 marked this pull request as ready for review September 30, 2023 03:50
@motoki317 motoki317 force-pushed the impl/oidc branch 2 times, most recently from 54b11a8 to 10b0812 Compare November 1, 2023 05:53
router/v3/users.go Outdated Show resolved Hide resolved
cmd/serve.go Outdated Show resolved Hide resolved
service/oidc/userinfo.go Outdated Show resolved Hide resolved
@motoki317
Copy link
Member Author

email scopeでフェイク値を返すくらいならサポートしないほうが良さそうなので消す

@motoki317 motoki317 merged commit d1bcc3f into master May 8, 2024
10 checks passed
@motoki317 motoki317 deleted the impl/oidc branch May 8, 2024 06:27
motoki317 added a commit that referenced this pull request May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants