diff options
author | Sage Weil <sage@newdream.net> | 2017-06-20 05:34:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-20 05:34:35 +0200 |
commit | 368ff5e4aad1b61d5d1bf294f0887e9f45221cee (patch) | |
tree | 2855b58acfca6f97a003c674c93b4258abf97e34 /src/mgr | |
parent | Merge pull request #15744 from badone/wip-CID-1412579 (diff) | |
parent | mgr: print a more helpful error message for when users lack mgr cephx caps (diff) | |
download | ceph-368ff5e4aad1b61d5d1bf294f0887e9f45221cee.tar.xz ceph-368ff5e4aad1b61d5d1bf294f0887e9f45221cee.zip |
Merge pull request #15697 from gregsfortytwo/wip-mgr-eaccss-20296
mgr: print a more helpful error message for when users lack mgr ceph caps
Reviewed-by: Alfredo Deza <adeza@redhat.com>
Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Diffstat (limited to 'src/mgr')
-rw-r--r-- | src/mgr/DaemonServer.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index 178a7082c3d..e8d8c8a2128 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -550,7 +550,8 @@ bool DaemonServer::handle_command(MCommand *m) if (!_allowed_command(session.get(), py_command.module, prefix, cmdctx->cmdmap, param_str_map, &py_command)) { dout(1) << " access denied" << dendl; - ss << "access denied"; + ss << "access denied; does your client key have mgr caps?" + " See http://docs.ceph.com/docs/master/mgr/administrator/#client-authentication"; cmdctx->reply(-EACCES, ss); return true; } @@ -562,7 +563,8 @@ bool DaemonServer::handle_command(MCommand *m) audit_clog->info() << "from='" << session->inst << "' " << "entity='" << session->entity_name << "' " << "cmd=" << m->cmd << ": access denied"; - ss << "access denied"; + ss << "access denied' does your client key have mgr caps?" + " See http://docs.ceph.com/docs/master/mgr/administrator/#client-authentication"; cmdctx->reply(-EACCES, ss); return true; } |