From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AF6BEB64DC for ; Mon, 26 Jun 2023 01:05:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229906AbjFZBFK (ORCPT ); Sun, 25 Jun 2023 21:05:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbjFZBFB (ORCPT ); Sun, 25 Jun 2023 21:05:01 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 831A118F for ; Sun, 25 Jun 2023 18:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687741455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HnPIjne0x1y1DoyjPxRNCutxaRJPDQqxcvlLV/KyJEA=; b=RAUtQMnpV8fiEtk9m4SnvxlxSE021Nr29HVDwHV9DePpvp+PLhrnjx5SCPbuc0Yxjk79Xk CFc5uCEOZrhh/rGfl30k75LQxDDJcLNTWmibgHHHPoz3sOo5Odl1Djar5Cilhblr6rWGIA l+OQS4DUsJWyb755VE4eAokqiijVJSI= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-310-RwTkZ2mGO82lSQJp_-ETOg-1; Sun, 25 Jun 2023 21:04:12 -0400 X-MC-Unique: RwTkZ2mGO82lSQJp_-ETOg-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-4007ea5af13so42248091cf.1 for ; Sun, 25 Jun 2023 18:04:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687741452; x=1690333452; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HnPIjne0x1y1DoyjPxRNCutxaRJPDQqxcvlLV/KyJEA=; b=WFM3HeFCnxthrW4Q+24VsZq9KJg90bWBBeLH3opCXUOZ7BR7FlylyjmWii8H7zxraL vyr3omlcx5GGvdvQUIV8PYJwedpuQ1pR6tLB3O5Qy0f0pmiOicaMZBqs83J8qpUJ/vsw qvNsuC1+mtRAnLkpALZpItDN6q2vfyokLLZJL3dj8Q2eltpMQ1w5nVny9Yp+0Klcals1 s86XQYTwSbzO/tL+mqrBLtECrvqMH2n9tyd2q6Uo6gtSJtE3Uao5m4YYmO2/z4LXaLVT IuQEhD+OByjiYffQ+NSKEO0tQfAAy0EFV2DgnSlorZWZ7gTgQbOgmKpTntmlJTUoiEfC 2A6w== X-Gm-Message-State: AC+VfDwBB9rN+/A44Sn0CzEn6mIGHJtFtM8pGmyu3hN21PkAAbGBgZvT hvo6egACjsSSBWdu2pXAf6oF6Ccg/0+o4NTansTXpuIHUEtpqsQ1JGCMVnMkJ718kLJjCe6yyeT 2HJ/D1q3GWdD2dTig1k1LlI2H X-Received: by 2002:a05:622a:1746:b0:3ff:3013:d2aa with SMTP id l6-20020a05622a174600b003ff3013d2aamr23516662qtk.12.1687741451950; Sun, 25 Jun 2023 18:04:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4idNNjnMM8gpr1GtyoBrIaFW7cf3mYtsIZ4nJK2ezWCuF96/z5OGWIK/9rLURs/Xj24jHDUg== X-Received: by 2002:a05:622a:1746:b0:3ff:3013:d2aa with SMTP id l6-20020a05622a174600b003ff3013d2aamr23516640qtk.12.1687741451626; Sun, 25 Jun 2023 18:04:11 -0700 (PDT) Received: from [10.72.13.91] ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id d26-20020aa7869a000000b0063d2dae6247sm776415pfo.77.2023.06.25.18.04.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 25 Jun 2023 18:04:11 -0700 (PDT) Message-ID: <07b01202-9c38-70a7-8701-be8992a1d17e@redhat.com> Date: Mon, 26 Jun 2023 09:04:04 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v5 00/14] ceph: support idmapped mounts Content-Language: en-US To: Aleksandr Mikhalitsyn 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 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> From: Xiubo Li In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/15/23 20:54, Aleksandr Mikhalitsyn wrote: > On Thu, Jun 15, 2023 at 2:29 PM 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-time >> > > > 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 users to set UID/GID-based MDS auth caps from ceph >> side. And users should know what has happened. > ok, we want to restrict setting of UID/GID-based permissions if there is an > idmapped mount on the client. IMHO, idmapping mounts is truly a > client-side feature > and server modification looks a bit strange to me. Yeah, agree. But without fixing the lookup issue in kclient side it will be buggy and may make some tests fail too. We need to support this more smoothly. Thanks - Xiubo >> Once users want to support the idmap mounts they should know that the >> MDS auth caps won't work anymore. > They will work, but permission rule configuration should include > non-mapped UID/GID-s. > As I mentioned here [1] it's already the case even without mount idmappings. > > It would be great to discuss this thing as a concept and synchronize > our understanding of this > before going into modification of a server side. > > [1] https://lore.kernel.org/lkml/CAEivzxcBBJV6DOGzy5S7=TUjrXZfVaGaJX5z7WFzYq1w4MdtiA@mail.gmail.com/ > > Kind regards, > Alex > >> Thanks >> >> - Xiubo >>