News for hackers. Stuff that matters.
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by lrvick on Saturday April 20, 2024 @08:07AM (#40096741)
Certbot is a massive pile of dependencies that you need to care and feed and update. You should not need 100s of megs of nonsense for something that can be done with a shell script.
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by rany_ on Saturday April 20, 2024 @08:27AM (#40096863)
It doesn't even work well in my experience. ACME.sh is a lot more hassle free, I've always had issues with Certbot's DNS verification.

Basically I'm not avoiding Certbot to make a point, I just think it's inferior for my specific use cases. I don't know about Dehydrated but I also expect it to be BS free.

Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by radiowave on Saturday April 20, 2024 @10:25AM (#40097568)
Yup, I gave up on certbot after trying to understand why I couldn't get the Digital Ocean DNS plugin to work, which is maintained as part of the Certbot repo. (This was a few years ago, so details may have changed.)

I discovered the issue was that the plugin does some pretty broad-brush guesswork about which domain in your DNS hosting it should actually populate with the response value. If you own a bunch of similar domain names (as many orgs do), the plugin may guess wrong.

Much happier to be using dehydrated, and I don't regard it as a major impediment that I had to spend 10 minutes hand writing the necessary API call to the DNS provider.

Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by BadBadJellyBean on Saturday April 20, 2024 @08:25AM (#40096854)
People are always talking like shell scripts are without dependencies. Shell scripting ist mostly piping program outputs to different programs, that have dependencies on libraries themselves. Each of them have to be kept up to date to stay secure. Just because they are mostly preinstalled on the system doesn't make them not a dependency.

This, together with the fact that most shell scripting is bash based which is, in my opinion, not a very good language, makes it less secure to me than a python tool.

Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by lrvick on Saturday April 20, 2024 @08:37AM (#40096921)
If it is just a few curl and openssl commands, why make a user install hundreds of megs of python deps just to ultimately call mostly openssl commands anyway

One of the biggest risks today is supply chain attacks. The more dependencies you have, the more people you are giving the ability to tamper with your critical code paths.

Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by nullify88 on Saturday April 20, 2024 @08:54AM (#40097028)
Wouldn't this bash script be just as susceptible to supply chain attacks? What dependencies does openssl, cURL, sed, grep, awk, mktemp pull in, and could it be vulnerable to attack like we saw with xz?
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by semi-extrinsic on Saturday April 20, 2024 @09:14AM (#40097139)
I think the point is to minimize the total attack surface on a system. If the bash script only depends on programs like those you list, which Linux distros package as default anyway, the shell script has not introduced any new dependencies on your system.
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by throw0101c on Saturday April 20, 2024 @09:52AM (#40097374)
> Wouldn't this bash script be just as susceptible to supply chain attacks? What dependencies does openssl, cURL, sed, grep, awk, mktemp pull in, and could it be vulnerable to attack like we saw with xz?

All the packages listed are already probably installed on your system, so you have to worry about their integrity already (your system package manager (RPM, Deb) probably leverages them).

Something like Certbot pulls in dependencies on top of what your system already has, whereas Dehydrated or Acme.sh use tools that you already have to worry about anyway because they're part of the base OS.

Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by lrvick on Saturday April 20, 2024 @09:15AM (#40097143)
Absolutely there is still supply chain risk there. But less risk in 3 dependencies than 300.
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by BadBadJellyBean on Saturday April 20, 2024 @12:03PM (#40098332)
3? You think you underestimate the number of libraries your software uses.
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by lrvick on Saturday April 20, 2024 @03:27PM (#40100236)
I actually full source bootstrapped a Linux distribution from zero recently. Most distros have a lot of dependencies you do not need.

In this case you only actually need curl, openssl, and busybox. Those depend on at least a small libc implementation and a kernel but those are certainly already present.

Coreutils or busybox is probably already installed too. Still, I will grant the requirement of musl and a linux kernel since we are being pedantic or maybe talking about an embedded linux use case, so 5 deps total to boot from metal and get a cert.

To be fair I would never actually ship openssl or busybox in a real embedded project. Would probably write a simple standalone binary using the standard library of Go or something.

Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by BadBadJellyBean on Thursday April 25, 2024 @04:00AM (#40154736)
How is that in any way realistic? Most people don't bootstrap Linux systems. And just because it is pre-installed doesn't make it safe. Most software on a modern Linux distribution is dynamically linked to several libraries which might depend on other libraries.
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by nativeit on Saturday April 20, 2024 @01:07PM (#40098783)
I’m pretty sure every open source repository ever created is vulnerable to “an attack like we saw with xz,” and by that I mean a labyrinthine, multi-year effort involving highly sophisticated exploits combined with psychological manipulation, coordinated sock-puppets, global actors, and deep intrigue—to the extent that it’s absurd to cite as a threat that “dependency management” can meaningfully prevent.
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by BadBadJellyBean on Saturday April 20, 2024 @02:51PM (#40099877)
I saw the following programs whil skimming the code:

awk, grep, curl, getent, sudo, mkdir, mv, ln, cat, rm, openssl, touch

Most of these have around 10 dependencies on libs.

Don't misunderstand me. I have nothing against the script. I just don't like the argument that bash is better because it has no dependencies.

Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by lrvick on Saturday April 20, 2024 @03:22PM (#40100201)
busybox, openssl, curl. Done. :)
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by ale42 on Saturday April 20, 2024 @05:14PM (#40101062)
The OS itself depends on many libs ;-)

The only things that are a bit heavy in the list are openssl and curl. Still, they are relatively self-contained tools, nothing to do with the dependency hell of certbot.

Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by enkrs on Saturday April 20, 2024 @08:36AM (#40096918)
Exactly. I've been using dehydrated on two servers since it was named acme.sh (pre-2015) and updated it once. It just works and no dependecies.
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by systemz on Saturday April 20, 2024 @10:46AM (#40097741)
Dehydrated and acme.sh seems different. Is one of them fork?

https://github.com/acmesh-official/acme.sh

https://github.com/dehydrated-io/dehydrated

Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by enkrs on Saturday April 20, 2024 @12:04PM (#40098340)
Brainfart from my side. When I first installed dehydrated.sh it was originally named letsencrypt.sh (not acme.sh) and later renamed to dehydrated. That was quite a while ago.
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by nullify88 on Saturday April 20, 2024 @08:40AM (#40096937)
With that rationale, why not use https://github.com/go-acme/lego which is a self contained lets encrypt client in Go?
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by lrvick on Saturday April 20, 2024 @09:17AM (#40097161)
Static binary, sure, but hardly a tiny supply chain attack surface: https://github.com/go-acme/lego/blob/master/go.sum

Also their official builds are built with Alpine which is a hobby distro that does not even do signed code or packages.

Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by chrisweekly on Saturday April 20, 2024 @01:54PM (#40099253)
Are you saying that any use of Alpine is, by definition, a supply-chain security problem?
Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by lrvick on Saturday April 20, 2024 @03:33PM (#40100291)
I am, yes. Alpine is not full-source-bootstrapped, often imports and trusts external binaries blindly, has no signed commits, no signed reviews, no signed packages, and is not reproducible. It is one phished git account away from a major supply chain attack any day now.

Alpine chooses low security for low contribution friction. It is the Wikipedia of Linux distros, which granted it a huge package repository fantastic for experimental use and reference, but it is not something sane to blindly trust the latest packages of in production.

It is one of the reasons why I made stagex, which in most cases is a near drop-in replacement.

https://codeberg.org/stagex/stagex

Re:Dehydrated: Letsencrypt/acme client implemented as a shel... by chrisweekly on Saturday April 20, 2024 @11:21PM (#40102943)
Thanks for the detailed response!

EDIT: Also, stagex looks pretty compelling; I hope it catches on!