program_key authentication should become a proper client_credentials grant

Đang mở
#369 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ruby
Lĩnh vực
api, authentication

Hướng nghiên cứu

Start by reading API::V1::ApplicationController#authenticate! and the ident_scope behavior described in the issue. Trace how the program_key path sets authentication context and how OAuth tokens represent delegated users, then decide whether this should use a client credentials grant or a separate API surface. Done means program keys no longer bypass delegation semantics, with the intended behavior covered by tests.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

problem

API::V1::ApplicationController#authenticate! accepts two credential types in the same Authorization header:

  • OAuthToken — standard user-delegated access token (RS behavior)
  • Program.program_key — app-level static key, no user delegation

the program_key path sets @current_identity = nil and @current_scopes = @current_program.scopes (the app's full registered scope list). ident_scope then returns every identity that ever authorized the app — all users, all scopes, no per-user consent.

this is a client_credentials grant wearing a trenchcoat. it bypasses the delegation model entirely.

impact on DPoP/on-behalf-of

  • DPoP binds tokens to a key pair held by the presenter. a program_key is a static secret with no presenter concept.
  • on-behalf-of (RFC 8693) assumes the initial token represents a user delegation. program_key represents no user.

direction

the program_key path should become a proper client_credentials grant with its own token, or a separate API surface with explicit non-delegated semantics. the acting_as_program boolean is a code smell for what should be a distinct authentication context.

Ngôn ngữ chính
Ruby
Star
85
Fork
72
Merge trung bình
3 ngày 12 giờ
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của hackclub/auth

Tất cả issue của hackclub/auth

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.