Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp13463367rwd; Sat, 24 Jun 2023 00:21:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6hlR1yVzTLiOMgnMILFUosBE45ATxndXO0sKl5J6P+HsiLA2u+mu7VOiytbHI9vx92riDw X-Received: by 2002:a05:6a00:240f:b0:64b:256:204c with SMTP id z15-20020a056a00240f00b0064b0256204cmr27414928pfh.20.1687591272844; Sat, 24 Jun 2023 00:21:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687591272; cv=none; d=google.com; s=arc-20160816; b=yHEbu9pCZKw6tR0fP0UAZ1946QBiQeyj55/+j93EGrhgEk8gv1Aye74EjPwvx/XA3X Eem6P6lXFZUmKOUo8Qb7IqHbnPIfAJvQ3xhFE6EPGMD0/2e2OA6iMz5GNDD6PRkxSoi+ YqHtSpz/ktUXeBijSqaZIamUdyJNdFh0GAkBoP6lMGS2tCvA2ej1Nw1AxdrgPexWyLVV +p4eKyqHWdd15UHR91oyKovArp8lIvvsM+h6qAKiB5T5i+3omyZO3DTVQtbD+eT8ww+o NsCxicDa+nSqb6ZMG0cJgQG7SS5v+ALrYPOgTOLWneSLrgEKbtlaxX/z0OxbNxd6gagb S9IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=bZz/LQgUAu95ZYcCnmkTkIGQIutFEz+JhRbHpbTz8PY=; fh=05L4R9yMQt9bPqRDIFqgQvqSZff52Z1mu5rzjxtDeZg=; b=Hdp8YGA+G6VHUDoel57yDKYWtSnBsWJFIYsH0duKzFWQFIcmkPjnLEoIPcvAF7AXKS vHVjbRqftvd3Tf+ydJ9yUW34Hwk9d3IMBa2h4syptKqPCx0FsMG9+AncPpynShCnWotg SEJZ9k/UlRnAm59yeTkdQxRtWVDWbAJP8P4NvYLelYLTBLlhMdtNztbXLRr0NcuaxPSm vYCpqNX/4inU3aidK0m7wxik94m/6AzSiT8ytMCUR6X235WdMmJ8u6uS3zZNdYJrisPj 0pbHdgz+zjJtkjd1+KHK4XbpBcyfgPMmRBxbCjEWY00TqnNdI1bYx/BhQEL5dCdJF+CA oyqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=lcoZWSG5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ei34-20020a056a0080e200b0064f44863407si708488pfb.384.2023.06.24.00.21.01; Sat, 24 Jun 2023 00:21:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=lcoZWSG5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231386AbjFXHLn (ORCPT + 99 others); Sat, 24 Jun 2023 03:11:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229841AbjFXHLl (ORCPT ); Sat, 24 Jun 2023 03:11:41 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57D542710 for ; Sat, 24 Jun 2023 00:11:39 -0700 (PDT) Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 892E13F117 for ; Sat, 24 Jun 2023 07:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1687590696; bh=bZz/LQgUAu95ZYcCnmkTkIGQIutFEz+JhRbHpbTz8PY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=lcoZWSG59KZnXEYNQeshuhtgBo9tD9rogUiJnchakHXVN4ZI7hF7paIjGk73se9ZC Rc1bp30RS96vrrvy3k2RgujnnrbtrAi/QKXgx9fQNqgNptYJDxgz+tVWpIHeuzf4t+ MwAdexYScR9TUeOD9Al84ZcztynrwXvqRFCAJsyrJTydlAsIQov945yWEisE0iRIlN t/17BIejjIVEkpzg/6AXiiBtwbfRF3sW1QURFJ3tRol7VPArVZbBZDwjSO8/69K44T 2R6aNaVI2tmJ7Zph66LvcuqSUfJxK2GZ1Gqwvn5W621gY+QfRqvtnLAZwQGC6aApgc LrGeG64SL41Gg== Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-569e7aec37bso16110197b3.2 for ; Sat, 24 Jun 2023 00:11:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687590695; x=1690182695; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bZz/LQgUAu95ZYcCnmkTkIGQIutFEz+JhRbHpbTz8PY=; b=F/TKUHK7bL7R67uzJin6F0aCH03tUZfFchKySLwR1v00WzALd4hFVq749Tc32uDHVX M94BworwS/XxiU0jDg2LVkO3gtEgEfMjLug2Dh0pB+irvShpU+ObvGLRN38UmRWahiXx AtYIH/v8JZV2q/tYb62J6o0A6viaf6OhFVXJLVJ4YxInPrmZuQOEfRT5qH95Rx5lWhJw lsmUODlDSxWuV/bHHK0l6jgIlFFYoI+itCEJxnJUM8XlkjdkpZNzbvhoUejM6NwqAWlL +EaHaU3VPJHoqvpBt/uqaTYPjUPXn9vUV+aVk8Ivvk24UwHMO6DdePsXNB4FMRre81l+ 1BAQ== X-Gm-Message-State: AC+VfDytMP8DI5ZgkSCX+EcGxcqZ+tokFNGHNKqDaWj06oCYx+TaIyQY XjpnIeictVHmXeCwbFBRyG6D/dKisCRetaTsW5yS0/dKbRDt5rNvsZ/fSKYZLGo20/XTDDv3yua k5vQviQaMBX0wsXfW5UOYo/9BKAMj05X/Q/PDwEtIKJ9Gk6M3D9HL4abdSA== X-Received: by 2002:a25:aa90:0:b0:c10:cc4:69f4 with SMTP id t16-20020a25aa90000000b00c100cc469f4mr1171178ybi.26.1687590695478; Sat, 24 Jun 2023 00:11:35 -0700 (PDT) X-Received: by 2002:a25:aa90:0:b0:c10:cc4:69f4 with SMTP id t16-20020a25aa90000000b00c100cc469f4mr1171176ybi.26.1687590695243; Sat, 24 Jun 2023 00:11:35 -0700 (PDT) MIME-Version: 1.0 References: <20230608154256.562906-1-aleksandr.mikhalitsyn@canonical.com> <20230609-alufolie-gezaubert-f18ef17cda12@brauner> <977d8133-a55f-0667-dc12-aa6fd7d8c3e4@redhat.com> <626175e2-ee91-0f1a-9e5d-e506aea366fa@redhat.com> <64241ff0-9af3-6817-478f-c24a0b9de9b3@redhat.com> In-Reply-To: <64241ff0-9af3-6817-478f-c24a0b9de9b3@redhat.com> From: Aleksandr Mikhalitsyn Date: Sat, 24 Jun 2023 09:11:24 +0200 Message-ID: Subject: Re: [PATCH v5 00/14] ceph: support idmapped mounts To: Xiubo Li Cc: Gregory Farnum , Christian Brauner , stgraber@ubuntu.com, linux-fsdevel@vger.kernel.org, Ilya Dryomov , Jeff Layton , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 24, 2023 at 3:37=E2=80=AFAM Xiubo Li wrote: > > [...] > > > > > > > > > I thought about this too and came to the same conclusion, that > UID/GID > > > > based > > > > restriction can be applied dynamically, so detecting it on mount-t= ime > > > > helps not so much. > > > > > > > For this you please raise one PR to ceph first to support this, and = in > > > the PR we can discuss more for the MDS auth caps. And after the PR > > > getting merged then in this patch series you need to check the > > > corresponding option or flag to determine whether could the idmap > > > mounting succeed. > > > > I'm sorry but I don't understand what we want to support here. Do we > want to > > add some new ceph request that allows to check if UID/GID-based > > permissions are applied for > > a particular ceph client user? > > IMO we should prevent user to set UID/GID-based permisions caps from > ceph side. > > As I know currently there is no way to prevent users to set MDS auth > caps, IMO in ceph side at least we need one flag or option to disable > this once users want this fs cluster sever for idmap mounts use case. How this should be visible from the user side? We introducing a new kernel client mount option, like "nomdscaps", then pass flag to the MDS and MDS should check that MDS auth permissions are not applied (on the mount time) and prevent them from being applied later while session is active. Like that? At the same time I'm thinking about protocol extension that adds 2 additional fields for UID/GID. This will allow to correctly handle everything. I wanted to avoid any changes to the protocol or server-side things. But if we want to change MDS side, maybe it's better then to go this way? Thanks, Alex > > Thanks > > - Xiubo >