From patchwork Fri Mar 5 12:16:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frode Nordahl X-Patchwork-Id: 1447791 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 4DsRbm6NGzz9sWQ for ; Fri, 5 Mar 2021 23:18:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 9248A6FB8B; Fri, 5 Mar 2021 12:18:42 +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 zq62B26wHfM4; Fri, 5 Mar 2021 12:18:41 +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 73F636FB63; Fri, 5 Mar 2021 12:18:40 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4CCAEC0018; Fri, 5 Mar 2021 12:18:39 +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 66094C0011 for ; Fri, 5 Mar 2021 12:18:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 4630784531 for ; Fri, 5 Mar 2021 12:18:37 +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 6F1mYvyigUqt for ; Fri, 5 Mar 2021 12:18:36 +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 0BE598446F for ; Fri, 5 Mar 2021 12:18:35 +0000 (UTC) From: Frode Nordahl To: dev@openvswitch.org Date: Fri, 5 Mar 2021 13:16:24 +0100 Message-Id: <12c6eac5f0876cd785c72b16c80fbd5d73906f21.1614945892.git.frode.nordahl@canonical.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: References: MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn v2 2/9] northd: Add missing RBAC rules for FDB table 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" The recently added FDB table did not get its RBAC rules which would prohibit a `ovn-controller` from updating it with RBAC enabled. Fixes: 6ec3b1259 ("MAC learning: Add a new FDB table in southbound db") Signed-off-by: Frode Nordahl --- northd/ovn-northd.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c index bafcb51e9..bb8f3032c 100644 --- a/northd/ovn-northd.c +++ b/northd/ovn-northd.c @@ -13248,6 +13248,11 @@ static const char *rbac_encap_auth[] = static const char *rbac_encap_update[] = {"type", "options", "ip"}; +static const char *rbac_fdb_auth[] = + {""}; +static const char *rbac_fdb_update[] = + {"dp_key", "mac", "port_key"}; + static const char *rbac_port_binding_auth[] = {""}; static const char *rbac_port_binding_update[] = @@ -13300,6 +13305,14 @@ static struct rbac_perm_cfg { .update = rbac_encap_update, .n_update = ARRAY_SIZE(rbac_encap_update), .row = NULL + },{ + .table = "FDB", + .auth = rbac_fdb_auth, + .n_auth = ARRAY_SIZE(rbac_fdb_auth), + .insdel = true, + .update = rbac_fdb_update, + .n_update = ARRAY_SIZE(rbac_fdb_update), + .row = NULL },{ .table = "Port_Binding", .auth = rbac_port_binding_auth,