HNHacker News
TopNewBestAskShowJobs

sigwinch28

867 karma · joined July 20, 2018

https://sigwinch.uk

Don't bother with the broken plaque-ridden keyservers. Use WKD instead:

    gpg --auto-key-locate wkd --locate-keys joe@sigwinch.uk
submissionscomments
sigwinch28··on Passwordless: a different kind of hell?
I can get any proficient locksmith to open my front door with valid photo ID. In a pinch I can get in using a brick, a window, and a good throw. The police might turn up or they might not.

With 2FA, a lot of times I’m going to go through endless technical support, or I will be told it’s simply “not possible” for me to regain access to my accounts.

There’s a third tier here, which is 2FA at work. If I lose a 2FA token I can usually get the IT or security team to let me back into the system because they’re physically present and know who I am.

sigwinch28··on British Post Office Scandal
It’s another example of the British establishment and media blaming “computer glitches” and “the system”. A buggy accounting system on its own cannot cause such a disaster, unlike a buggy avionics system or a Therac-25.

This scandal would not have happened if the people in power had rightly been skeptical of the output of an accounting system that had been called into disrepute by several employees.

People did this. People chose to prosecute. People lied. The courts accepted dodgy evidence. The scandal is the post office employees, the solicitors, the courts, and the Fujitsu employees, not the buggy accounting system. People took the output of an accounting system as though it had come down from a mountain on a stone tablet.

sigwinch28··on How Open ID Connect Works
The gist of it (pun intended) is that GitHub issues GitHub-issued (not issued by your cloud provider!) OIDC tokens to your job runs, and then your job exchanges those tokens for permissions with your cloud provider, which you have configured to trust tokens from GitHub.

From experience, OIDC authentication to cloud providers from GitHub actions boils down to:

1. Get your GitHub actions workflow to be able to work with its own (GitHub) tokens by configuring workflow permissions.

2. Configure your cloud provider to verify tokens issued by GitHub actions OIDC server thingymabob (technical term).

3. Configure your cloud provider to grant permissions in that cloud provider (or issue its own tokens with those permissions) based on certain values in the verified GitHub tokens that is presented with. If your cloud provider trusts GitHub, then it can treat the values in the token (workflow name, branch run from, owner and name of GitHub repo) as trusted.

4. Use a GitHub action from your cloud provider to do the negotiation with your cloud provider when your job runs, performing the exchange configured in (3).

sigwinch28··on The Shingle Spit in Whitstable
BlueJ, David Barnes, and Michael Kölling?
sigwinch28··on Email addresses are not good 'permanent' identifiers for accounts
One of my previous energy providers (British Gas, owned by Centrica) didn’t allow an email address to be used for more than one physical address.

When I moved and tried to “set up” my online account I kept getting HTTP 500s when trying to view details about my current address. On the phone they told me “sorry, you can’t use the same email address for multiple [postal] addresses”, even with closed energy accounts from previous addresses.

sigwinch28··on America's Tipping Slowdown Isn't Slowing Down
As a Western European, American tipping seems out of control and arbitrary.

I tip the waiter but not the cook or the cleaner. I tip the cab driver but not the bus driver or the train conductor. I tip a bell boy (maybe a maid too?) but not the front desk. Do I tip a barista but not a McDonald’s worker? Don’t tip the cashier at the big box store?

15%? 20%? Why should someone’s tip depend on the price of the bottle of wine that I had them open and pour, especially if it was equal effort for each bottle?

Absolutely bizarre to me.

I just booked a cruise with a Norwegian operator and this is their tipping policy:

> On board Hurtigruten Expedition Ships, it's not common practice or expected to tip. However, we have learned that many of our guests wish to give special thanks to our service crew on board. It is at the individual's discretion to honour the service provided by the crew in the bars, restaurants, cabins, and behind the scene.

> The money collected […] will then be divided equally among all crew members after the voyage, we ask not to tip individual crew members during the voyage to ensure the people behind the scenes also are included.

> Please Note: Officers and Expedition Team are not included in this breakdown.

sigwinch28··on New PFAS discovered with novel testing method
From the same page:

As of November 2023, the International Agency for Research on Cancer (IARC) has classified PFOA as carcinogenic to humans (Group 1) based on “sufficient” evidence for cancer in animals and “strong” mechanistic evidence in exposed humans.[119]

sigwinch28··on Pitfalls of Helm – Insights from 3 years with the leading K8s package manager
YAML is just some data, like JSON or CSV. Ask yourself whether you'd use a third-party JSON templating or CSV templating tool, or whether you'd use your shop's language of choice and write a program to spit out the generated data.

You can also save yourself a step by just spitting out JSON, which is valid YAML.

sigwinch28··on Pitfalls of Helm – Insights from 3 years with the leading K8s package manager
Helm and Kustomize are absolutely atrocious tools.

The job of these tools is ultimately to generate a bunch of data structures compatible with Kubernetes API schemas. That's it. Take some input, go brrr, and spit out some serialized data structure.

If we replace "YAML" with "JSON", this all seems a bit absurd.

Helm is a tool where you write JSON templates and JSON templating helper functions, then users can provide a values.json file which specifies inputs for the templates and maybe even can contain templated values themselves. But it's easy to get the contents of the values.json slightly wrong in ways that silently fail, so the JSON templates spit out something but it might still be semantically valid Kubernetes JSON. So you can include JSON schema files alongside your JSON templates package to specify the schema of the values.json file, which the tool will check. Then sometimes the values.json file is too verbose to write by hand, so the user chooses another tool (or god forbid writes a small script in a general purpose programming language) to generate their values.json file.

Absurd.

Kustomize is a tool where you give it a bunch of JSON files, or maybe tell it to use one or more of the hellish Helm charts, which is itself a glorified JSON templater. Then you write a JSON configuration file which looks declarative but is secretly somewhat imperative. In this JSON file you specify which transformations you'd like to apply, maybe even specify some inline patches which use the JSON path patch syntax or a strategic merge where you write some more JSON. Some bits of the tool allow you to generate more JSON from files on your disk, like .env files or data files. If the feature set doesn't work you can then use KRM functions as generators or transformers, which allow you to escape from JSON hell and use a general purpose programming language to emit or transform JSON, but the configuration to this KRM function is itself provided as JSON.

Absurd.

These YAML-obsessed tools like Helm and Kustomize purport to be easier because "it's just YAML!" but what you're really doing is writing all of the arguments for a computer program which you must understand, but in YAML. Kustomize is slightly less bad because it doesn't allow for much control flow, but in Helm templates you have control flow, loops, and helper functions. So it's really just a program anyway with a YAML syntax, but you're confined to a stringly-typed templating language.

This exists with tools like Kyverno, too: "oh, the policies are just YAML!" but they introduce a special DSL for writing conditionals, so you're still writing a program anyway, but in a YAML inner platform. If you think of it as "just JSON" then the YAML smokescreen and cargo cult falls away. It then becomes much more tempting to write something specific to your needs in Python, TypeScript, Ruby, Haskell, OCaml, or another general purpose programming language, where you can do whatever it is you need to do without this leaky YAML purism. Kubewarden's scope overlaps a bit with Kyverno, but Kubewarden chooses WASM as the common language instead of YAML.

However, there's an argument to be made about the security model of Helm and Kustomize. Assume that I trust that the authors of those tools are not going to smuggle my data to a malicious third party or install spyware on my computer and that they do not have critical security bugs. Then I can confidently run those tools on my computer with inputs (e.g. charts and kustomizations) that I do not trust. To say nothing of whether the tool will generate a deployment which compromises my cluster when applied.

I think what I'd like to see from the community is tooling that targets Deno or WASM as the common ground. Then I can sufficiently sandbox "packages" like helm charts or kustomizations without worrying that they have general access to my computer or CI/CD runner as if I'd imported a random Python package. I've already started writing something in Deno that tries to emulate Grafana's Tanka in TypeScript. My next job is to write a tool which runs WASM-compiled KRM functions.

But I might need a configuration language for that tool, so maybe I'll choose YAML...

sigwinch28··on The worst thing about Jenkins is that it works (2019)
> We are uding docker-in-docker at the moment

You can also run a "less privileged" container with all the features of Docker by using rootless buildkit in Kubernetes. Here are some examples:

https://github.com/moby/buildkit/tree/master/examples/kubern...

https://github.com/moby/buildkit/blob/master/examples/kubern...

It's also possible to run dedicated buildkitd workers and connect to them remotely.

sigwinch28··on Paperless-Ngx v2.0.0
I am in the process of getting this running on a Kubernetes cluster in my home. That’s where I throw all self-hosted containerised applications these days. But there’s a bit of friction.

Their entrypoint script makes a lot of assumptions and in their docker-compose example they use a single container running supervisord instead of multiple containers, each with a dedicated purpose (ingestion, consuming, web server). The setup is almost insistent on logging to a file instead of stdout. It also checks and tries to modify permissions of some folders(!!). This requires quite a bit of unpicking.

This is doable, but not frictionless to get it to do what I consider “best practices” but I understand that it’s probably a mix of “easy for someone who’s day job is not to be an infrastructure engineer” and “we were using supervisord for baremetal anyway”. Maybe a lot of it is personal preference but I do feel like the project is not taking containerisation fully to heart. Maybe being more user-friendly in their eyes is more important than being a containerisation purist.

Either way, I’ve got it nearly working with my Brother ADS-1700W, which has shortcuts for me, my wife, and “joint”, which uploads documents to different directories via SFTP which then automatically have their paperless-ngx owner set appropriately.

sigwinch28··on Shellcheck finds bugs in your shell scripts
I strongly agree with this.

I find that I'm okay with shell scripts which invoke repetitive individual commands, run complex piped commands, or run a sequence of commands with little-to-no control flow.

However, then I find that people use shell scripts for more advanced programming "because it's there" and "it's ubiquitous". What follows is a lot of stringly-typed programming using more and more bash-specific features and advanced control flow. External commands and builtins gather exotic flags to handle whitespace (or preferably null bytes). Then people want complex data types so they resort to things like `jq` and JSON stored in variables. But hey, at least they didn't use Python or Ruby!

Some people argue that by using a programming language like Python or Ruby or Go instead of "just a shell script" that I then bring about dependency management hell because I might use non-stdlib libraries and I require a minimum version of the language. But the people writing shell scripts rely a lot on their ambient system environment that they take for granted. They will use bash instead of sh and assume a recent version of it (good luck macOS users!). They will assume that the coreutils are BSD or GNU and they will get it wrong. They will want advanced data structures and assume you have some random utility for manipulating JSON, CSV, or TSV installed. Now you have a dependency management problem just like you would in other programming languages.

So then people say in a slack channel "hey, please install this util on your system", or they share Brewfiles and dockerfiles and container images, or they write yet another script to check your system for the right dependencies. You end up with a library of scripts and functions which require certain env vars to be set so they can all find and `source` each other. People writing and committing clever and complicated shell scripts usually end up with the same problems they would have with a different programming language that has package managers. But it's weeks or months down the road and it's easy not to think about when committing a 100 line bash script to the repo or adding new functionality to a script or depending on "just one more" installed utility.

It devolves to the same problem of "I'm writing Python/Ruby/Haskell/C/C++/... and I'm relying on the operating system's package manager to provide the libraries I depend on", but without having a powerful general purpose programming language with an import system and featureful standard library. Some teams do that and shell scripts which rely heavily on the system environment might be a great fit for them.

The best use case I can think of for shell scripts are FreeBSD init scripts, but then I consider how tightly coupled those are to the operating system. So basically... part of the system.

I don't think I have the discipline for all of that, so my flowchart for writing shell scripts is: is it a one-liner? If yes, do it. If not, use the same programming language as the rest of the project(s) in your team.

sigwinch28··on Is primary OS a dealbreaker for you (when taking a new job)?
I do just work there and that’s okay with me.
sigwinch28··on Is primary OS a dealbreaker for you (when taking a new job)?
For me? No.

I work somewhere with thin clients which log in to one OS, which is an OS I do not develop for. I end up remoting in from that OS to another one. It’s a bit clumsy. On some occasions I’ve been unable to do a thing easily and my manager has been receptive to “I can’t do this thing so I will either have to not do it or find a slower and clumsier way”. It doesn’t always get fixed, but I feel it’s understood.

My employer pays me so while I’m on the clock in the office I will use the OS and software they tell me to (not) use. It’s on them if my productivity is reduced because of informed decisions they make. I get paid whether or not I have to open a ticket and wait because I’m blocked on IT.

Ultimately, my direct line of management is much more important than any OS decision because good management will listen and understand the effects their decisions have and they won’t blame me for the effects of their decisions.

If my managers instruct me to develop containerised Java 6 SOAP microservices to run on Windows Kubernetes clusters in IBM cloud while using a Hannah Montana Linux dev environment over VNC from a SunOS workstation with an AZERTY keyboard and the monitor rotated 180 degrees then I will do it on company time. I’ll tell them what I think of it, though.

sigwinch28··on I like gentoo's package deprecation process
Gentoo was how I was introduced to Linux, too.

A Dutch friend on a filesharing IRC network walked me through an install process on my old laptop, via Skype, throughout an entire evening and some of the night. I remember how we went through one-by-one enabling certain kernel modules and reading the descriptions of what they did.

sigwinch28··on Oh-Auth – Abusing OAuth to take over millions of accounts
No, they’re not possible. Yes, the auth server would return an error because the token is retrieved by the server out-of-band (Mallory can’t intercept via the browser) and must provide its credentials to Facebook to retrieve said token.

Additionally, Facebook SHOULD check that the client using the code is the same client that initiated the OAuth flow.

sigwinch28··on Was Rust Worth It?
That article starts with the premise that “it’s a feature, not a bug” then goes on to describe a whole bunch of things I consider to be anti-features of a packaging system that has a flat namespace.

The first section says it discourages forking. I consider this to be bad. Nobody’s code should be more important purely because it squatted a better name.

The Identity section actually makes the case that flat registries make naming harder.

The section on Continuity is “we’ve tried nothing and we’re all out of ideas”. Make up an org name and grandfather all packages in the flat namespace into that special org. Also this is already a problem because packages in the flat namespace do get abandoned, then forked, and then we have the associated issues.

The section on Stability seems to take it as a given that crates.io should be the only registry. I don’t. It also seems to conflate cargo with rustc for the benefit of the argument.

The squatting section describes only anti-features and I don’t consider the author’s legitimate use cases to be legitimate reasons to squat.

I think the only legitimate problems that need addressing are the ergonomics of accessing namespaced packages throughout transient dependencies and backwards compatibility with non-namespaced code. But the fact that these are real problems does not, to me, make a flat namespace a “feature”. It’s just easier to implement.

It’s okay for it to be a mistake that takes effort and time to fix.

sigwinch28··on Ask HN: What is the least obnoxious way to ask for cookie permissions?
Perhaps some sort of Do-Not-Track HTTP header sent by the user’s browser
sigwinch28··on Insider trade on Splunk acquisition?
Based on the compliance training I did this week at a hedge fund…

On the condition that you acted solely on information that was already public, or something that happened in a public place that you happened to witness as a bystander…

No, that is not usually considered insider trading.

Not a lawyer, not advice.

sigwinch28··on Amazon training video on handling unionizing activity (2018) [video]
“Living wage”, “grievance”, and “contract” are so-called “union words” according to this training.

My mouth is agape.

These are words and phrases I openly use with colleagues in exactly the setting the video implies and I’m an non-unionised office worker.

Maybe that means I’m itching for a union? /s

sigwinch28··on Beyond OpenAPI
> According to the popular classification, there are four document types: tutorials, how-to guides, technical references, and explanations.

This is Diátaxis: https://diataxis.fr/

sigwinch28··on Ask HN: Can you end up on the “No Fly” list for putting AirTags in your luggage?
https://www.tsa.gov/travel/security-screening/whatcanibring/...

https://www.forbes.com/sites/suzannerowankelleher/2022/10/17...

They seem fine to take in checked luggage.

sigwinch28··on UK pulls back from clash with Big Tech over private messaging
I don’t think it’s as much official government discussion as it is party chatter. See lockdown party scandal, Forde report, typical CCHQ party lines.
sigwinch28··on Tax prep companies: $90M lobbying against free tax-filing
In the U.K. a lot of people do not have much interaction with HMRC (the tax authority) beyond knowing their National Insurance number, knowing their tax code, and seeing tax deductions on their payslips.

https://www.gov.uk/income-tax/how-you-pay-income-tax

Even when they do, it can be done online, or by post, or by phone.

Anecdote: I rang HMRC and within 60 minutes all of my questions were answered.

sigwinch28··on Space travel via tether between asteroids
Oh then I have completely misunderstood the article! Oops.
sigwinch28··on Space travel via tether between asteroids
A rendition of this idea can be seen in the Halo TV adaptation. I can’t remember which episode(s) or find a good YouTube link right now. But there’s a settlement in an asteroid belt where the people move around on cars attached to rails/tethers between the asteroids.
sigwinch28··on Ask HN: How to handle Asian-style “Family name first” when designing interfaces?
On the other hand, HM Passport Office absolutely loves titles:

https://www.gov.uk/government/publications/titles-included-i...

My personal favourite is if you change your first name to “Sir” and you are not actually a “Knight”, then you get the note “THE REFERENCE TO SIR IS TO THE HOLDER’S NAME AND NOT TO THE HOLDER’S TITLE” printed in your passport.

Context: I wanted “Dr.” to be added to my passport.

sigwinch28··on The Terraform Registry Terms of Service have been updated
That indeed seems to be the case. Seems that for community providers, HashiCorp is serving up JSON which refers to GitHub download links.

Here’s a sample size of 1: https://registry.terraform.io/v1/providers/spacelift-io/spac...

According to the provider registry protocol, which I have previously implemented for internal hosting (in an afternoon of writing a single file of Python): https://developer.hashicorp.com/terraform/internals/provider...

sigwinch28··on OpenTelemetry in 2023
You can do head-based sampling and tail-based sampling.

With head sampling, the first service in the request chain can make the decision about whether to trace, which can reduce tracing overhead on services further down.

With tail-based sampling, the tracing backend can make a determination about whether to persist the trace after the trace has been collected. This has tracing overheads, but allows you to make decisions like “always keep errors”.

sigwinch28··on Elixir – Why the dot when calling anonymous functions?
Yes, you’re right.
← PreviousPage 2 of 8Next →