Changeset 8075


Ignore:
Timestamp:
07/06/12 14:29:58 (9 years ago)
Author:
pjkersha
Message:

Working test config with bearer type pattern

  • modified 'myproxy' access token type to more generically named 'slcs' = Short Lived Credential Service
  • fixed call to build_opener following change to interface for this in ndg_httpsclient
Location:
trunk/ndg_oauth
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ndg_oauth/ndg_oauth_client/ndg/oauth/client/lib/oauth2client.py

    r8057 r8075  
    1313import uuid 
    1414 
    15 import ndg.httpsclient.utils as httpsclient_utils 
    16 import ndg.httpsclient.ssl_context_util as ssl_context_util 
     15from ndg.httpsclient import utils as httpsclient_utils 
     16from ndg.httpsclient import ssl_context_util 
    1717 
    1818log = logging.getLogger(__name__) 
  • trunk/ndg_oauth/ndg_oauth_client/ndg/oauth/client/wsgi/oauth2_client.py

    r8057 r8075  
    4848    TOKEN_KEY_OPTION = 'oauth2_token_key' 
    4949    propertyDefaults = { 
    50         ACCESS_TOKEN_TYPE_OPTION: 'myproxy', 
     50        ACCESS_TOKEN_TYPE_OPTION: 'slcs', 
    5151        AUTHENTICATION_COMPLETE_OPTION: '', 
    5252        AUTHENTICATION_TRIGGER_OPTION: AUTHENTICATION_TRIGGER_ALWAYS, 
     
    9393        self._app = app 
    9494        self._set_configuration(prefix, local_conf) 
    95         if self.access_token_type == 'myproxy': 
     95        if self.access_token_type == 'slcs': 
    9696            log.debug("Setting client as Oauth2MyProxyClient") 
    9797            self._oauth_client_class = Oauth2MyProxyClient 
  • trunk/ndg_oauth/ndg_oauth_client/test/cert_req_app.ini

    r8074 r8075  
    4747#oauth2.oauth2_token_key = oauth2client.token 
    4848# OAuth client configuration 
    49 oauth2.client_cert = %(here)s/test/pki/localhost.crt 
    50 oauth2.client_key = %(here)s/test/pki/localhost.key 
    51 oauth2.ca_dir = %(here)s/test/pki/ca 
     49oauth2.client_cert = %(here)s/pki/localhost.crt 
     50oauth2.client_key = %(here)s/pki/localhost.key 
     51oauth2.ca_dir = %(here)s/pki/ca 
    5252# ca_cert_file = %(here)s/test/pki/ca/d573507a.0 
    5353oauth2.client_id=22 
     
    6666paste.app_factory = ndg.oauth.client.examples.wsgi.cert_req_app:WsgiTestApp.app_factory 
    6767resource_url = https://localhost:5000/oauth/request_certificate 
    68 client_cert = %(here)s/test/pki/localhost.crt 
    69 client_key = %(here)s/test/pki/localhost.key 
    70 ca_dir = %(here)s/test/pki/ca 
     68client_cert = %(here)s/pki/localhost.crt 
     69client_key = %(here)s/pki/localhost.key 
     70ca_dir = %(here)s/pki/ca 
    7171 
    7272 
  • trunk/ndg_oauth/ndg_oauth_server/client_register.ini

    r8057 r8075  
    1010#id=477bfc8c-a739-45b3-a63b-5b1662cc12d7 
    1111type=confidential 
    12 redirect_uris=http://ice.badc.rl.ac.uk:5001/client/redirect_target 
    13 authentication_data=/O=STFC/OU=BADC/OU=simpleCA-ice.badc.rl.ac.uk/OU=badc.rl.ac.uk/CN=test1.client 
     12redirect_uris=http://localhost:5001/client/redirect_target 
     13authentication_data=/OU=Security/CN=localhost/O=NDG 
    1414 
    1515[client:test2] 
    16 name=WPS on Ice 
     16name=test2 client 
    1717id=22 
    1818#id=691ad8cc-293c-4fbe-b8eb-980fcd621157 
    1919type=confidential 
    20 redirect_uris=http://ice.badc.rl.ac.uk:5002/oauth2/oauth_redirect,http://ice.badc.rl.ac.uk:5005/oauth2/oauth_redirect 
    21 authentication_data=/O=STFC/OU=BADC/OU=simpleCA-ice.badc.rl.ac.uk/OU=badc.rl.ac.uk/CN=test.client 
     20redirect_uris=http://localhost:5002/oauth2/oauth_redirect,http://localhost:5005/oauth2/oauth_redirect 
     21authentication_data=/OU=Security/CN=localhost/O=NDG 
  • trunk/ndg_oauth/ndg_oauth_server/ndg/oauth/server/wsgi/oauth2_server.py

    r8057 r8075  
    5757    propertyDefaults = { 
    5858        ACCESS_TOKEN_LIFETIME_OPTION: 86400, 
    59         ACCESS_TOKEN_TYPE_OPTION: 'myproxy', 
     59        ACCESS_TOKEN_TYPE_OPTION: 'slcs', 
    6060        AUTHORIZATION_GRANT_LIFETIME_OPTION: 600, 
    6161        BASE_URL_PATH_OPTION: '', 
     
    100100            # Simple bearer token configuration. 
    101101            access_token_generator = BearerTokenGenerator(self.access_token_lifetime_seconds, self.access_token_type) 
    102         elif self.access_token_type == 'myproxy': 
     102        elif self.access_token_type == 'slcs': 
    103103            # Configure authorization server to use MyProxy certificates as access tokens. 
    104104            access_token_generator = MyProxyCertTokenGenerator( 
  • trunk/ndg_oauth/ndg_oauth_server/repoze_who.ini

    r8074 r8075  
    6060plugins = 
    6161      auth_tkt 
    62 #      htpasswd 
    63       sqlusers 
     62      htpasswd 
     63#      sqlusers 
    6464 
    6565[challengers] 
Note: See TracChangeset for help on using the changeset viewer.