frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Why UUIDs won't protect your secrets

https://alexsci.com/blog/uuids-and-idor/
48•8organicbits•4h ago

Comments

lmm•2h ago
Why would you use UUIDv7 rather than UUIDv4 though?
magnio•2h ago
UUIDv4 is much more scattered (i.e., uniformly distributed), which heavily degrades indexing performance in databases.
vrosas•1h ago
This depends on the database and should not be written as gospel.
Tostino•1h ago
Which databases doesn't it degrade performance with when used as an indexed field?
8organicbits•1h ago
UUIDv7 seems popular for Postgres performance improvements, but it causes issues with databases like Spanner.

https://medium.com/google-cloud/understanding-uuidv7-and-its...

kbolino•55m ago
Lots of distributed, NoSQL databases work (or partially work) this way too (e.g., HBase rowkey, Accumulo row ID, Cassandra clustering key, DynamoDB sort key). They partition the data into shards based upon key ranges and then spread those shards across as many servers as possible. UUIDv7 is (by design) temporally clustered. Since many workloads place far more value on recent data, and all recent data is likely to end up in the same shard, you bottleneck on the throughput of a single server or, even with replication, a small number of servers.
findjashua•33m ago
i think the standard recommendation is to do range partitioning on the hash of the key, aka hash range partitioning (i know yugabyte supports this out of the box, i'd be surprised if others don't). this prevents the situation of all recent uuids ending up on the same shard.
kbolino•18m ago
Indeed. In fact, Cassandra and DynamoDB have both hash keys and range keys; I've edited my comment to be more specific.
crazygringo•59m ago
But mainly on writes, not much for reads.

And if your database is 99% reads 1% writes, the difference probably doesn't really matter.

And tons of database indexes operate on randomly distributed data -- looking up email addresses or all sorts of things. So in many cases this is not an optimization worth caring about.

monkaiju•2h ago
Great piece, but worth mentioning that you generally can't use a presigned URL with CDN endpoints. So great for sensitive content, but if you rly want the thing to be widely and quickly accessible there's more work to be done
inopinatus•1h ago
Well, you can if the signed URL is signed for the CDN's verification instead of the underlying storage.

Generalising this; you don't need stateful logged-in authentication to defeat IDOR, you can include an appropriately salted HMAC in the construction of a shared identifier, optionally incorporating time or other scoping semantics as necessary, and verify that at your application's trust boundary.

This tends to make identifiers somewhat longer but still fit well inside a reasonable email'd URL to download your phone bill without having to dig up what your telco password was.

However, note that one of the baseline requirements of privacy-oriented data access is issuing different and opaque identifiers for the same underlying thing to each identifiable principal that asks for it. Whether that's achieved cryptographically or by a lookup table is a big can of engineering worms.

dpipemazo•21m ago
You can use pre-signed URLs with CloudFront.
ronbenton•2h ago
I am a bit "meh" on the YouTube "unlisted video" example. The name itself is fairly transparent in implying that there's really no security, the video is just not listed in a public-facing way. This is significantly different than the article's billing example, where customers would be quite right in assuming their bills will be only accessible to them.
BolexNOLA•1h ago
Yeah at the end of the day the yt video isn’t under lock and key in any way, shape, or form vs. my billing info with my various utilities and such which is. It’s just “security through not knowing the exact URL (yet).”
mananaysiempre•1h ago
> The name itself is fairly transparent in implying that there's really no security

A password-capability system is a password-capability system. Not requiring an account does not make it not an access control. (Though it does make it e.g. not selectively revokable, which is a known weakness of password capabilities.)

BolexNOLA•49m ago
Correct me if I am misunderstanding your point but unlisted YouTube videos don’t need a password or anything to be accessed. Anyone who has the URL can access it. It’s just not indexed/searchable on YouTube.
mananaysiempre•24m ago
Right. And neither do Google Docs shared by a no-login link (which used to be the only option) or for that matter RSA signing keys. You could in theory guess any of these, given all of the time in the universe (quite literally). A “password capability” is any mechanism where knowing the designation of an object (such as the “unlisted” link) is a necessary and sufficient condition to access it. The designation has to be hard to guess for the system to make sense.

(The intended contrast is with “object capabilities”, where the designation is once again necessary and sufficient but also unforgeable within the constraints of the system. Think handles / file descriptors: you can’t guess a handle to a thing that the system did not give you, specifically, a handle for.)

shoo•1h ago
> If you use secret UUIDs, think of them as toxic assets. They taint anything they touch. If they end up in logs, then logs must be kept secret. If they end up in URLs, then browser history must be kept secret. This is no small challenge.

a fun retail banking variation of this misadventure is (1) someone designs an elegant RESTful API for doing something or other (2) and it gets applied to credit cards, where the credit card number is used as the natural primary key and is RESTfully embedded in URLs, which people endeavour to avoid logging, but then when you (3) integrate middleware to report metrics to some SaaS monitoring platform, the end result is that you're spraying all your customers credit card numbers into the monitoring platform

colechristensen•56m ago
why would anyone ever think that using a credit card number would be a good primary key?

why would anyone who ever suggested such a thing not be relegated to permanent headlight fluid fetching duty?

ThunderSizzle•20m ago
Well, there is a segment of the database side that thinks natural keys are better than artificial keys. A credit card number is a natural key, so I can see thr database logic to it.

The failure of depending on natural keys is simply highlighted by that problem.

2muchcoffeeman•7m ago
Surely the next thought is “I don’t want customer CC leaking” regardless what your background is?
Ensorceled•6m ago
I have had this fight so many times ... "we don't need to generate a random key, we can just use this 'unique' identifier" where the unique identifier is always some form of PII.
valiant55•4m ago
Some form of PII that can change too. Natural keys are a no go for me.
NoMoreNicksLeft•2m ago
> there is a segment of the database side that thinks natural keys are better than artificial keys.

Aren't those guys hammered nearly daily (at least weekly) with one real-world example after another about how natural keys aren't unique?

EGreg•1h ago
"Once the URL is shared with others, the owner loses the ability to assert access control over the video."

That reminds me of Stallman's apocryphal story about favoring a password instead of ACLs, and why GNU doesn't have a "wheel" group :)

https://administratosphere.wordpress.com/2007/07/19/the-whee...

Sometimes a few of the users try to hold total power over all the rest. For example, in 1984, a few users at the MIT AI lab decided to seize power by changing the operator password on the Twenex system and keeping it secret from everyone else. (I was able to thwart this coup and give power back to the users by patching the kernel, but I wouldn't know how to do that in Unix.)

   However, occasionally the rulers do tell someone.  Under the usual
`su' mechanism, once someone learns the root password who sympathizes with the ordinary users, he or she can tell the rest. The "wheel group" feature would make this impossible, and thus cement the power of the rulers.

   I'm on the side of the masses, not that of the rulers.  If you are
used to supporting the bosses and sysadmins in whatever they do, you might find this idea strange at first.

thaumasiotes•1h ago
> Under the usual `su' mechanism, once someone learns the root password who sympathizes with the ordinary users, he or she can tell the rest. The "wheel group" feature would make this impossible, and thus cement the power of the rulers.

How would that work? What is it about the wheel group that stops the sympathetic wheel from revealing his own login information to other people?

lmm•1h ago
> How would that work? What is it about the wheel group that stops the sympathetic wheel from revealing his own login information to other people?

The wheel member probably doesn't want to reveal their own login information. They want to share the root password with other users; on systems without a wheel group that works, but on systems with a wheel group non-wheel users can't su.

thaumasiotes•55m ago
> The wheel member probably doesn't want to reveal their own login information. They want to share the root password with other users

What's the difference? What would be something the other user could do in one of those scenarios that they couldn't do in the other one?

colechristensen•53m ago
>What is it about the wheel group that stops the sympathetic wheel from revealing his own login information to other people?

Then there's a paper trail, bob logs in 10 times as much as anyone else and from all over the place.

Anyway this is all silly ancient politics and shared admin passwords as a method of freeing the people is long past relevant.

zzo38computer•23m ago
If it is not possible to login as root directly (which on a multi-user system, it might only be possible to do if you are directly at the computer), then the wheel group might be one of the pieces (which should not be used alone; the wheel users still should avoid revealing the root password anyways) to protect against accidental telling the password, I suppose, since then other users cannot use the password without physical access to the computer. If they deliberately want to do so, then they could presumably just as well make the other users to also be the wheel group (or modify the software on the computer so that it does not require wheel, etc), if you have root access.
pluto_modadic•1h ago
...the solution to IDORs is to authenticate each user and check authorization per object.

full stop.

ctxc•1m ago
I thought this article was just stating the obvious over and over?

The answer is _always_ auth over obfuscation.

Intel and AMD standardise ChkTag to bring Memory Safety to x86

https://community.intel.com/t5/Blogs/Tech-Innovation/open-intel/ChkTag-x86-Memory-Safety/post/172...
193•ashvardanian•6d ago•81 comments

AWS multiple services outage in us-east-1

https://health.aws.amazon.com/health/status?ts=20251020
1680•kondro•20h ago•1811 comments

Building a message queue with only two UNIX signals

https://leandronsp.com/articles/you-dont-need-kafka-building-a-message-queue-with-only-two-unix-s...
91•SchwKatze•5h ago•46 comments

A laser pointer at 2B FPS [video]

https://www.youtube.com/watch?v=o4TdHrMi6do
245•thunderbong•1d ago•49 comments

Why UUIDs won't protect your secrets

https://alexsci.com/blog/uuids-and-idor/
48•8organicbits•4h ago•32 comments

Claude Code on the web

https://www.anthropic.com/news/claude-code-on-the-web
395•adocomplete•9h ago•236 comments

Production RAG: what I learned from processing 5M+ documents

https://blog.abdellatif.io/production-rag-processing-5m-documents
319•tifa2up•11h ago•84 comments

Postman which I thought worked locally on my computer, is down

https://status.postman.com
280•helloguillecl•11h ago•126 comments

BERT is just a single text diffusion step

https://nathan.rs/posts/roberta-diffusion/
357•nathan-barry•13h ago•87 comments

Alibaba Cloud says it cut Nvidia AI GPU use by 82% with new pooling system

https://www.tomshardware.com/tech-industry/semiconductors/alibaba-says-new-pooling-system-cut-nvi...
363•hd4•15h ago•241 comments

Results from blood test for 50 cancers

https://www.bbc.com/news/articles/c205g21n1zzo
22•dabinat•3d ago•7 comments

My trick for getting consistent classification from LLMs

https://verdik.substack.com/p/how-to-get-consistent-classification
124•frenchmajesty•1w ago•28 comments

Show HN: I created a cross-platform GUI for the JJ VCS (Git compatible)

https://judojj.com
74•bitpatch•11h ago•13 comments

Today is when the Amazon brain drain sent AWS down the spout

https://www.theregister.com/2025/10/20/aws_outage_amazon_brain_drain_corey_quinn/
398•raw_anon_1111•6h ago•176 comments

Argentine peso weakens to fresh low despite US interventions

https://www.ft.com/content/815ef487-0d0e-430c-b140-9bc39dbd1a53
38•zerosizedweasle•1h ago•39 comments

x86-64 Playground – An online assembly editor and GDB-like debugger

https://x64.halb.it/
116•modinfo•9h ago•8 comments

Wikipedia says traffic is falling due to AI search summaries and social video

https://techcrunch.com/2025/10/18/wikipedia-says-traffic-is-falling-due-to-ai-search-summaries-an...
39•gmays•2h ago•24 comments

Code from MIT's 1986 SICP video lectures

https://github.com/felipap/sicp-code
93•felipap•3d ago•8 comments

How to stop Linux threads cleanly

https://mazzo.li/posts/stopping-linux-threads.html
176•signa11•5d ago•67 comments

I made a small LED panel

https://www.stavros.io/posts/really-small-led-panel/
25•Brajeshwar•1w ago•8 comments

Show HN: I'm making a detective game built on Wikipedia

https://detective.wiki/
3•jasonsmiles•3d ago•1 comments

TernFS – an exabyte scale, multi-region distributed filesystem

https://www.xtxmarkets.com/tech/2025-ternfs/#posix-shaped
98•kirlev•9h ago•16 comments

Optical diffraction patterns made with a MOPA laser engraving machine [video]

https://www.youtube.com/watch?v=RsGHr7dXLuI
115•emsign•6d ago•21 comments

The scariest "user support" email I've received

https://www.devas.life/the-scariest-user-support-email-ive-ever-received/
169•hervic•5d ago•128 comments

Space Elevator

https://neal.fun/space-elevator/
1498•kaonwarb•22h ago•339 comments

Old Computer Challenge – Modern Web for the ZX Spectrum

https://0x00.cl/blog/2025/occ-2025/
17•0x00cl•3h ago•2 comments

Docker Systems Status: Full Service Disruption

https://www.dockerstatus.com/pages/incident/533c6539221ae15e3f000031/68f5e1c741c825463df7486c
331•l2dy•20h ago•127 comments

Art Must Act

https://aeon.co/essays/harold-rosenberg-exhorted-artists-to-take-action-and-resist-cliche
27•tintinnabula•4d ago•1 comments

DeepSeek OCR

https://github.com/deepseek-ai/DeepSeek-OCR
882•pierre•21h ago•221 comments

The longest baseball game took 33 innings to win

https://www.mlb.com/news/the-longest-professional-baseball-game-ever-played
48•mooreds•5d ago•60 comments