From nobody Thu Nov 25 13:33:30 2021 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F385B189BCDE for ; Thu, 25 Nov 2021 13:33:52 +0000 (UTC) (envelope-from dch@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0Jk84j0Pz4mcd; Thu, 25 Nov 2021 13:33:52 +0000 (UTC) (envelope-from dch@freebsd.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: dch/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 806E8A837; Thu, 25 Nov 2021 13:33:52 +0000 (UTC) (envelope-from dch@freebsd.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 4E56927C0054; Thu, 25 Nov 2021 08:33:52 -0500 (EST) Received: from imap44 ([10.202.2.94]) by compute5.internal (MEProxy); Thu, 25 Nov 2021 08:33:52 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrhedtgdehfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfffgrvhgv ucevohhtthhlvghhuhgsvghrfdcuoegutghhsehfrhgvvggsshgurdhorhhgqeenucggtf frrghtthgvrhhnpeegkefgieeiieekveehueevveduvdejkedvleeiffekheekleelvdfh hfduvdeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegutghhodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeijeekudekudeh vddquddvudefuddujeejqdgutghhpeepfhhrvggvsghsugdrohhrghesfhgrshhtmhgrih hlrdhfmh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 26D23FA0AA6; Thu, 25 Nov 2021 08:33:52 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1371-g2296cc3491-fm-20211109.003-g2296cc34 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org Mime-Version: 1.0 Message-Id: In-Reply-To: <246adde5-6a7a-4102-abb4-16c766ea78d1@freebsd.org> References: <861r36xzpe.fsf@phe.ftfl.ca> <66b556bf-e797-483b-b377-182859be572a@www.fastmail.com> <246adde5-6a7a-4102-abb4-16c766ea78d1@freebsd.org> Date: Thu, 25 Nov 2021 13:33:30 +0000 From: "Dave Cottlehuber" To: "Allan Jude" Cc: "FreeBSD Hackers" Subject: Re: Call for Foundation-supported Project Ideas Content-Type: text/plain ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637847232; 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: in-reply-to:in-reply-to:references:references; bh=X0chI9CpvElwdf9JMs2rGTtdgsKIqrhl83wPclfP2xk=; b=vkc4agDCn4FpfflPXKURlks1rDHiq9xkQMclt5DwjiUwsopa4QqDMPyj2yN6gZqPGKTm6C Wlh1xzW069AYGcwPmd/MiXVUOjyFYYHKmIdoSiBAQobCe4+VoeXuVGDbrWl1NruCjfgn1s IRQYlyjQ6iy+nfXSZPvDw80tCYiAqVTABR1eed6qifmFfGmC8gTdl70s8hRgPhzVKG4S6q JdzuM2oXJFOcsRGOs9fpyC8GmDrR3EX0o6Yr/4q9aDUErS1JmtXsfXMx4eP66/r5YTR/wi Ot3d8ucuo3ysHz5lvn5cmqpKHpVaSl1cxpxy4uERb7LxPLXO0OfHbwHVwTc1KQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637847232; a=rsa-sha256; cv=none; b=tG5PpjnX7Pgh0lFPXDjao1ZsT+ptTH9jS+VS3symGx8p91WXmFWVyfXm+FaKNI13Pl2Bru Hrea3YzL3qu79ORKXOy9NAokrOUzBJfpcqVFRA1iy9FVgOi3RDv9mII3HnwURbQ1d3yYeC RYExwT46WYZcxpT0LOCW4HcXFEzsLUcMltIFY6PKqK+N70GIb9dTLX/9fYAURxeth5aljS KyQ4RULN8BGFYkGQvJ3WYeCI20F5MfGLrhqDUiB2Se6jMEVzydsTPoW1utc83kWtjz+KV3 94kxncn0hO7ZSyH2No8/5REB3Im8tvxGdd04AYMlIPyny6gJZPgHTkt7wBS11Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Wed, 24 Nov 2021, at 21:46, Allan Jude wrote: > >> 3. jail creation and usage as non-root > > I was discussing the idea of 'user jails' with a few people around > EuroBSDcon. Do you have some specific user cases, and/or ideas of what > would be allowed and not allowed? My classic use case is that we do a bunch of CI-like stuff that requires: - the network stack & jailed pf rules are already set up in advance, as it doesn't change in practice for each jail - delegated zfs permissions to prepare a new jail from template - mount a few random things into it (tmpfs, nullfs & more zfs, no root reqd) - *now* I want a jail with the above prepared already the first 3 can be done already without root. I could totally live with that as bare bones, but bonus points for: - there should be an event (a la devd for example) on jail creation, & when the jail is complete (or a timeout has occurred) to clean up = running the entire jail as non-root and unable to escalate to root - a random uid for the jail user (not just inheriting *curent* user) - faking zfs permissions to match the random uid (e.g. on mount rewrite www:www as 8000:8000 instead) - setting more restrictions than than the user's jail already has (cpu/mem resource controls for example) A+ Dave