UAA perform badly on authorizing/issuing token with multiple concurrent users ( 2000 concurrent users)

Đang mở
#1,507 1 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
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java

Hướng nghiên cứu

Bắt đầu trong UaaAuthorizationEndpoint.java tại getAccessTokenForImplicitGrantOrHybrid và xem xét block implicitLock được synchronized cùng với issue Spring Security được liên kết. Xác định liệu lock còn cần thiết cho implicit and hybrid authorization-code grants hay không, sau đó xác thực thay đổi dựa trên hiệu năng đồng thời và hành vi khi xảy ra race condition.

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

Mô tả

unscheduled
What version of UAA are you running?

We use cloudfoundry-identity-uaa-4.14.0.war

How are you deploying the UAA?

In production environment, we have deployed UAA in Tomcat 8. We have 3 UAA nodes running with a Load Balancer to forward requests. We use F5 APM as IDP

What did you expect to see? What goal are you trying to achieve with the UAA?

We have 3185814 records in users table, 5434714 records in Groups table and 6266156 records in group_membership table.
We are working on performance testing and expect UAA to authorize / issue token below 2 seconds with 2000 concurrent users.

What did you see instead?

So, would it make sense to remove “synchronized” block here since “ImplicitGrantService” has been deprecated?

Here is the code:

      private OAuth2AccessToken getAccessTokenForImplicitGrantOrHybrid(TokenRequest tokenRequest, OAuth2Request 
                                                          storedOAuth2Request, OAuth2Request storedOAuth2Request,  String 
                                                       grantType ) throws OAuth2Exception { 

       // These 1 method calls have to be atomic, otherwise the ImplicitGrantService can have a race condition //where 
       // one thread removes the token request before another has a chance to redeem it. 
       synchronized (this.implicitLock) { 
             switch (grantType) { 
                 case "implicit": 
                    return getTokenGranter().grant(grantType, new ImplicitTokenRequest(tokenRequest, storedOAuth2Request)); 
                 case "authorization_code": 
                    return getHybridTokenGranterForAuthCode().grant(grantType, new ImplicitTokenRequest(tokenRequest, storedOAuth2Request)); 
                 default: 
                    throw new OAuth2Exception(OAuth2Exception.INVALID_GRANT); 
      } } }
Ngôn ngữ chính
Java
Star
1.6k
Fork
847
Merge trung bình
2 ngày 1 giờ
Pull request đã merge (30 ngày)
48

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 cloudfoundry/uaa

Tất cả issue của cloudfoundry/uaa

Issue tương tự

Thêm issue về Java

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.