Matt & Allain,
I think it is the current upstream design (https://docs.openstack.org/neutron/latest/admin/config-qos.html): “QoS
policies are only created by admins with the default policy.json.
Therefore, you should have the cloud operator set them up on behalf of the cloud projects.”
From the default policy.json, e.g. “create/update/delete” operation is for admin only and “get” operation is for any user. Do you see any gap with
this design?
"create_policy": "rule:admin_only",
"get_policy": "rule:regular_user",
"update_policy": "rule:admin_only",
"delete_policy": "rule:admin_only",
Best Regards,
Le, Huifeng
I am not sure. The qos_policy_id attribute does not have “enforce_policy” set in its attribute definition so I am going to guess that there is no checking at all for it. I don’t have a system setup to test
this at the moment, but I am going to guess that you could end up attaching a network to a qos_policy_id that is owned by a different tenant. If so, then that is an issue that should be addressed.
Allain
Allain Legacy, Software Developer, Wind River
direct 613.270.2279 fax 613.492.7870 skype allain.legacy
350 Terry Fox Drive, Suite 200, Ottawa, Ontario, K2K 2W5
From: Peters, Matt [mailto:Matt.Peters@windriver.com]
Sent: Monday, October 15, 2018 12:55 PM
To: Le, Huifeng
Cc: starlingx-discuss@lists.starlingx.io
Subject: Re: [Starlingx-discuss] Question about patch upstreaming for 1e9a089
Hi Allain,
Do you know why the standard qos_policy_id attribute of the network would not hit this problem? I don’t even see them reference this field in the policy.json, so does it just permit anything to be changed by
the tenant unless it is explicitly defined?
http://crucible.wrs.com/changelog/CGCS_github_neutron?cs=1e9a089
-Matt
From: Le, Huifeng [mailto:huifeng.le@intel.com]
Sent: Sunday, October 14, 2018 10:24 PM
To: Peters, Matt
Cc: starlingx-discuss@lists.starlingx.io; Qin, Kailun
Subject: Question about patch upstreaming for 1e9a089
Hi Matt,
We’re looking into the patch 1e9a089, which target to solve the issue of “CGTS-2408: bypass policy check when setting attribute to None.”
After investigating this issue, it is found that this issue will only happen for attribute which need to meet below conditions:
(1) the validate rule is: “type: uuid_or_none”
(2) the “enforce_policy” should be set to “True” and the policy needs to be defined in etc/policy.json
(3) the check policy uses “tenant_id” for owner check
The only found attribute which will be impacted by this issue in STX is “wrs-tm:qos” which will be removed later after STX applying upstreaming QOS API. Since no other impacted attributes can be found in upstream (or could you please share
with us if you see any other attributes which may be impacted by this issue?), What’s your proposal for upstreaming or Do you think holding on this fix is make sense for now?
Thank much!
Best Regards,
Le, Huifeng