OAuth 2.0 client
Project description
This is an OAuth 2.0 client library and WSGI middleware filter.
It supports simple string-based bearer token and a custom extension to enable
the use of X.509 certificates as tokens. The latter has been added to enable
a SLCS (Short-lived Credential Service) to issue delegated X.509-based
credentials using OAuth.
ndg.oauth.client.lib.oauth2client:Oauth2Client is a client that calls a
specified callable with an access token obtained from a configured OAuth server.
ndg.oauth.client.lib.oauth2_myproxy_client:Oauth2MyProxyClient extends this to
handle key creation for obtaining X.509 certificates.
The filter ndg.oauth.client.wsgi.oauth2_client:Oauth2ClientMiddleware uses
Oauth2MyProxyClient and sets the obtained access token in the WSGI environ. The
token contains the key/certificate pair so that it can be used by other WSGI
applications or middleware to authenticate.
Prerequisites
=============
This has been developed and tested for Python 2.6 and 2.7.
Installation
============
Installation can be performed using easy_install or pip.
Configuration
=============
Examples are contained in the examples/ sub-folder:
bearer_tok/:
This configures a simple test application that uses string based tokens.
slcs/:
This is a more complex and specialised example that issues X.509 certificate-
based tokens as part of a Short-lived Credential Service. The corresponding
authorisation server available from the ndg.oauth server package requires
access to a specially configured MyProxyCA service (
http://grid.ncsa.illinois.edu/myproxy/ca/) configured with a custom PAM to
allow issue of credentials. See:
http://ndg-security.ceda.ac.uk/browser/trunk/MashMyData/pam_credential_translation
The examples should be used in conjunction with the ndg.oauth server package.
It supports simple string-based bearer token and a custom extension to enable
the use of X.509 certificates as tokens. The latter has been added to enable
a SLCS (Short-lived Credential Service) to issue delegated X.509-based
credentials using OAuth.
ndg.oauth.client.lib.oauth2client:Oauth2Client is a client that calls a
specified callable with an access token obtained from a configured OAuth server.
ndg.oauth.client.lib.oauth2_myproxy_client:Oauth2MyProxyClient extends this to
handle key creation for obtaining X.509 certificates.
The filter ndg.oauth.client.wsgi.oauth2_client:Oauth2ClientMiddleware uses
Oauth2MyProxyClient and sets the obtained access token in the WSGI environ. The
token contains the key/certificate pair so that it can be used by other WSGI
applications or middleware to authenticate.
Prerequisites
=============
This has been developed and tested for Python 2.6 and 2.7.
Installation
============
Installation can be performed using easy_install or pip.
Configuration
=============
Examples are contained in the examples/ sub-folder:
bearer_tok/:
This configures a simple test application that uses string based tokens.
slcs/:
This is a more complex and specialised example that issues X.509 certificate-
based tokens as part of a Short-lived Credential Service. The corresponding
authorisation server available from the ndg.oauth server package requires
access to a specially configured MyProxyCA service (
http://grid.ncsa.illinois.edu/myproxy/ca/) configured with a custom PAM to
allow issue of credentials. See:
http://ndg-security.ceda.ac.uk/browser/trunk/MashMyData/pam_credential_translation
The examples should be used in conjunction with the ndg.oauth server package.
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
ndg_oauth_client-0.3.0.tar.gz
(42.3 kB
view details)
Built Distributions
ndg_oauth_client-0.3.0-py2.7.egg
(57.9 kB
view details)
ndg_oauth_client-0.3.0-py2.6.egg
(58.0 kB
view details)
File details
Details for the file ndg_oauth_client-0.3.0.tar.gz
.
File metadata
- Download URL: ndg_oauth_client-0.3.0.tar.gz
- Upload date:
- Size: 42.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e91e59ef0e4383dfb994a9823f2a10d3e17161df59ef357c0ae40f54826531f |
|
MD5 | 5b8bbd4246738769a0ceba783c602cca |
|
BLAKE2b-256 | 2809e3a50f9df80101d29f8d3aed15d3e4b9ad7c998597a5a7ce55537382488f |
File details
Details for the file ndg_oauth_client-0.3.0-py2.7.egg
.
File metadata
- Download URL: ndg_oauth_client-0.3.0-py2.7.egg
- Upload date:
- Size: 57.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a21933b058b187c6cbc47826848bfd62e9133fc541d48f2f42e47b086f26f884 |
|
MD5 | 18d1a2ba411d5812257fd338c69cebf0 |
|
BLAKE2b-256 | 1bc990db64d39d4dbf9b5b4127f812802eec9bd8e9da5bcee35c1d7cd4302b65 |
File details
Details for the file ndg_oauth_client-0.3.0-py2.6.egg
.
File metadata
- Download URL: ndg_oauth_client-0.3.0-py2.6.egg
- Upload date:
- Size: 58.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df268081b7ec12b72d47ed79a48ffd5f2555fcc7b32567a68d48aec03232bb98 |
|
MD5 | 5c58ca5a581d45f190ef098a68abc687 |
|
BLAKE2b-256 | cf08ca89c8412fbfdbd02bf932b4a81df93432c8db5dd6f7964b97adf54ad763 |