[
https://issues.apache.org/jira/browse/MESOS-5406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15295989#comment-15295989
]
Jay Guo commented on MESOS-5406:
--------------------------------
Just wanna make sure I understand it correctly, this story is to catch
contradictory acls while creating authorizer, besides `SetQuota` and
`UpdateQuota`. For example, following test case should pass (both NONE and ANY
for the same principle):
{code}
// Should fail to create authorizer with acls that specifies
// both NONE and ANY for the same principle
TYPED_TEST(AuthorizationTest, ContradictoryACLs)
{
ACLs acls;
{
mesos::ACL::UpdateQuota* acl = acls.add_update_quotas();
acl->mutable_principals()->add_values("foo");
acl->mutable_roles()->set_type(mesos::ACL::Entity::ANY);
}
{
mesos::ACL::UpdateQuota* acl = acls.add_update_quotas();
acl->mutable_principals()->add_values("foo");
acl->mutable_roles()->set_type(mesos::ACL::Entity::NONE);
}
Try<Authorizer*> create = TypeParam::create(parameterize(acls));
ASSERT_ERROR(create);
}
{code}
> Validate ACLs on creating an instance of local authorizer.
> ----------------------------------------------------------
>
> Key: MESOS-5406
> URL: https://issues.apache.org/jira/browse/MESOS-5406
> Project: Mesos
> Issue Type: Improvement
> Components: security
> Reporter: Alexander Rukletsov
> Assignee: Jay Guo
> Labels: mesosphere, security
>
> Some combinations of ACLs are not allowed, for example, specifying both
> {{SetQuota}} and {{UpdateQuota}}. We should capture such issues and error out
> early.
> This ticket aims to add as many validations as possible to a dedicated
> {{validate()}} routine, instead of having them implicitly in the codebase.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)