Live data from Hacker News

Authorize, don't authenticate

blog.marcua.net

21–30 of 49 posts

Re: Authorize, don't authenticate

#21
(c.f. other comments about confusing misuse of security terminology)

An easy way to remember the difference between the As in AAA:

    Who is your daddy, and what does he do?
    ^ authentication       ^ authorisation
And the all too often forgotten final A is accounting, for which you can imagine Arnold writing down the interaction in his police notepad.

:-)

Re: Authorize, don't authenticate

#22
post #4

1. How do you get around performance issues? If I have a difficult join and you have a slow database, or you have a flaky connection, how can I debug the problem on my end? 2. What stops me (or any attacker) from exploiting your lack of security? Are you 100% sure you are secure? 3. You mention collaboration - How does this work at a company level if we have many users and need to control access - the company is the…

Author here.

Thank you for your questions. I'll take a stab at answering them: * The underlying databases that ayb fronts are SQLite and DuckDB. Both are relatively battle-hardened RDMBSs. That said, I don't think the approach I'm proposing has any bearing on the difficulty of a query: if a centralized DB would struggle with a query workload, the personal DB is likely to as well. One saving grace is that workloads are slightly more isolated in my approach: someone else's data that's poorly shaped for a query shouldn't affect your queries, which is not something most all-users-in-the-same-database approaches can claim. * I make no special security claims beyond what is listed in the documentation [1]. ayb specifically has been used in production by low single digit numbers of people, so you should absolutely wait to use it for any super-sensitive data, especially in a shared/multi-tenant context. That said, you should be no more confident in the random web app that stores your data for you than you are in ayb's security. * This blog post is focused on personal data: the to-do list, the streaks/goals you've set out for yourself, your database of newsletter subscribers. I think there's some interesting work to be done in the enterprise around access control. In ayb, there are coarse-grained sharing/permissions [2], but I don't think that's enough for most enterprise situations.

[1] https://github.com/marcua/ayb#isolation [2] https://github.com/marcua/ayb#permissions

Re: Authorize, don't authenticate

#23
post #15

> It’s your data! You shouldn’t have to prove to anyone else that you have the right to access it. How does the service know who you are? That's the point of authentication. Once that question is settled, the service can decide what you are authorized to do. You need both.

Author here!

Thank you for asking. It's a difficult concept to wrap one's head around, but I think the video attached to the blog post shows it most clearly. There's no authentication with the application in the traditional sense, and the application never asks for your identity. You ARE authenticated with the database provider (ayb's thedata.zone in the video), which passes a token to the application so that the app can prove it has been authorized to access the database on future requests.

Re: Authorize, don't authenticate

#25
post #21

(c.f. other comments about confusing misuse of security terminology) An easy way to remember the difference between the As in AAA: Who is your daddy, and what does he do? ^ authentication ^ authorisation And the all too often forgotten final A is accounting, for which you can imagine Arnold writing down the interaction in his police notepad. :-)

Simplified:

    Who are you and what do you want?

Re: Authorize, don't authenticate

#26
post #18

Got drawn to the topic, however usage of authentication and authorization seem like misnomer here, the core topic seems to be data ownership The concept on a surface level to have ownership over the data makes a lot of sense and to a large part the support exists in a fragmented manner across the different providers/applications. The concrete idea of user having a database and then authorizing that to the service is…

(Author here) Thank you for pushing on this. Some clarifications that might help you see this as more practical than your initial impression: * I totally agree that databases require maintenance, HA, etc. My argument is not that someone running a database magically doesn't have to do these things, but rather that the person running the database doesn't have to be the person running the app. In the video attached to t…

For the sake of discussion lets leave the business aspect. What you are offering is a service for managed database, similar to lot of cloud providers. What you have on the top of it is a OAuth2 process to obtain relevant credentials.

From practical standpoint you have to consider that the traditional use case for databases has been N:1 (n application instances, 1 DB) and you are inverting this.

There might be some unique B2C scenario where this makes business sense, however if you are providing database service then I cannot see how this would be any different.

On a side note, there are quite a number of B2B scenario where the client provides the DB for data residency requirements and the service providers uses that DB to manage the data on behalf of the client.

The price is also a big concern, a user scope database is going to be quite costly, as a provider you would end up sharing the infrastructure

Lastly I will repeat it again, schema migrations are as much as database level concern, and migrating N databases above a certain scale is not easy.

Re: Authorize, don't authenticate

#27
post #7
post #2

We are back to File->Open I guess. We could use native applications instead of web apps while we're at it. Sadly this approach does not work for a lot of (web) apps.

yeah, to me this also pretty much sounds like the approach we started with, we bring our data (as a file) into the application and it stores it back if we want to.

Everything old is new again. We started with timeshare machines (there is only market for 7 computers in the world) where you accessed with VT102 etc terminals.

Then we went to personal computers with local data and code.

Now we are back to a handful of massive timeshare machines (AWS, Azure, ..) that keep your data and let you only access with HTTP/HTML terminals.

Now if people get angry enough with Salas enshittification we'll go back to personal computers again...

Re: Authorize, don't authenticate

#28
Absolutely. A service has no business to know who you are. They should only care if the user has authorization.

Authentication has historical reasons. Employee access, citizen services etc all are identity based. Identity was translated into authorisation for multiple services instead of each service requiring it's own authorisation.

Re: Authorize, don't authenticate

#29
post #21

(c.f. other comments about confusing misuse of security terminology) An easy way to remember the difference between the As in AAA: Who is your daddy, and what does he do? ^ authentication ^ authorisation And the all too often forgotten final A is accounting, for which you can imagine Arnold writing down the interaction in his police notepad. :-)

It seems like your unnecessarily kinky mnemonic also forgot the third "A". Don't mnemonics usually cover the entire list of the thing you want to remember?

Re: Authorize, don't authenticate

#30
post #21

(c.f. other comments about confusing misuse of security terminology) An easy way to remember the difference between the As in AAA: Who is your daddy, and what does he do? ^ authentication ^ authorisation And the all too often forgotten final A is accounting, for which you can imagine Arnold writing down the interaction in his police notepad. :-)

Simplified: Who are you and what do you want?

Vorlons authenticate, Shadows authorize
Post reply on HN