From 345bfacaebb0e10753fba7b294408e83db82d3ee Mon Sep 17 00:00:00 2001 From: Adam Young Date: Mon, 9 Jun 2014 12:54:05 -0400 Subject: [PATCH] Allow for multiple PKI Style Providers PKIZ will break the existing check in SimpleCert: A PKIZ provider would mean that no certs could be issued with a wider array of PKI style Providers possible in the future this check is going to break all of them, or require them all to force changes to this code. Closes-Bug: 1328201 Change-Id: Ia82822b4997473466bd43a3a956e0f85c09e8aa2 --- keystone/contrib/simple_cert/controllers.py | 5 ----- keystone/tests/test_contrib_simple_cert.py | 16 ---------------- 2 files changed, 21 deletions(-) diff --git a/keystone/contrib/simple_cert/controllers.py b/keystone/contrib/simple_cert/controllers.py index 97598da97..467cab481 100644 --- a/keystone/contrib/simple_cert/controllers.py +++ b/keystone/contrib/simple_cert/controllers.py @@ -16,7 +16,6 @@ import webob from keystone.common import controller from keystone.common import dependency from keystone import exception -from keystone.token.providers import pki CONF = cfg.CONF @@ -25,10 +24,6 @@ CONF = cfg.CONF class SimpleCert(controller.V3Controller): def _get_certificate(self, name): - # If we aren't using the PKI Provider then we should return a 403 - if not isinstance(self.token_provider_api.driver, pki.Provider): - raise exception.PKITokenExpected() - try: with open(name, 'r') as f: body = f.read() diff --git a/keystone/tests/test_contrib_simple_cert.py b/keystone/tests/test_contrib_simple_cert.py index 892bb1a1f..98d6360a7 100644 --- a/keystone/tests/test_contrib_simple_cert.py +++ b/keystone/tests/test_contrib_simple_cert.py @@ -55,19 +55,3 @@ class TestSimpleCert(BaseTestCase): method='GET', path=path, expected_status=500) - - -class UUIDSimpleCertTests(BaseTestCase): - - def config_overrides(self): - super(UUIDSimpleCertTests, self).config_overrides() - self.config_fixture.config( - group='token', - provider='keystone.token.providers.uuid.Provider') - - def test_using_uuid_controller(self): - for path in [self.CA_PATH, self.CERT_PATH]: - self.request(app=self.public_app, - method='GET', - path=path, - expected_status=403)