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

Aperta
#1,507 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java

Direzione di ricerca

Inizia in UaaAuthorizationEndpoint.java, su getAccessTokenForImplicitGrantOrHybrid, e rivedi il blocco implicitLock sincronizzato insieme alla issue collegata di Spring Security. Determina se il lock è ancora necessario per implicit and hybrid authorization-code grants, quindi valida la modifica rispetto alle prestazioni di concorrenza e al comportamento in presenza di race condition.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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); 
      } } }
Lingua principale
Java
Stelle
1.6k
Fork
847
Merge medio
2g 1h
PR unite (30g)
48

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudfoundry/uaa

Tutte le issue di cloudfoundry/uaa

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.