Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15D60C433B4 for ; Mon, 26 Apr 2021 12:53:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B7C3C61041 for ; Mon, 26 Apr 2021 12:53:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233507AbhDZMyN (ORCPT ); Mon, 26 Apr 2021 08:54:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233422AbhDZMyC (ORCPT ); Mon, 26 Apr 2021 08:54:02 -0400 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1946CC061574 for ; Mon, 26 Apr 2021 05:53:21 -0700 (PDT) Received: by mail-qk1-x731.google.com with SMTP id x11so56224245qkp.11 for ; Mon, 26 Apr 2021 05:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Jdq9xGtmMeel22o86JoKo4dUVDa9WqsZT93RHU0Z5d0=; b=RHoXesZo7tZKltr/YLjWxRO8y7aE/Z9SBPpi+7L5jqY+xd7A0sjtqk8f9UCPVM1OSK b4eTmKFszBsV3le1ajmJ+wdiu5kKMKBb5DeRPtHcfOyWvMJ2iVOZN/XA4Dw2GKu17jaz 371wxkq3AGuQNxmkFdvy3AnSZKrYNBUPjM7WY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Jdq9xGtmMeel22o86JoKo4dUVDa9WqsZT93RHU0Z5d0=; b=Zb8u0MeIA32dJibXUQRmYjpBa9KVd5alZaY/AqzDrbDBg5/Ocf4yjXaR0SkJhjlRJT NiTtl5+uK5KlS7sTqqBt9Totv7MxupWod9Z33UkzG9DeV1pC++PrCNZcVW4hedhLAsrY Zm9Klih2oSjZyCHKJ4jNZl69LmAr5PITFP68+36E8HScRc6bdHaImBjJO/HjGft81a/F wRxNokS61WWFS00N7+sbkSFtXvxnZ8bAwQoGG1sNmyBqkLzmyH88rmZy0LUy2hFSQrxC DwazDq5ekJAQgFZSifflp89w52Tdezei96uSe1rYlu3ZBWmOBbJ/hvqS2OEKJzhz+0F5 lcCA== X-Gm-Message-State: AOAM531FuBRAQFvzJs/BWr434+Oq6Z/t/x6wquuzY/L10Ov2Pc9GC58E AikB5g/8F8Oleb9zT39D/6BgO/TL1eOwIQ== X-Google-Smtp-Source: ABdhPJzF6faz35rFfy9UM6GFJ2Fa3uK4LPjx6kAc7h50mAzXgXNR6d+rgjQwwBzgkgvRYXXcDvhqRw== X-Received: by 2002:a37:aa54:: with SMTP id t81mr16804225qke.44.1619441600347; Mon, 26 Apr 2021 05:53:20 -0700 (PDT) Received: from fedora.pebenito.net (pool-96-234-173-17.bltmmd.fios.verizon.net. [96.234.173.17]) by smtp.gmail.com with ESMTPSA id m124sm11031732qkc.70.2021.04.26.05.53.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Apr 2021 05:53:19 -0700 (PDT) Subject: Re: [PATCH] cockpit web admin system To: Dominick Grift , Russell Coker Cc: selinux-refpolicy@vger.kernel.org, Matej Marusak References: From: Chris PeBenito Message-ID: <574c5faf-0c19-8b9a-3bfe-a71d82a1f2e6@ieee.org> Date: Mon, 26 Apr 2021 08:47:27 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 4/20/21 9:49 AM, Dominick Grift wrote: > Russell Coker writes: > >> I took this from the rawhide policy and adapted it to work with refpolicy. >> >> Probably not ready for merging yet, let me know what should be changed. > > Its been a while since I played with cockpit > > Theres one thing that I want to mention though, instead of login the > confined users in with their login shell domain consider confining the > cockpit-bridge instead and make it log users in with bridge context > instead of the login shell context. Do you have an example of permissions that would be concerning? > Because otherwise you'll end up extending the login shell domain with > permissions needed by the bridge. You can still allow the bridge to open > up a shell with a transition back to the login shell domain (but then > you will get into domain prefixes > > ie: staff_bridge_t -> shell_exec_t -> staff_t vs. user_bridge_t -> > shell_exec_t -> user_t etc. Otherwise I only see some style cleanup needed. Also there is an optional block in the admin interface for systemd calls. Systemd is required for cockpit, so it shouldn't be optional, right? -- Chris PeBenito