Internet-Draft | Capabilities for Distributed Authorizati | June 2023 |
Finkhaeuser & Penna | Expires 3 December 2023 | [Page] |
Authorization is often the last remaining centralized function in a distributed system. Advances in compute capabilities of miniaturized CPUs make alternative cryptographic approaches feasible that did not find such use when first envisioned. This document describes the elements of such cryptographically backed distributed authorization schemes as a reference for implementations.¶
This note is to be removed before publishing as an RFC.¶
The latest revision of this draft can be found at https://specs.interpeer.io/. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-jfinkhaeuser-caps-for-distributed-auth/.¶
Discussion of this document takes place on the interpeer Working Group mailing list (mailto:interpeer@lists.interpeer.io), which is archived at https://lists.interpeer.io/pipermail/interpeer/. Subscribe at https://lists.interpeer.io/mailman/listinfo/interpeer. Working Group information can be found at https://interpeer.io/.¶
Source for this draft and an issue tracker can be found at https://codeberg.org/interpeer/specs.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 3 December 2023.¶
Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.¶
In 1964, Paul Baran at the RAND Corporation described centralized, decentralized and distributed communications networks and their properties [RM3420]. Baran's argument was that because in distributed systems, each node can reach many other nodes, failure of a single node need not impact the ability of other nodes to communicate.¶
This resilience is desirable in distributed systems today. Therefore it seems an oversight that authentication and authorization in modern system is often a centralized function.¶
This document explores previous attempts at distributed authorization schemes, and outlines common elements of such solutions in order to provide a reference for future work.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
In order to respect inclusive language guidelines from [NIST.IR.8366] and [I-D.draft-knodel-terminology-10], this document uses plural pronouns.¶
Distributed authorization is not a goal in itself, but may be desirable in distributed systems.¶
It's also worth exploring how the distribution of authorization functions related to authentication. In many systems, these are intrinsically linked. Logging in with a user name and password is one such example. Providing the correct password proves that the person at the keyboard is authorized to access a resource. But at the same time, providing the correct password in combination with a user name authenticates this user. Furthermore, any permissions granted to the user are typically linked to the user name, as that remains stable throughout password changes.¶
Password-based authentication mechanisms require that the tuple of user name and password (or password hash) are sent to some central repository where records of such tuples are kept; if the tuple is found, the user name is authenticated.¶
This common scheme mixes different aspects to authentication, however, which are worth disambiguating.¶
The act of logging in establishes an association between a user name and the person interacting with the device. More broadly speaking, (parts of) a three-way endowment are performed: an identifier is endowed with attributes, which describe a person in sufficient detail to identify them. The term "endowment" is used here because it is a superset of the more common "identity assertion", and also is less easily confused with the totality of identification concerns.¶
Logging in also proves that the person interacting with the device is in possession of some secret; this secret should only be known to the person which matches the description in the endowment step above.¶
This distinction becomes somewhat more relevant when we move towards distributed authentication schemes, which rely on public key cryptography. For now, consider that it is the combination of endowment and secret proving that make up authentication.¶
In Web of Trust based systems, starting with Philip R. Zimmermann's Pretty Good Privacy (PGP), public keys are exchanged with some metadata attached. This performs some part of endowment in that it provides the link between a public key and a user identifier (see [RFC4880], Section 11.1).¶
Other parts of endowment are not specified. These often consist of manual checks that the user identifier belongs to some person holding the corresponding private key, and may involve verifying of government issued identification documents. Once such a check is passed, the verifier issues a digital signature over the tuple of user identifier and public key to provide some proof that the verification has occurred.¶
Endowment in Web of Trust occurs when a sufficient number of sufficiently trustworthy signatures have been reached. The precise number of signatures and trust levels to be deemed sufficient is in the control of the recipient of transferable public key packets, however.¶
A similar concept is applied in TLS [RFC8446], where [X.509] certificates are used for endowment.¶
The major difference to Web of Trust based systems is how trust is established. Instead of relying on a recipient defined method of determining trust, certificates are issued by one of a set of well-known trust sources. Information on these is stored in root certificates, which are distributed to the machines participating in the system.¶
While there are globally issued root certificates for entities that perform endowment professionally, it is always possible for a system designer to include other root certificates.¶
Neither [X.509] certificates nor the transferable public key packets in [RFC4880] provide any means for secret proving. This is left to other parts of TLS or PGP.¶
In TLS, the handshake during connection establishment is used to send challenges that only machines with the correct private key can respond to. PGP, which aims to provide privacy at rest, simply encrypts content with a secret key which is then encrypted with the recipient's public key. Other parties cannot decrypt this, which keeps content safe.¶
TLS and PGP are not the only public key cryptography based authentication systems, but they can stand in for the two most common classes of such systems: one aims to establish trust from authoritative sources. The other aims to establish trust based on the trust requirements of the recipient.¶
Both systems also strictly speaking separate endowment from secret proving. While in TLS the certificates are transmitted as part of the overall handshake, creating certificates nevertheless occurs beforehand. This temporal decoupling is a key property that may also be applied to authorization.¶
Dividing the authentication problem into endowment and secret proving helps illustrate how web of trust systems introduce temporal decoupling between these functions, in a way that e.g. TLS does not.¶
In much the same way, dividing the authorization problem into querying an authorization database and granting access to an object suggests that authorization, too, can be temporally decoupled.¶
This section lists prior work where some temporal decoupling of this kind has been performed.¶
Dennis and Van Horn described an approach for securing computations in "multiprogrammed" systems in 1965/66 ([OCAP]). The context in which they operated had little to do with modern distributed systems.¶
However, they recognized the trend of running computing systems complex enough that multiple programmers would contribute to its overall function. This raised a desire for access control to individual sub-functions, which a security kernel within the operating system was to provide.¶
The key differentiator to other systems was that in OCAP, a calling process was to present a "capability", a serialized token to the process being invoked. This capability was intended to encode all relevant information the called process would need to determine whether the caller was permitted to perform such an action.¶
These properties of being serializable and containing all relevant authorization information imply that, conceptually, capabilities are cached results of an authorization query . The called process can then perform access granting without issuing such a query itself, thereby temporally decoupling the two functions.¶
The OCAP system proved to have a particular weakness, namely that "the right to exercise access carries with it the right to grant access". This is the result the information encoded in an OCAP capability: it contains a reference to the object and action to perform, but does not tie this to any identity.¶
In 1988, Li Gong sought to address this with an Identity-Capability model ([ICAP]). Including an identity in the capability token arrives at the authorization tuple in Section 3.2.¶
Furthermore, ICAP introduces the notion of capability use in networked systems. ICAP does this by temporally decoupling the authorization query from access granting.¶
The main criticism levelled against the paper and capability-based approaches in general in the following years was that some functions were missing, such as a check for revocations. Proposals to address this often added centralized functions again, which led to criticism of the distributed approach in general.¶
While we previously discussed PGP in terms of authentication in Section 3.1.1, a key property of PGP is the introduction of trust signatures ([RFC4880], Section 5.2.3.13).¶
Trust signatures do not merely authenticate a user, they introduce a kind of authorization as well, as they carry specific notions for what the provided public key may be trusted for. The trust signature thus encodes specific kinds of privileges of an authorization tuple , while the public key encodes a subject . The only component missing in the tuple is the object .¶
While the authorization tuple in PGP is incomplete, the system is based on public key cryptography, and can thus be used to securely verify a binding between the tuple elements.¶
JSON Web Tokens ([RFC7519]) provide a standardized way for serializing access tokens. Current uses are in systems with centralized authorization functions such as OAuth ([RFC6749]).¶
However, the fundamental notion of capabilities, that a serializable token carries authorization information, is provided also here. Furthermore, JWT combines this with cryptographic signatures, providing for - in theory - temporal decoupling as previously discussed.¶
It's well worth pointing out that JWT is suitable as a portable, modern capability format - all it requires is to encode all necessary information within its fields. One serialization format in JWT for this is [UCAN].¶
Aimed at the linked data space, [ZCAP-LD] is an expression of cryptographic capabilities for authorization that relies heavily on linked data. While conceptually, the specification shares many similarities with the capability concept in this document, the use of linked data can lead to systems that do not provide for temporal decoupling .¶
Linked data has the downside here that data relationships may need to be resolved at the time of access granting , thus effectively re-introducing parts of an authorization query again at this point.¶
The concept of distributed systems underlying linked data thus differs fundamentally from the one in [RM3420]. Where the former treats distribution as distribution of concerns across different services providing parts of the linked data set, the latter is more concerned with resilience, specifically how to continue operating in the (temporary) absence of such services.¶
The oldest kind of prior work in this field is the concept of Power of Attorney, as exercised throughout much of human history.¶
In a Power of Attorney system, an authority (a king, etc.) grants a token (an official seal, ...) to a subordinate which makes this subordinate recognizable as carrying some of the king's powers and privileges.¶
Modern day Power of Attorney systems abound, and may be formalized as notarized letters granting such and such rights to other people.¶
Capability-based authorization schemes are no different to this kind of system in principle. In both kinds of systems, the token itself encodes the privileges of the bearer. [POA-IOT] describes such a system for the Internet-of-Things.¶
Use cases relate to one or more of the issues explored in the problem space.¶
On-boarding IoT devices into an overall system requires authentication and authorization; this may need to be mutual.¶
In such scenarios, new devices rarely have connectivity before completing on-boarding. It follows that authentication and authorization must work in a fully offline fashion, which in turn requires that authorization tokens provided to the device contain all information required for the authorization step. As described in Section 4.1, this translates to a requirement of temporally decoupling access granting from an authorization query.¶
This specific problem is also addressed in [POA-IOT] and related work.¶
A similar argument applies to control handover of unmanned aerial vehicles (UAV). The concept of Beyond Visual Line of Sight (BVLOS) missions is to send drones into places that are harder or more costly to reach for humans.¶
Control handover refers to transferring operational control for a drone from one ground control station to (GCS) another. Control handover bears similarities to IoT on-boarding in that the drone is on-boarded to a new control system (and the previous system relinquishes control).¶
In general, aviation authorities such as FAA, EASA, etc. expect control handover to occur under ideal circumstances, in which centralized authorization schemes suffice. There is, however, a class of scenarios where connectivity to a central service cannot be guaranteed.¶
In order to guarantee BVLOS operations in very remote locations, research projects such as [ADACORSA] assume use cases in which two ground control stations between which handover occurs to not have connectivity to each other.¶
In such cases, it is necessary for the UAV to act as a time-delayed transmission channel for authorization information between the GCSes.¶
Emergency response teams may require UAVs in the vicinity to immediately clear the airspace and go to ground. This effectively translates to the emergency response team operating a ground control station that takes over control and issues a single command.¶
As emergency responses are, by definition, typically required in situations where normal operations cannot be assumed, this includes the assumption that connectivity cannot be assumed. Nevertheless, such an emergency control handover must be possible.¶
A comparable scenario to the above describes situations in which UAV attach to a mobile ground control station. Specific scenarios may range from cave exploration to investigating burning buildings.¶
The commonality here is that the UAV cannot establish connectivity to a wider system, but can connect to the mobile GCS. This in turn may act as a communications relay to the outside world, but may be too limited in capacity to permit online, centralized authorization.¶
If fast authorization is a goal, reducing the number of roundtrips to establish a privilege follows. Due to the temporal decoupling that cryptographic capabilities provide, they're suitable for use in 0-RTT scenarios.¶
Of course, authorization can only follow when authentication already occurred. Authentication in a 0-RTT protocol is predicated on prior key exchange and verification.¶
Both [WIREGUARD] and DTLS 1.3 [RFC9147] offer 0-RTT handshakes. In the former, keys are pre-shared out of band, because WireGuard is used to establish static VPN tunnels. Because mutual authentication is assumed to be part of this process, authenticated encryption is sufficient to ensure that the keys are safely associated with network addresses in a 0-RTT roundtrip.¶
By contrast, DTLS simply offers different kinds of handshakes. 0-RTT can only be used for reconnection when a previous full handshake has provided sufficient authentication.¶
In either case, adding a capability to this 0-RTT handshake would also yield 0-RTT authorization, as long as the key that authenticates the remote party is also the subject of the authorization triple.¶
[RFC8280] lists a number of distinct objectives that help support human rights in protocol design. The above distributed authorization scheme addresses a number of them, such as Connectivity, Reliability, Content agnosticism, Integrity, Authenticity, Pseudonymity, Censorship Resistance, Outcome Transparency, Adaptability, Decentralization and Security, and by way of producing this document, Open Standards.¶
Rather than address each in detail, suffice to say that the use of pseudonymous public keys, and proofs based on cryptographic signatures, the majority of these objectives are reached.¶
It remains to highlight that the scheme outlined in this document observes the end-to-end principle, precisely by temporally decoupling different concerns. This permits for almost arbitrarily disrupted connectivity, and thus also censorship resistance. As capabilities can travel entirely out-of-band to any resource data, e.g. by sneakernet or similar means, they can be a building block of protocols that provide better human rights protections than systems that rely on temporal coupling of authorization concerns.¶
As explored in the previous sections, the most fundamental aspect of a distributed authorization scheme is that it decouples access granting from authorization queries by serializing the results in such a way that they can be transmitted and evaluated at a later date. This effectively shifts the focus of distributed authorization systems away from request tuples towards authorization tuples. ¶
This implies certain things about the contents of a capability token, but it also introduces other elements and roles into the overall scheme.¶
A grantor, sometimes called principal, has authority over an object, and generates authorization tuples for use in the overall system.¶
As we describe cryptographic systems, a grantor is represented by an asymmetric key pair. Endowment for a grantor is out of scope of this document; for the purposes of distributed authorization, the grantor key pair is the grantor.¶
A grantor identifier uniquely identifiers the public key of the key pair; this may be identical to a serialized form of the public key itself, or a cryptographic hash over it (fingerprint), or some alternative scheme.¶
What is sufficient is that there MUST exit a mechanism for uniquely mapping the grantor public key to the grantor identifier and vice versa. This mapping permits verification.¶
The grantor undersigns a capability by adding a cryptographic signature to it.¶
The agent is the element in a distributed system that executes a requested action after verifying a capability. It typically manages objects itself, or provides access to them.¶
The verifier is a role in the system that verifies a capability. While verifiers can exist in a variety of system nodes, it's a mandatory part of the agent role.¶
Outside of the agent, verifiers may exist in intermediary nodes that mediate access to agents. An example here might be an authorization proxy that sits between the public internet and a closed system. While it may not be an agent in and of itself, it can still decide to reject invalid requests, and only forward those to agents that pass verification and its own forwarding rules.¶
We introduce the concept of a time-delayed transmission channel to illustrate that communications between grantor and verifier is not possible in real-time.¶
In practice, of course the transmission channel does not have to be time- delayed. But treating it as such implies that granting access must be temporally decoupled from the authorization query.¶
The grantee is the entity to which a privilege is granted.¶
A grantee SHOULD also be represented by an asymmetric key pair in order to perform distributed authentication.¶
A grantee identifier is the identifier used as the subject in an authorization tuple.¶
If the grantee is equivalent to an asymmetric key pair, it MUST also be possible to map the grantee identifier to the grantee public key and vice versa. Such a mapping SHOULD be feasible to perform without connectivity in order to maintain the distributed authentication mechanisms achieved through the use of asymmetric cryptography.¶
An object is a resource the grantee wishes to access. This can be a file, or a networked service, etc.¶
The object identifier uniquely identifiers an object. This document places no syntactic restrictions upon the object identifier, other than that there exists a canonical encoding for it. For the purposes of cryptographic signing and verification, the object identifier MUST be treated as equivalent to its canonical encoding.¶
A privilege encodes whether an action (on an object) is permitted (for a subject); see {#sec:authorization} for an explanation.¶
For the purposes of creating capabilities, a privilege must have a canonical encoding. The semantics of each privilege are out of scope of this document, and to be defined by the systems using distributed authorization.¶
That being said, a typical set of privileges might include read and write privileges for file-like resources.¶
In practical applications of distributed authorization scheme, validity of a capability may be further scoped. We already discussed the need to scope it to an authorization tuple, but further restrictions are likely desirable.¶
For example, a set of not-before
and not-after
timestamps exist in e.g.
[X.509] certificates; similar temporal validity restrictions are likely
required in practical systems.¶
However necessary they may be in practice, however, such additional validity metadata has no bearing on the fundamental concepts outlined in this document, and is therefore considered out of scope here.¶
A capability provides a serialized encoding of previously listed elements:¶
Fundamentally, a capability MUST encode an authorization tuple, consisting of:¶
The authorization tuple permits an agent to determine what kind of access to grant or deny. The grantor identifier provides information to the verifier about key pairs used in the authorization. While the signature proves to the verifier that the grantor did indeed authorize access, the validity metadata limits access to whichever additional scope the grantor decided upon.¶
Note that each of the fields in an authorization tuple may be treated as a list of zero or more such elements. While a longer discussion of this is out of scope for this document, two notes should be made:¶
Having identified the elements, we can now describe an abstract process in a distributed authorization system.¶
The process is split into two phases.¶
In the first phase, the grantor issues an authorization query (((authorization query))) to an authorization tuple store, which stands in here for the specific process by which authorization is managed, and produces tuples. Based on the response, it serializes a capability and adds its signature over it.¶
The capability then gets transmitted via the time-delayed transmission channel to the second phase, providing temporal decoupling between the phases.¶
In the second phase, the grantee requests access to some object from the agent. The agent must send a verification request to the verifier (which may be a subroutine of the agent; no network transmission is implied here). The verifier responds by either permitting access or not. If access is permitted, the agent grants access to the grantee. Because the capability encodes all required information for the verifier to perform this step, it does not need access to the authorization tuple store itself.¶
Note that the capability can be transmitted to any entity in the second phase; all that is relevant is that it ends up at the verifier. If it is transmitted to the grantee, it has to pass it on to the agent as part of the access request. If the agent receives it, it has to pass it on to the verifier as part of the verification request.¶
One of the more powerful applications of the power of attorney system is that it is possible to further delegate authority. The constraint is that no entity can provide more authority in a sub-grant than it possessed in the first place.¶
The ability to generate sub-grants is easily provided in a specialized privilege. Such a privilege must encode the specific other privileges a grantee may in turn grant to other parties.¶
As this may include the ability to grant further sub-grants, implementations MUST take care here. They MAY wish to include a limit on the depth to which sub-grants may be further delegated.¶
This document lists human rights considerations as a use case, see Section 5.4.¶
There are no specific protocol considerations for this document.¶
However, protocols transmitting capabilities MAY provide some relief to human rights concerns Section 5.4, e.g. by providing confidentiality via encrypted transmission.¶
This document does not specify a network protocol. In fact, it deliberately requires no specific protocol for transmitting capabilities. As such, much of [BCP72] does not apply.¶
However, distributed authorization does not require the invention of new cryptographic constructs; the document is deliberately phrased such that the choice of such constructs remains implementation defined.¶
As such, some security considerations are supported by the use of capabilities for distributed authorization, such as preventing unauthorized usage and inappropriate use.¶
Some notes on specific considerations follow.¶
Denial of service mitigation is out of scope, because this document does not describe a protocol.¶
However, as avoiding a single point of failure (Section 3.2.1) is one of the problems that distributed authorization schemes address, it can easily be argued that preventing denial of service is a major concern of this document, and consequently fully addressed here.¶
As ICAP was criticized for introducing a centralized solution for revocatins, (see Section 4.2), a modern distributed authorization system must adequately consider these.¶
Fortunately, anything that can encode the granting of a privilege can also encode the removal of said grant, by - essentially - encoding a negative privilege. Doing so provides distributed revocations by the same overall mechanism that distributed authorization is provided. A sequence of grants and revocations for a particular request tuple will map to a sequence of Boolean values, and can so be understood as a bit stream.¶
This introduces a new requirement, namely that verifiers can reconstruct the bit stream in order to understand the latest, most up-to-date state. Unfortunately, this can be hard due to the time-delayed nature of the transmission channel.¶
Fortunately, research into conflict-free replicated data types has yielded several methods for ordering also partially received streams, which can be applied here by providing appropriate validity metadata. This yields eventually consistent states in a distributed authorization system, which in many cases may be sufficient.¶
It is not the purpose of this document to prescribe any particular method for ordering grants and revocations into a consistent stream, nor whether revocations are used at all. However, implemtations MUST take care to consider this aspect.¶
As part of supporting human rights considerations as a first class use case, exploring privacy considerations as covered by [RFC6973] is worthwhile.¶
In particular, distributed authorization schemes address the concerns of: intrusion and misattribution (as related to pseudonyms only).¶
It's also worth highlighting that surveillance and stored data concerns, as well as disclosure, are not addressed. In order for distributed capabilities to work, any likely recipient needs to be able to decode them.¶
The threat model then assumes that all capability data is accessible to anyone, which is why the use of pseudonymous public-key based identifiers is suggested. Sufficient care must be taken in key rotation, etc. in order to provide additional protections.¶
Note that despite this, nothing prevents a system from encrypting capabilities for use only by a single authorized party, which means that these last concerns can be addressed in the surrounding system.¶
This document has no IANA actions.¶
Jens Finkhaeuser's authorship of this document was performed as part of work undertaken under a grant agreement with the Internet Society Foundation [ISOC-FOUNDATION].¶
Section 3.2.2, Paragraph 1; Section 4.1, Paragraph 4; Section 4.5, Paragraph 2; Section 6, Paragraph 1¶
Section 3.2.2, Paragraph 1; Section 4.1, Paragraph 4; Section 4.5, Paragraph 2; Section 6, Paragraph 1¶
Section 3.2, Paragraph 6.12.1; Section 4.2, Paragraph 2; Section 4.3, Paragraph 2; Section 6, Paragraph 1; Section 6.1, Paragraph 1¶