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
This commit is contained in:
parent
7029722adf
commit
345bfacaeb
@ -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()
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user