Apache Mesos
|
#include <http.hpp>
Public Member Functions | |
Try< bool > | approved (const Option< ObjectApprover::Object > &object) const noexceptoverride |
This method returns whether access to the specified object is authorized or not, or Error . More... | |
Public Member Functions inherited from mesos::ObjectApprover | |
virtual | ~ObjectApprover ()=default |
|
inlineoverridevirtualnoexcept |
This method returns whether access to the specified object is authorized or not, or Error
.
The Error
is returned in case of:
Object
provided by Mesos is invalidNote that this method is not idempotent; the result might change due to modifications of internal state of ObjectApprover
performed by the authorizer to keep ObjectApprover
valid.
For example, if the authorizer is backed by an external IAM, from which it fetches permissions, changing permissions for the authorization Subject in the IAM might result in the response changing from false
to true
for the same Object. Also, in this example, failure to keep permissions up-to-date due to malfunctions of the IAM/network will be reported as an Error being returned by this method until the permissions are updated successfully.
NOTE: As this method can be used synchronously by actors, it is essential that its implementation does not block. Specifically, calling blocking libprocess functions from this method can cause deadlock!
Implements mesos::ObjectApprover.