From patchwork Fri Mar 5 12:16:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frode Nordahl X-Patchwork-Id: 1447795 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DsRbt50B4z9sSC for ; Fri, 5 Mar 2021 23:18:50 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 26B2C6FB96; Fri, 5 Mar 2021 12:18:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iQJcWA0QHIu4; Fri, 5 Mar 2021 12:18:44 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTP id 2134D6FB8D; Fri, 5 Mar 2021 12:18:43 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EF3D4C0011; Fri, 5 Mar 2021 12:18:42 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1B140C0017 for ; Fri, 5 Mar 2021 12:18:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E876084546 for ; Fri, 5 Mar 2021 12:18:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VEoH3OVAwIdB for ; Fri, 5 Mar 2021 12:18:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from ti0189a330-0925.bb.online.no (ti0189a330-0925.bb.online.no [88.88.218.161]) by smtp1.osuosl.org (Postfix) with ESMTP id 9357584532 for ; Fri, 5 Mar 2021 12:18:39 +0000 (UTC) From: Frode Nordahl To: dev@openvswitch.org Date: Fri, 5 Mar 2021 13:16:27 +0100 Message-Id: X-Mailer: git-send-email 2.30.0 In-Reply-To: References: MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn v2 5/9] northd-ddlog: Update RBAC rules X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This patch summarizes a series of fixes to the C northd for missing or out of date RBAC rules and updates the DDlog version of Northd accordingly. Signed-off-by: Frode Nordahl --- northd/ovn_northd.dl | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/northd/ovn_northd.dl b/northd/ovn_northd.dl index 4482cffc0..8bc6dd9f6 100644 --- a/northd/ovn_northd.dl +++ b/northd/ovn_northd.dl @@ -1257,7 +1257,8 @@ sb::Out_RBAC_Permission ( .authorization = set_singleton("name"), .insert_delete = true, .update = ["nb_cfg", "external_ids", "encaps", - "vtep_logical_switches", "other_config"].to_set() + "vtep_logical_switches", "other_config", + "transport_zones"].to_set() ). sb::Out_RBAC_Permission ( @@ -1281,7 +1282,7 @@ sb::Out_RBAC_Permission ( .table = "Port_Binding", .authorization = set_singleton(""), .insert_delete = false, - .update = ["chassis", "up"].to_set() + .update = ["chassis", "encap", "up", "virtual_parent"].to_set() ). sb::Out_RBAC_Permission ( @@ -1308,6 +1309,23 @@ sb::Out_RBAC_Permission ( .update = ["address", "chassis", "datapath", "ports"].to_set() ). +sb::Out_RBAC_Permission ( + ._uuid = 128'h2e5cbf3d_26f6_4f8a_9926_d6f77f61654f, + .table = "Controller_Event", + .authorization = set_singleton(""), + .insert_delete = true, + .update = ["chassis", "event_info", "event_type", + "seq_num"].to_set() +). + +sb::Out_RBAC_Permission ( + ._uuid = 128'hb70964fc_322f_4ae5_aee4_ff6afadcc126, + .table = "FDB", + .authorization = set_singleton(""), + .insert_delete = true, + .update = ["dp_key", "mac", "port_key"].to_set() +). + /* * RBAC_Role: fixed */ @@ -1317,7 +1335,9 @@ sb::Out_RBAC_Role ( .permissions = [ "Chassis" -> 128'h7df3749a_1754_4a78_afa4_3abf526fe510, "Chassis_Private" -> 128'h07e623f7_137c_4a11_9084_3b3f89cb4a54, + "Controller_Event" -> 128'h2e5cbf3d_26f6_4f8a_9926_d6f77f61654f, "Encap" -> 128'h94bec860_431e_4d95_82e7_3b75d8997241, + "FDB" -> 128'hb70964fc_322f_4ae5_aee4_ff6afadcc126, "Port_Binding" -> 128'hd8ceff1a_2b11_48bd_802f_4a991aa4e908, "MAC_Binding" -> 128'h6ffdc696_8bfb_4d82_b620_a00d39270b2f, "Service_Monitor"-> 128'h39231c7e_4bf1_41d0_ada4_1d8a319c0da3]