MCPcopy Create free account
hub / github.com/apache/impala / Authorize

Method Authorize

be/src/rpc/rpc-mgr-test.h:202–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200 }
201
202 virtual bool Authorize(const google::protobuf::Message* req,
203 google::protobuf::Message* resp, RpcContext* context) override {
204 if (!IsKerberosEnabled()) {
205 const RemoteUser& remote_user = context->remote_user();
206 if (remote_user.username() != "impala") {
207 mem_tracker_.Release(context->GetTransferSize());
208 context->RespondFailure(kudu::Status::NotAuthorized(
209 Substitute("$0 is not allowed to access PingService",
210 remote_user.ToString())));
211 return false;
212 }
213 return true;
214 } else {
215 return rpc_mgr_->Authorize("PingService", context, mem_tracker());
216 }
217 }
218
219 virtual void Ping(const PingRequestPB* request, PingResponsePB* response, RpcContext*
220 context) override {

Callers

nothing calls this directly

Calls 7

IsKerberosEnabledFunction · 0.85
NotAuthorizedFunction · 0.85
SubstituteFunction · 0.85
ReleaseMethod · 0.45
GetTransferSizeMethod · 0.45
RespondFailureMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected