summaryrefslogtreecommitdiffstats
path: root/src/mgr
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2017-06-20 05:34:35 +0200
committerGitHub <noreply@github.com>2017-06-20 05:34:35 +0200
commit368ff5e4aad1b61d5d1bf294f0887e9f45221cee (patch)
tree2855b58acfca6f97a003c674c93b4258abf97e34 /src/mgr
parentMerge pull request #15744 from badone/wip-CID-1412579 (diff)
parentmgr: print a more helpful error message for when users lack mgr cephx caps (diff)
downloadceph-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.cc6
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;
}