diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 6226f27940308..da6eb1e6ad337 100644 --- a/src/rgw/rgw_log.cc +++ b/src/rgw/rgw_log.cc @@ -435,7 +435,11 @@ int rgw_log_op(rgw::sal::Store* store, RGWREST* const rest, struct req_state *s, entry.op = op_name; - entry.identity_type = s->auth.identity->get_identity_type(); + if (s->auth.identity) { + entry.identity_type = s->auth.identity->get_identity_type(); + } else { + entry.identity_type = TYPE_NONE; + } if (! s->token_claims.empty()) { entry.token_claims = std::move(s->token_claims);