summaryrefslogtreecommitdiff
path: root/keystonemiddleware/auth_token/_opts.py
diff options
context:
space:
mode:
authorColleen Murphy <colleen@gazlene.net>2019-01-26 23:06:00 +0100
committerColleen Murphy <colleen.murphy@suse.de>2019-07-15 16:05:59 -0700
commit5f093bf5ee9f8ed201f01bab9c9afbde0423df07 (patch)
tree90e46bfea194cc999b03e367cb9eb2572dcf011d /keystonemiddleware/auth_token/_opts.py
parent2d3765ed565aba3b9793efcfc5c2d1ea534f1a0d (diff)
downloadkeystonemiddleware-5f093bf5ee9f8ed201f01bab9c9afbde0423df07.tar.gz
Add validation of app cred access rules
This commit adds a validation step in the auth_token middleware to check for the presence of an access_rules attribute in an application credential token and to validate the request against the permissions granted for that token. During token validation it sends a header to keystone to indicate that it is capable of validating these access rules, and not providing this header for a token like this would result in the token failing validation. This disregards access rules for a service request made by a service on behalf of a user, such as nova making a request to glance, because such a request is not under the control of the user and is not expected to be explicitly allowed in the access rules. bp whitelist-extension-for-app-creds Depends-On: https://review.opendev.org/670377 Change-Id: I185e0541d5df538d74edadf9976b3034a2470c88
Diffstat (limited to 'keystonemiddleware/auth_token/_opts.py')
-rw-r--r--keystonemiddleware/auth_token/_opts.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/keystonemiddleware/auth_token/_opts.py b/keystonemiddleware/auth_token/_opts.py
index b551407..f16d3f8 100644
--- a/keystonemiddleware/auth_token/_opts.py
+++ b/keystonemiddleware/auth_token/_opts.py
@@ -178,6 +178,10 @@ _OPTS = [
' service tokens pass that don\'t pass the service_token_roles'
' check as valid. Setting this true will become the default'
' in a future release and should be enabled if possible.'),
+ cfg.StrOpt('service_type',
+ help='The name or type of the service as it appears in the'
+ ' service catalog. This is used to validate tokens that have'
+ ' restricted access rules.'),
]