Forgive me this long list, I hadn't the time to make it short!
Function: a mapping from inputs to outputs, vs "a chink of code that runs and does arbitrary things with global state." Some languages resolve it by using the word procedure (and keyword proc).
(For an amusing read on this subject, see Chapter 5 of Let Over Lambda, which argues that Lisp is actually the least functional language!)
Deserve: can refer to unconditional rights, as well as conditional privileges. (e.g. "every child deserves a safe home", vs. "this person deserves to be punished.")
Positive/Negative have at least 3 separate meanings depending on context (good, present, self-amplifying). e.g. positive feedback can means the system is about to explode, positive symptom can mean "CIA replaced my Shasta again".
Normal can mean "happens all the time" or "is acceptable". Often those two are not in agreement. (People often fuse this one. If it's unusual then it must be bad! If it's common then it must be okay!)
Meaningful: something "means" something if it points beyond itself (as a symbol), or if it doesn't (direct experience).
Example: enjoying a sunset
The experience itself can be deeply satisfying. Or you can project ideas onto it like "I'm blessed", "I earned it", so the experience "points beyond" itself.
(Alan Watts has an excellent video on purpose and meaning, considering our approach to them a uniquely western neurosis.)
Serious: committed, vs overly heavy. People often confuse the two attitudes, which creates a lot of inner resistance. (And ironically produces childishness due to resistance to maturity.)
Selfish: prone to neglect others (bad), vs taking care of yourself (good and natural to every organism, yet often vilified in our culture). You can do both of course but they're kind of independent axes.
Several authors have written in defense of selfishness, but were so abrasive that they did the idea more harm than good!
Meditation can mean 10,000 different things, many of which are opposites (e.g. intentionally directing the attention, vs allowing it to wander freely). (Enlightenment is similarly open to interpretation, even within the same school of thought!)
Oh man. This gets really exciting when in addition the Finance team has to tell the SEC how many active users there are, but they're using different definitions every quarter because they get their numbers in some non-reproducible way from whichever of those other teams has time to help them this month.
Source: my own years on data warehouse and application development teams.
> can this subject perform this action on this object?
IMHO, the most elegant method to answer this question is capability based access control. If the subject can utter the action, then it can perform it. And then delegation is the transfer of nouns and verbs to perform the utterances.
> If the subject can utter the action, then it can perform it.
This sounds like another layer of weird terminology that doesn't mean anything for someone who is not familiar with whatever capability system you're thinking of.
Say I am a user who can see a particular directory on a shared setup. I try to upload a file in this directory, using the same method that worked on another directory. The question of AuthZ is: will I be allowed to do it or not? In the plain sense of the words, I can absolutely "utter the action", I have all of the "verbs" (upload) and "nouns" (the file, the destination path). Still, I should not be allowed to perform the action if I was only given read-only access here.
Now sure, you can say that "upload to dirA" is a different verb than "upload to dirB". But this is just confusing terminology, it doesn't enlighten anything.
Your accessor, dirB, should not contain the “upload files” verb, while your dirA accessor should.
My favorite example is the home directory and the file picker. Why should a program have access to all your files by default then politely ask you which file it should read/write to? It would make more sense if the file picker was something the operating system ran when a program wants to edit a file, and what came back to the program after you selected was the accessor for that file (with read and/or write verbs). So the program only have access to those files you have it access to.
If you use this API (via a simple widget library) then the user simply picks a file in their dropbox and the app gets access to that one file. Vs OAuth where you grant the app broad access to the whole dropbox (or maybe some sub-folder).
What you're describing is the difference between Fine Grained Authorization (FGA) and traditional Role-based Access Control (RBAC). This article covers the difference: https://www.osohq.com/learn/what-is-fine-grained-authorizati... (disclaimer: I used to work there but continue to be a fan of their documentation).
Sort of, but not really. OAuth isn’t RBAC and the Dropbox chooser isn’t FGA in the sense of that article. My book (linked from my profile) covers the distinctions in more detail in chapters 7, 8 and 9.
What you're describing is essentially what the authorization system would need to do in order to answer the question "can this subject perform this action on this object?". If you're suggesting that the program should receive a list a priori, then there are potential scale issues since that list would need to be exhaustive of both nouns and verbs, which can be a large set.
Instead of an authorisation system trying to find a reason to give you permission, you have to carry the proof in the form of a “verb”. Which you use when you perform the action.
Right, but where do you get the proof to begin with? Using your OS example, it seems like the OS would need to precompute all of the possible accesses for the file picker? In this case, the OS is an authorization system.
Do you mean that the directory should not be responsible for making this decision and there should be a central authorization authority?
First of all, this necessitates a certain data model, where instead of a "UploadFile(file, destPath)" operation, I have to have a "destPath.UploadFile(file)" operation. This would be ok for this case, but not all operations can be expressed in this simple parent -> child relationship.
Furthermore, even here, this doesn't cover another case: what if I am allowed to add files to destPath, but I'm not allowed to modify a specific file? This API still has to fail if `destPath/file.Name` already exists and I'm not allowed to modify it (or it at least has to do something different than when `destPath/file.Name` doesn't already exist).
And even if we accept that we can only ever write things in this way, this still leaves the problem of terminology intact. Depending on the technology, it's simply not true that I can't "utter this phrase" if I don't have the capability. For example, if this is an HTTP API, then I can always do a `POST /dest-path/upload-file` with the file I want, regardless of whether I have the authorization to access that or not. Sure, if it's a HATEOAS-style API, the `GET /dest-path` might not return a link to `./upload-file` at all, but that doesn't mean that I can't utter that sentence - i.e. issue that HTTP request.
I have designed capability based HTTP APIs before, it took some work but the end result was ergonomic. Of course over the web the capabilities must be secured in some way. I opted for keys to prove that you can perform a given action.
So, “utter” there means make a valid request with a key. On both the client side and the server side the keys and validations were invisible to the business logic, they just carried objects as usual.
You created capabilities by registering a handler for the operation, and got back a token object you could hand out and even send over the api to those who were meant to use them. And the clients got these objects which they could just manipulate and keep around for making API requests.
Oh, I'm sure it can be done, and what you're describing sounds quite nice.
All I take issue with is the claim that this is a way to make the unauthorized actions "impossible to utter". The reality is that, at least at some level, you always have to evaluate a request and, based on some cryptography related to user identity, decide if you'll honor it or refuse it. That may be checking a cookie to look up the user and then checking a separate place to see if the user is authorized to perform the action (perhaps with an extra step of finding a role, etc), or it can be checking a "pre-approval" signature obtained at some earlier point as you're describing here, but it's ultimately the same concept, and isn't "implicitly handled" in one case anymore than the other.
I would hate to argue over semantics. But in addition to the keys being checked automatically at run time, the type system ensured that, unless the capability had been revoked, illegal requests would not type-check at compile time. Which I think is pretty close to unutterable.
The keys were there to stop an attacker, the type-checker helps the good guys stay in line.
> the type system ensured that, unless the capability had been revoked, illegal requests would not type-check at compile time
I don't think I can imagine what you mean here. How would my compilation success depend on whether an Admin has given me the right to read or write to a certain path?
First, I am talking about the capability based HTTP APIs I have worked on here. Not some imagined operating system. I can see if I get around to your question in the other sub thread.
But the point is, you would not grant access to a “path” or some such. You gain access to a collection of actions, described by types. It can be simple “get/set property” or more complicated actions, maybe involving capabilities to several things at once.
To mint such an access token the “admin” will have say how the actions are performed, and then pass the token to you. The client code then will have a typed set of actions it can perform using the token.
This does not mean that we compile in the specific rights of each user or anything, it only means that we must ensure a valid flow of rights in order for the whole program to compile. You can get a capability in two ways: you mint a capability for something you already can do (you are the admin and own the data base, say), or you receive it (via an API call, say).
There is definitely a knack to design the system with this kind of flow. But once in place it feels very natural, you get the right to do something just in time for your need to do it. Very much principle of least privilege taken to an extreme.
> It would make more sense if the file picker was something the operating system ran when a program wants to edit a file, and what came back to the program after you selected was the accessor for that file (with read and/or write verbs).
You are describing the concept of XDG Desktop Portals [1] on Linux.
Indeed, that strikes me as a fine example of capability inspired design. The mechanism used is passing file descriptors, and for some reason file descriptors is the most "capability based" part of the Linux kernel.
I have more experience with authorization than most engineers, even engineers who have some experience with authn/authz, and I have no idea what that "subject can utter the action" or "transfer of nouns and verbs to perform the utterances" could mean
Not particularly an OOPer, but regardless tou're only making it less clear I'm afraid! "objects" and "methods" instead of what?
I'll make an educated guess that you mean "objects and methods" instead of "subject and action" or "noun and verb" respectively. But it's really the "utter" and "transfer" terminology that I have no idea what it might mean
> Capabilities achieve their objective of improving system security by being used in place of forgeable references. A forgeable reference (for example, a path name) identifies an object, but does not specify which access rights are appropriate for that object and the user program which holds that reference. Consequently, any attempt to access the referenced object must be validated by the operating system, based on the ambient authority of the requesting program, typically via the use of an access-control list (ACL).
> Instead, in a system with capabilities, the mere fact that a user program possesses that capability entitles it to use the referenced object in accordance with the rights that are specified by that capability. In theory, a system with capabilities removes the need for any access control list or similar mechanism by giving all entities all and only the capabilities they will actually need.
Even that is oversimplified. To launch nuclear-armed ICBMs, it takes to subjects to turn two keys separated by sufficient distance that no one person can turn both keys at the same time. In many cases, specially involving sysadmins, you want a quorum so a rogue sysadmin cannot lock others out or commit other destructive actions.
> ENTI- can you enter, ORI (or ORIZ) what can you do?
I don't mean to quarrel about it, but I understood Authentication to be closer to identification. To provide "adequate proof that you are actually who you claim to be".
Even the "can you enter" question falls under authorization; "does the user have appropriate permissions?" Entering is just one of perhaps many subsequent levels of permissions.
I think you've got the right idea, though in practice the initial "authentication" question (you are who you say you are) is very closely linked to the initial "authorization" evaluation (can you enter).... because in most systems the only "can you enter" authorization required for access is in fact that you are who you say you are.
But not all systems work this way. There are some systems where you can log in successfully, but then are immediately escorted out because the "can you enter" question has secondary considerations or is decided once identity has been established based on a larger criteria. Expired accounts in some systems work exactly like this.
One problem is that treating authentication as a "can you enter" authorization is predicated on the idea of a session-based system with two states, logged in or logged out. But there are many scenarios where e.g. taking some particular action requires authn and authz, regardless of login status. A simple example is performing some destructive action.
The distinction between authentication and authorization allows modeling of many different kind of systems, including the degenerate case where identification is treated as a proxy for authorization.
Btw, the kind of thinking behind that degenerate case is what leads to IDOR security bugs - "this person is logged in, so they can access whatever the URL says... even if it's another customer's data!" It turns out that thinking clearly about security helps be more secure, and unfortunately, vice versa.
Right. The de facto/apparent case that many users encounter shouldn't be considered the correct mental model or implementation pattern... it just explains why some people see it that way.
Not long ago I designed an authentication system which had to be disconnected from authorization pretty fully. The authentication was global in a multi-tenanted system, but access to any tenant was authorized at the tenant level (as well as all other authorization concerns). To be fair, there was some global authorization concerns, but the vast majority of authorizing actions, including tenant access was governed at the tenant level after authentication.
I love how the OIDC standard is littered with “authentication identity token code id cookie identifier” and many subtle variations of homonyms in slightly different combinations and orders.
I’m sure someone thought it all made perfect sense.
Probably someone who never confuses “empathy” and “sympathy” while also carefully distinguishing between “should” and “ought”.
What is missing is a graph of all the data and its relationships. Then its just a matter of grouping things together appropriately for humans to understand.
It's funny how a graph underlies absolutely everything but no one seems to use them.
Usually vendors fight over terminology because they want to "own" a portion of mindspace. Ultimately authorization is a programming problem, and people have devised very complicated declarative solutions like Google Zanzibar to avoid biting the bullet.
61 comments
[ 0.22 ms ] story [ 20.1 ms ] threadJust in the past year I have wasted several months pulling my hair out due to incorrectly named projects.
It really does turn out naming is important!
Function: a mapping from inputs to outputs, vs "a chink of code that runs and does arbitrary things with global state." Some languages resolve it by using the word procedure (and keyword proc).
(For an amusing read on this subject, see Chapter 5 of Let Over Lambda, which argues that Lisp is actually the least functional language!)
Deserve: can refer to unconditional rights, as well as conditional privileges. (e.g. "every child deserves a safe home", vs. "this person deserves to be punished.")
Positive/Negative have at least 3 separate meanings depending on context (good, present, self-amplifying). e.g. positive feedback can means the system is about to explode, positive symptom can mean "CIA replaced my Shasta again".
Normal can mean "happens all the time" or "is acceptable". Often those two are not in agreement. (People often fuse this one. If it's unusual then it must be bad! If it's common then it must be okay!)
Meaningful: something "means" something if it points beyond itself (as a symbol), or if it doesn't (direct experience).
Example: enjoying a sunset
The experience itself can be deeply satisfying. Or you can project ideas onto it like "I'm blessed", "I earned it", so the experience "points beyond" itself.
(Alan Watts has an excellent video on purpose and meaning, considering our approach to them a uniquely western neurosis.)
Serious: committed, vs overly heavy. People often confuse the two attitudes, which creates a lot of inner resistance. (And ironically produces childishness due to resistance to maturity.)
Selfish: prone to neglect others (bad), vs taking care of yourself (good and natural to every organism, yet often vilified in our culture). You can do both of course but they're kind of independent axes.
Several authors have written in defense of selfishness, but were so abrasive that they did the idea more harm than good!
Meditation can mean 10,000 different things, many of which are opposites (e.g. intentionally directing the attention, vs allowing it to wander freely). (Enlightenment is similarly open to interpretation, even within the same school of thought!)
Source: my own years on data warehouse and application development teams.
IMHO, the most elegant method to answer this question is capability based access control. If the subject can utter the action, then it can perform it. And then delegation is the transfer of nouns and verbs to perform the utterances.
This sounds like another layer of weird terminology that doesn't mean anything for someone who is not familiar with whatever capability system you're thinking of.
Say I am a user who can see a particular directory on a shared setup. I try to upload a file in this directory, using the same method that worked on another directory. The question of AuthZ is: will I be allowed to do it or not? In the plain sense of the words, I can absolutely "utter the action", I have all of the "verbs" (upload) and "nouns" (the file, the destination path). Still, I should not be allowed to perform the action if I was only given read-only access here.
Now sure, you can say that "upload to dirA" is a different verb than "upload to dirB". But this is just confusing terminology, it doesn't enlighten anything.
Your accessor, dirB, should not contain the “upload files” verb, while your dirA accessor should.
My favorite example is the home directory and the file picker. Why should a program have access to all your files by default then politely ask you which file it should read/write to? It would make more sense if the file picker was something the operating system ran when a program wants to edit a file, and what came back to the program after you selected was the accessor for that file (with read and/or write verbs). So the program only have access to those files you have it access to.
If you use this API (via a simple widget library) then the user simply picks a file in their dropbox and the app gets access to that one file. Vs OAuth where you grant the app broad access to the whole dropbox (or maybe some sub-folder).
Instead of an authorisation system trying to find a reason to give you permission, you have to carry the proof in the form of a “verb”. Which you use when you perform the action.
Do you mean that the directory should not be responsible for making this decision and there should be a central authorization authority?
Furthermore, even here, this doesn't cover another case: what if I am allowed to add files to destPath, but I'm not allowed to modify a specific file? This API still has to fail if `destPath/file.Name` already exists and I'm not allowed to modify it (or it at least has to do something different than when `destPath/file.Name` doesn't already exist).
And even if we accept that we can only ever write things in this way, this still leaves the problem of terminology intact. Depending on the technology, it's simply not true that I can't "utter this phrase" if I don't have the capability. For example, if this is an HTTP API, then I can always do a `POST /dest-path/upload-file` with the file I want, regardless of whether I have the authorization to access that or not. Sure, if it's a HATEOAS-style API, the `GET /dest-path` might not return a link to `./upload-file` at all, but that doesn't mean that I can't utter that sentence - i.e. issue that HTTP request.
So, “utter” there means make a valid request with a key. On both the client side and the server side the keys and validations were invisible to the business logic, they just carried objects as usual.
You created capabilities by registering a handler for the operation, and got back a token object you could hand out and even send over the api to those who were meant to use them. And the clients got these objects which they could just manipulate and keep around for making API requests.
All I take issue with is the claim that this is a way to make the unauthorized actions "impossible to utter". The reality is that, at least at some level, you always have to evaluate a request and, based on some cryptography related to user identity, decide if you'll honor it or refuse it. That may be checking a cookie to look up the user and then checking a separate place to see if the user is authorized to perform the action (perhaps with an extra step of finding a role, etc), or it can be checking a "pre-approval" signature obtained at some earlier point as you're describing here, but it's ultimately the same concept, and isn't "implicitly handled" in one case anymore than the other.
The keys were there to stop an attacker, the type-checker helps the good guys stay in line.
I don't think I can imagine what you mean here. How would my compilation success depend on whether an Admin has given me the right to read or write to a certain path?
But the point is, you would not grant access to a “path” or some such. You gain access to a collection of actions, described by types. It can be simple “get/set property” or more complicated actions, maybe involving capabilities to several things at once.
To mint such an access token the “admin” will have say how the actions are performed, and then pass the token to you. The client code then will have a typed set of actions it can perform using the token.
This does not mean that we compile in the specific rights of each user or anything, it only means that we must ensure a valid flow of rights in order for the whole program to compile. You can get a capability in two ways: you mint a capability for something you already can do (you are the admin and own the data base, say), or you receive it (via an API call, say).
There is definitely a knack to design the system with this kind of flow. But once in place it feels very natural, you get the right to do something just in time for your need to do it. Very much principle of least privilege taken to an extreme.
1. https://wiki.archlinux.org/title/XDG_Desktop_Portal
I'll make an educated guess that you mean "objects and methods" instead of "subject and action" or "noun and verb" respectively. But it's really the "utter" and "transfer" terminology that I have no idea what it might mean
https://en.wikipedia.org/wiki/Capability-based_security
> Capabilities achieve their objective of improving system security by being used in place of forgeable references. A forgeable reference (for example, a path name) identifies an object, but does not specify which access rights are appropriate for that object and the user program which holds that reference. Consequently, any attempt to access the referenced object must be validated by the operating system, based on the ambient authority of the requesting program, typically via the use of an access-control list (ACL).
> Instead, in a system with capabilities, the mere fact that a user program possesses that capability entitles it to use the referenced object in accordance with the rights that are specified by that capability. In theory, a system with capabilities removes the need for any access control list or similar mechanism by giving all entities all and only the capabilities they will actually need.
https://capnproto.org (used by Cloudflare)
https://spritely.institute/goblins (with wasm support via Hoot)
https://ocapn.org (where things come together in a future open standard)
(shameless plug)
I'd like to fix the prior abstract. Auth and auth upsets me greatly cos we have:
Authentication & Authorization
and we call both/either auth. Hence please help me make this a thing:
AuthENTIcation & AuthORIzation : ENTI & ORI
ENTI- can you enter, ORI (or ORIZ) what can you do?
I don't mean to quarrel about it, but I understood Authentication to be closer to identification. To provide "adequate proof that you are actually who you claim to be".
Even the "can you enter" question falls under authorization; "does the user have appropriate permissions?" Entering is just one of perhaps many subsequent levels of permissions.
But not all systems work this way. There are some systems where you can log in successfully, but then are immediately escorted out because the "can you enter" question has secondary considerations or is decided once identity has been established based on a larger criteria. Expired accounts in some systems work exactly like this.
The distinction between authentication and authorization allows modeling of many different kind of systems, including the degenerate case where identification is treated as a proxy for authorization.
Btw, the kind of thinking behind that degenerate case is what leads to IDOR security bugs - "this person is logged in, so they can access whatever the URL says... even if it's another customer's data!" It turns out that thinking clearly about security helps be more secure, and unfortunately, vice versa.
Not long ago I designed an authentication system which had to be disconnected from authorization pretty fully. The authentication was global in a multi-tenanted system, but access to any tenant was authorized at the tenant level (as well as all other authorization concerns). To be fair, there was some global authorization concerns, but the vast majority of authorizing actions, including tenant access was governed at the tenant level after authentication.
or 4entic5 and 4oriz5, inverting the k8s, i18n pattern...
pronounced "forentics" and "forizes"...
somebody stop me!
Nice work and all regardless
I’m sure someone thought it all made perfect sense.
Probably someone who never confuses “empathy” and “sympathy” while also carefully distinguishing between “should” and “ought”.
It's funny how a graph underlies absolutely everything but no one seems to use them.