unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Suhail Singh <suhailsingh247@gmail.com>
Cc: Ada Stevenson <adanskana@gmail.com>,  Guix Devel <guix-devel@gnu.org>
Subject: Re: Disabling authentication checks for tests in local Guix checkouts
Date: Mon, 17 Jun 2024 23:52:02 +0200	[thread overview]
Message-ID: <871q4v5jb1.fsf@gnu.org> (raw)
In-Reply-To: <8734pbwtuc.fsf@gmail.com> (Suhail Singh's message of "Mon, 17 Jun 2024 10:02:19 -0400")

Suhail Singh <suhailsingh247@gmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> I’m not sure how to integrate it though: in the general case, we
>> probably want to keep authentication enabled by default, but how to
>> allow users to easily disable it when using a personal checkout?
>
> Could you please elaborate on what the challenge is?
>
> Is the challenge in inferring when they are using a personal checkout?
> Would it be a challenge to have the user provide an option instead?
> Said option could either be passed in explicitly every-time, or a
> command provided to allow the user to set/unset the option (which would
> get stored, say, in .git/config under guix "authentication") and the
> code updated to read the preference from there.

The challenge is in determining that Guix is running from a local
checkout.  Now that I think about it, it’s not that hard: ./pre-inst-env
sets ‘GUIX_UNINSTALLED’.  So we could do:

  #:authenticate? (not (getenv "GUIX_UNINSTALLED"))

Problem is that an attacker could lead a user to disable authentication
by getting them to set this seemingly unrelated environment variable.

The ‘.git/config’ option you propose is not available because that all
happens with the Guix-managed cached checkout under
~/.cache/guix/checkouts.

Maybe a specific environment variable would do?

Ludo’.


  reply	other threads:[~2024-06-17 21:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-10  6:20 Disabling authentication checks for tests in local Guix checkouts Ada Stevenson
2024-06-17 13:05 ` Ludovic Courtès
2024-06-17 14:02   ` Suhail Singh
2024-06-17 21:52     ` Ludovic Courtès [this message]
2024-06-18  2:36       ` Suhail Singh
2024-06-18  8:25   ` Ada Stevenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871q4v5jb1.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=adanskana@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=suhailsingh247@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).