Wenzhe Zhou has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18468 )

Change subject: jwt: add test for fetching JWKS via URL
......................................................................


Patch Set 13:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/18468/13/src/kudu/util/jwt-util-internal.h
File src/kudu/util/jwt-util-internal.h:

http://gerrit.cloudera.org:8080/#/c/18468/13/src/kudu/util/jwt-util-internal.h@244
PS13, Line 244: JWKSSnapshot
If JWKS is loaded from remote URL, JWKSSnapshot could be updated. We should 
define a destructor function, which clean hs_key_map_, rsa_pub_key_map_ and 
ec_pub_key_map_.


http://gerrit.cloudera.org:8080/#/c/18468/13/src/kudu/util/jwt-util.cc
File src/kudu/util/jwt-util.cc:

http://gerrit.cloudera.org:8080/#/c/18468/13/src/kudu/util/jwt-util.cc@202
PS13, Line 202:       
RETURN_NOT_OK(HSJWTPublicKeyBuilder::CreateJWKPublicKey(kv_map, &jwt_pub_key));
              :       jwks_->AddHSKey(key_id, jwt_pub_key);
> I took a closer look at the code, and I'm not sure I understand what's are
Thanks to catch memory leak issue. Agree to change to unique pointer to avoid 
memory leak.
There is another memory leak related to saved public keys in jwks_. We should 
define a destructor for JWKSSnapshot to clean three maps.



--
To view, visit http://gerrit.cloudera.org:8080/18468
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ief272c813b62e789d747a88e1f3be8c406eed3f8
Gerrit-Change-Number: 18468
Gerrit-PatchSet: 13
Gerrit-Owner: Andrew Wong <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>
Gerrit-Comment-Date: Sat, 12 Nov 2022 00:17:57 +0000
Gerrit-HasComments: Yes

Reply via email to