]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/sts: fix for wrong certificate getting picked during 53915/head
authorPritha Srivastava <prsrivas@redhat.com>
Mon, 16 Oct 2023 08:10:10 +0000 (13:40 +0530)
committerPritha Srivastava <prsrivas@redhat.com>
Thu, 22 Aug 2024 04:52:41 +0000 (10:22 +0530)
validation of a web token signature.

A boolean flag is incorrectly set to true outside the 'if'
statement, which causes an incorrect cert to be picked.

fixes: https://tracker.ceph.com/issues/54562

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
src/rgw/rgw_rest_sts.cc

index 6df53f612cde91743f992eae241fd7226fda11b5..dbe4994cfa52827c722ead050bfd2f6b325f7b69 100644 (file)
@@ -384,7 +384,6 @@ WebTokenEngine::validate_signature(const DoutPrefixProvider* dpp, const jwt::dec
                found_valid_cert = true;
                break;
               }
-              found_valid_cert = true;
             }
             if (! found_valid_cert) {
               ldpp_dout(dpp, 0) << "Cert doesn't match that with the thumbprints registered with oidc provider: " << cert.c_str() << dendl;