Merge "Add schema check for OS-TRUST:trust authentication"
This commit is contained in:
commit
3407ebb5e7
@ -82,6 +82,12 @@ token_issue = {
|
||||
'name': {'type': 'string', },
|
||||
},
|
||||
},
|
||||
'OS-TRUST:trust': {
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
'id': {'type': 'string', },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -367,6 +367,15 @@ class TestValidateIssueTokenAuth(unit.BaseTestCase):
|
||||
}
|
||||
self._expect_failure(p)
|
||||
|
||||
def test_trust_not_object_ex(self):
|
||||
p = {
|
||||
'identity': {'methods': [], },
|
||||
'scope': {
|
||||
'OS-TRUST:trust': 'something',
|
||||
},
|
||||
}
|
||||
self._expect_failure(p)
|
||||
|
||||
def test_unscoped(self):
|
||||
post_data = {
|
||||
'identity': {
|
||||
|
@ -43,7 +43,6 @@ from keystone.tests.common import auth as common_auth
|
||||
from keystone.tests import unit
|
||||
from keystone.tests.unit import ksfixtures
|
||||
from keystone.tests.unit import test_v3
|
||||
from keystone.tests.unit import utils as test_utils
|
||||
|
||||
|
||||
CONF = keystone.conf.CONF
|
||||
@ -3936,8 +3935,6 @@ class TrustAPIBehavior(test_v3.RestfulTestCase):
|
||||
r = self.v3_create_token(auth_data)
|
||||
return trust
|
||||
|
||||
@test_utils.wip('Waiting on validation to be added from fixing bug '
|
||||
'1733754')
|
||||
def test_authenticate_without_trust_dict_returns_bad_request(self):
|
||||
# Authenticate for a token to use in the request
|
||||
token = self.v3_create_token(
|
||||
|
7
releasenotes/notes/bug-1733754-4d9d3042b8501ec6.yaml
Normal file
7
releasenotes/notes/bug-1733754-4d9d3042b8501ec6.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
[`bug 1733754 <https://bugs.launchpad.net/keystone/+bug/1733754>`_]
|
||||
Keystone didn't validate the OS-TRUST:trust key of the authentication
|
||||
request is actually a dictionary. This results in a 500 Internal Server
|
||||
Error when it should really be a 400 Bad Request.
|
Loading…
Reference in New Issue
Block a user