Documented the agent '/flags' endpoint.

Review: https://reviews.apache.org/r/46936/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3207c8b8
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3207c8b8
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3207c8b8

Branch: refs/heads/master
Commit: 3207c8b8f5af2ffe3e6219154f2f821433d2b9ff
Parents: 8e482f3
Author: Jan Schlicht <j...@mesosphere.io>
Authored: Mon May 9 15:40:46 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Mon May 9 15:44:03 2016 +0200

----------------------------------------------------------------------
 docs/endpoints/slave/flags.md | 6 +++++-
 src/slave/http.cpp            | 5 ++++-
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3207c8b8/docs/endpoints/slave/flags.md
----------------------------------------------------------------------
diff --git a/docs/endpoints/slave/flags.md b/docs/endpoints/slave/flags.md
index b2740e6..3ea38c1 100644
--- a/docs/endpoints/slave/flags.md
+++ b/docs/endpoints/slave/flags.md
@@ -13,4 +13,8 @@ Exposes the agent's flag configuration.
 
 ### AUTHENTICATION ###
 This endpoint requires authentication iff HTTP authentication is
-enabled.
\ No newline at end of file
+enabled.
+
+### AUTHORIZATION ###
+The request principal should be authorized to query this endpoint.
+See the authorization documentation for details.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/mesos/blob/3207c8b8/src/slave/http.cpp
----------------------------------------------------------------------
diff --git a/src/slave/http.cpp b/src/slave/http.cpp
index e6db54f..88fd7ab 100644
--- a/src/slave/http.cpp
+++ b/src/slave/http.cpp
@@ -351,7 +351,10 @@ string Slave::Http::FLAGS_HELP()
   return HELP(
     TLDR("Exposes the agent's flag configuration."),
     None(),
-    AUTHENTICATION(true));
+    AUTHENTICATION(true),
+    AUTHORIZATION(
+        "The request principal should be authorized to query this endpoint.",
+        "See the authorization documentation for details."));
 }
 
 

Reply via email to