WSGI Middleware to "Bring Your Own IDentity" to a web server
Project description
README for ARPA2 WSGI middleware
WSGI enables middleware, which is a perfect place for enforcing ARPA2 Identities, ranging from authentication to authorisation through access control.
Background links:
- InternetWide Identity Design
- ARPA2 Identity (formerly known as DoNAI) supports many forms and several tricks
- ARPA2 Selector
- Access Control with efficient implementation and a design for backend protocols.
HTTP SASL handled with WSGI SASL
Most protocols that require authentication make use of the SASL protocol. Maybe it is better to say that SASL is a kind of tunnel that passes through a protocol to exchange authentication in a flexible manner. Most importantly, the mechanisms can be plugged into software independent of the protocol that uses SASL and one infrastructure can be shared by all the protocols.
HTTP has not had SASL implemented. We have specified HTTP SASL to fix that, and stop the ongoing need for authentication systems built into the (rather insecure) JavaScript namespace. We are implementing it with a few Java demonstrations, as well as a browser extension with native messaging so we may reuse desktop credentials from a trusted application outside the browser. Yes, that includes one's Kerberos login and yes, it enables the use of pseudonyms during realm crossover.
We are hoping to develop a Python WSGI component for the server side. It would sit between the web server and WSGI application, and detect 401 or 407 responses, annotate them with SASL authentication option and hope to find a browser that responds to the option of SASL authentication.
Current status: There is no reasonable support for server-side SASL at this moment. We have asked others to help out with this.
HTTP User handled with WSGI User
Authentication users are client identities. Most protocols also recognise a user on the server side, but HTTP does not. And if it does, it is supposed to be the same as the client identity, which is thereby forced to fall under the server's realm. We see the resuls everywhere; the web asks you to create an account on many sites you visit. This is not practical.
We therefore proposed an extension to HTTP that explicitly indicates the User as part of the resource name space identification on the server or, in URI terms, of the authority. If we move towards peer-to-peer HTTP service, this is going to be helpful for routing requests, perhaps in combination with encrypted portions in the initial TLS messages.
This extension to HTTP is straightforward, and it has been implemented
for WSGI in the WSGI_User
class. This reads the User
header,
removes %
-escapes, applies a syntax check that defaults to the
NAI syntax
with a default-on option to also allow empty strings, and if it
matches, passes the value in a LOCAL_USER
environment variable
and will signal the impact on caching by adding a Vary: User
response header.
By default, WSGI-User implements backward compatibility with two older habits:
- Basic authentication with a username and empty password
- Local server convention for
/~username
paths
Both are a bit cluttered in comparison to the User
header.
Basic authentication conflates client and server identities and
invalidates intermediate caching; local server conventions do not
permit inferencing in clients or by their human users (and makes
them resort to inconsistent, deductive reasoning).
Current status: The code performs well in our test programs. Please try it live and report to us!
Bring Your Own IDentity
We are considering a BYOID mechanism based on Diameter servers hosted under domain names. This is not a web-only technology, so we are not limited to HTTP and can make a choice for a more dedicated technology.
Diameter is the sequel to RADIUS; its security is better so it can be used for such realm crossover purposes; indeed, there are SRV records in DNS for this kind of purpose. Diameter's support for bulk interactions and routing of requests and responses has also improved. Finally, it is easier to extend with notions such as SASL fields.
With this in mind, a server receiving a client identity
john@example.com
can lookup the Diameter server for example.com
and relay SASL traffic to the realm. It does not need any local
credentials to allow for this to work; all it needs to do is use
TLS for trust in the link to the backend Diameter server.
This is not the only way in which we think BYOID can be achieved. It will me much more powerful once we get our projects for Kerberos going: Impromptu Realm Crossover (KXOVER) and TLS-KDH. The advantage of these mechanisms is that a crossover relation is made between realms, not just for individual queries of individual users. This makes it extremely efficient for bulk use, but it will also take longer to get established. It is useful though; TLS-KDH authenticates thousands of times faster than tradition public-key certificates, and it resists quantum computers; KXOVER currently cannot match that last point, but will develop in that direction too. SASL is the short-term solution that can integrate seemlessly with this same approach.
ARPA2 Access Control
The ACL setup that we envision is flexible, generic and fast. More importantly, it is suitable for realm crossover uses.
We are building libraries to support the general evaluation of this model, along with change subscription to keep dependents informed.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file arpa2.wsgi-0.5.1.tar.gz
.
File metadata
- Download URL: arpa2.wsgi-0.5.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e594eb5e01dc60a56e5fba8fefdaa8d970c70bbfc8bfab348c9a0a34daf4cb9 |
|
MD5 | 07e4ee28b483d90bf3b0efbf45ea3fb9 |
|
BLAKE2b-256 | d1b62032ec1903889a2ec438d0239ee0498fce474e53875d56c5e6c79e561fa4 |
File details
Details for the file arpa2.wsgi-0.5.1-py3.7.egg
.
File metadata
- Download URL: arpa2.wsgi-0.5.1-py3.7.egg
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bdd10e345c2770b8ac54b961ee13145174e248dae07808e310d557f2e2902da |
|
MD5 | 7486e4f7beb7783c533d7d3f8e47a4fb |
|
BLAKE2b-256 | 0920bc19e5419baa257416dde750b0710e8adb458aeb904356574c05846653c5 |
File details
Details for the file arpa2.wsgi-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: arpa2.wsgi-0.5.1-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 425aa8ffed77cd25c9d6a4733f5d894c765326e227dcd9800346da2e7625932c |
|
MD5 | b96a37aabbabf7c8b06206307a12aa5d |
|
BLAKE2b-256 | a0eda99699049b30a0bf18d588bc1acbd0041d4df26e788e15db0b5584724b72 |