diff --git a/monasca_api/conf/security.py b/monasca_api/conf/security.py index d5b150f4b..f8d31f876 100644 --- a/monasca_api/conf/security.py +++ b/monasca_api/conf/security.py @@ -25,7 +25,7 @@ security_opts = [ help=''' Roles that are allowed full access to the API '''), - cfg.ListOpt('agent_authorized_roles', default=['agent'], + cfg.ListOpt('agent_authorized_roles', default=['monasca-agent'], help=''' Roles that are only allowed to POST to the API '''), diff --git a/monasca_api/tests/test_policy.py b/monasca_api/tests/test_policy.py index 6ffca43e4..42df35011 100644 --- a/monasca_api/tests/test_policy.py +++ b/monasca_api/tests/test_policy.py @@ -155,7 +155,7 @@ class TestPolicyCase(base.BaseTestCase): class RegisteredPoliciesTestCase(base.BaseTestCase): def __init__(self, *args, **kwds): super(RegisteredPoliciesTestCase, self).__init__(*args, **kwds) - self.agent_roles = ['agent'] + self.agent_roles = ['monasca-agent'] self.readonly_roles = ['monasca-read-only-user'] self.default_roles = ['monasca-user'] self.delegate_roles = ['admin'] diff --git a/releasenotes/notes/oslo-policy-345ff286820badc6.yaml b/releasenotes/notes/oslo-policy-345ff286820badc6.yaml new file mode 100644 index 000000000..92bece622 --- /dev/null +++ b/releasenotes/notes/oslo-policy-345ff286820badc6.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + ``agent_authorized_roles`` default value changed to ``monasca-agent`` to be + consistent with rest of Monasca, was configured by default to ``agent`` so + old policy configuration should be checked and adjusted accordingly.