You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2023/04/17 21:05:59 UTC

[kudu] branch master updated: [util] remove unused JWT-related code

This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new 9d5539daf [util] remove unused JWT-related code
9d5539daf is described below

commit 9d5539daf0bdd7f8b42a5c4bab0aaeb198f37f2b
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Mon Apr 17 12:34:43 2023 -0700

    [util] remove unused JWT-related code
    
    This patch doesn't contain any functional changes.
    
    Change-Id: I18bfc17a2caf52a632a62f5772b676d6a9362fde
    Reviewed-on: http://gerrit.cloudera.org:8080/19759
    Reviewed-by: Attila Bukor <ab...@apache.org>
    Tested-by: Kudu Jenkins
---
 src/kudu/rpc/messenger.h |  1 -
 src/kudu/util/jwt.h      | 15 ---------------
 2 files changed, 16 deletions(-)

diff --git a/src/kudu/rpc/messenger.h b/src/kudu/rpc/messenger.h
index 127e7880d..c352c1e13 100644
--- a/src/kudu/rpc/messenger.h
+++ b/src/kudu/rpc/messenger.h
@@ -384,7 +384,6 @@ class Messenger {
     return token_verifier_;
   }
 
-  const JwtVerifier* jwt_verifier() const { return jwt_verifier_.get(); }
   JwtVerifier* mutable_jwt_verifier() { return jwt_verifier_.get(); }
 
   std::optional<security::SignedTokenPB> authn_token() const {
diff --git a/src/kudu/util/jwt.h b/src/kudu/util/jwt.h
index 990c3b900..b4f321e86 100644
--- a/src/kudu/util/jwt.h
+++ b/src/kudu/util/jwt.h
@@ -34,19 +34,4 @@ class JwtVerifier {
   virtual Status VerifyToken(const std::string& bytes_raw, std::string* subject) const = 0;
 };
 
-// Minimal implementation of a JWT verifier to be used when a more full-fledged
-// implementation is not available.
-class SimpleJwtVerifier : public JwtVerifier {
- public:
-  SimpleJwtVerifier() = default;
-  ~SimpleJwtVerifier() override = default;
-  Status Init() override { return Status::OK(); }
-  Status VerifyToken(const std::string&  /*bytes_raw*/,
-                     std::string*  /*subject*/) const override {
-    return Status::NotAuthorized("JWT verification not configured");
-  }
- private:
-  DISALLOW_COPY_AND_ASSIGN(SimpleJwtVerifier);
-};
-
 } // namespace kudu