News for hackers. Stuff that matters.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by miki123211 on Saturday July 25, 2020 @10:07AM (#23949271)
It would be cool if it was possible to read the data not just by the ID, but also by the hash of the ID.

That would let us serve stuff like version information and links to the latest version, without the fear that somebody is going to reverse engineer our app and replace the data with something malicious.

We, as the app author, would have the full key, so we could read and write, whereas users would have nothing but the hash.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @10:24AM (#23949394)
That's a cool idea, I'd definitely like to add the ability to create a little store with more safety, and that totally works with the goal of simplicity. I'll give it a shot.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by TedDoesntTalk on Saturday July 25, 2020 @10:37AM (#23949502)
It's a cool idea, but the old anti-pattern about security through obscurity applies.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by _jal on Saturday July 25, 2020 @12:52PM (#23950629)
People get this wrong a lot.

Security only through obscurity is no security at all. The argument was generally made in the context of secret, proprietary encryption algorithms. In this context, it was frequently true - security reduced to reverse engineering.

But security isn't a thing. It is a property of a system. And many secure systems strategically employ obscurity for multiple purposes.

Reciting a mantra is a poor substitute for carefully considering your problem domain.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by TedDoesntTalk on Saturday July 25, 2020 @04:46PM (#23952266)
Right, but in the context of this application, there is NO OTHER security except the obscurity of the UUID or it’s hash. The mantra applies quite well here since an attacker could stumble upon a valid hash or UUID and then change the data.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by StavrosK on Saturday July 25, 2020 @07:58PM (#23953294)
The attacker could stumble upon a valid hash like they could stumble upon a valid password.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bart__ on Saturday July 25, 2020 @12:27PM (#23950409)
I never really understood this argument, obscurity add an obvious layer of protection, not impenetrable of course, but still valid. Why is this different than an API key for example?
Re:Show HN: Textdb.dev – simple data sharing for fun projects by gregmac on Saturday July 25, 2020 @02:05PM (#23951215)
If compromised, you can change an API key. The key is like a password, and keeping that secret is important.

Where the "obscurity" aspect comes in, as an example, can be through the mechanism used to generate and validate that key.

Let's say you decide you don't want to or can't store the keys, and don't want a full pki system (public/private keys or certificates), so go with: sha256(clientid + userid + "hardcoded secret"). Your security now 100% relies on no one knowing that algorithm. If someone figures it out, you need to release a new version of your software, invalidate ALL API keys, and for that effort you still haven't done anything to prevent the same thing happening again.

A good test of this is: if someone has your source code, can they break your security mechanism? If yes, you're probably relying on security though obscurity. By contrast, if you're using asymmetric encryption to generate keys, it doesn't matter if someone knows that: if they don't have the private key, they can't do anything. (This leaves aside the issue of storing your private key or other secrets in source code, but I'd describe that as an operational failure rather than a fundamental design problem).

Re:Show HN: Textdb.dev – simple data sharing for fun projects by Chickenosaurus on Saturday July 25, 2020 @06:35PM (#23952916)
If a cryptographic hash function is used, the security of this scheme doesn't rely on keeping the algorithm secret, though. Therefore, it's not security through obscurity. Of course, weaknesses could still exist (e. g. a too small input space because the ID that is hashed has too little entropy).
Re:Show HN: Textdb.dev – simple data sharing for fun projects by melq on Saturday July 25, 2020 @12:36PM (#23950484)
Security through obscurity refers to relying upon keeping the details of the security mechanism secret. An API key itself is a secret, but the mechanism for how that key is generated and used is public knowledge.

In fact, the reason the best security mechanisms used today are so robust is specifically because they are made public in the first place.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @02:26PM (#23951346)
It is done, lmk if it works alright. The read only hashes should be visible beneath the data editing view on a new one.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by ASVVVAD on Saturday July 25, 2020 @05:32PM (#23952593)
Adding it to the homepage would be cool too ^^
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @06:18PM (#23952838)
How would you phrase it?

"write only link here"?

I really wanna keep the basic information visible and am not sure about about adding another line

Re:Show HN: Textdb.dev – simple data sharing for fun projects by ASVVVAD on Sunday July 26, 2020 @03:28PM (#23959495)
i meant under "Access your data with:" something like "Or read old link:"

but you're right it can be discovered