disable reuse_access_token — bypasses RequirementCheck and blocks DPoP

Đang mở Phù hợp với người mới
#367 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ó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
70/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ruby
Lĩnh vực
authentication

Hướng nghiên cứu

Mở config/initializers/doorkeeper.rb và tìm cài đặt reuse_access_token. Đọc ngữ cảnh của luồng ủy quyền và kiểm tra cài đặt ảnh hưởng thế nào đến việc tái sử dụng token và thực thi trình xác thực. Xóa hoặc chú thích cài đặt, sau đó xác nhận mỗi lần ủy quyền đều tạo token mới và chạy đầy đủ trình xác thực; theo dõi mức tăng của bảng token sau khi triển khai.

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

Mô tả

bug

problem

doorkeeper is configured with reuse_access_token. if a user has already authorized an app and visits /oauth/authorize again, doorkeeper returns the existing token without re-running resource_owner_authenticator — which means the RequirementCheck.passes? gate we just added never fires.

a user who authorized an app before an AppRequirement was added sails through on re-authorization because doorkeeper hands back the old token.

also fundamentally incompatible with DPoP (RFC 9449), which binds tokens to key pairs — two different clients should get different tokens even for the same user+scope.

fix

remove or comment out reuse_access_token in config/initializers/doorkeeper.rb. every authorization mints a fresh token.

behavioral change: existing apps will stop getting reused tokens. more rows in the tokens table, every authorize flow runs the full authenticator. needs monitoring on deploy.

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.