)]}'
{"doc/source/api/authentication.rst":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f89b32b268bde06a42a19f3557282c8dd18dfbb5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"   The account owner can grant account and container access to users"},{"line_number":31,"context_line":"   through access control lists (ACLs)."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"In addition, it is possible to pass a second token in the \u0027\u0027X-Service-Token\u0027\u0027"},{"line_number":34,"context_line":"header. More information about how this is used is in"},{"line_number":35,"context_line":":doc:`../overview_backing_store`."},{"line_number":36,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"da86d52c_1f06cdce","line":33,"updated":"2015-02-03 01:56:20.000000000","message":"I know this means you can pass in an additional token via X-Service-Token, but it could be ready you could pass in 2 tokens in the X-Service-Token header.\n\nMaybe reword as:\n\n  it is possible to pass a second token via the \u0027\u0027X-Service-Token\u0027\u0027\n\nOr\n\n  it is possible to provide an additional token in the \u0027\u0027X-Service-Token\u0027\u0027","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"   The account owner can grant account and container access to users"},{"line_number":31,"context_line":"   through access control lists (ACLs)."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"In addition, it is possible to pass a second token in the \u0027\u0027X-Service-Token\u0027\u0027"},{"line_number":34,"context_line":"header. More information about how this is used is in"},{"line_number":35,"context_line":":doc:`../overview_backing_store`."},{"line_number":36,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"da86d52c_56fad9bd","line":33,"in_reply_to":"da86d52c_1f06cdce","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"}],"doc/source/overview_auth.rst":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":203,"context_line":"  reseller_prefix \u003d AUTH, SERVICE"},{"line_number":204,"context_line":"  operator_roles \u003d admin, swiftoperator"},{"line_number":205,"context_line":"  SERVICE_operator_roles \u003d admin, swiftoperator"},{"line_number":206,"context_line":"  SERVICE_service_roles \u003d service"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"The actual values for these variable will need to be set depending on your"},{"line_number":209,"context_line":"situation as follows:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3a961159_603d4cbb","line":206,"updated":"2014-12-10 15:02:01.000000000","message":"It might be better to leave the default example config as it was and add a section on how to extend the configuration for use with services, that would include the config example you have here.","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"bec9d55e8386bebf34a0313a0fbd03aae4602499","unresolved":false,"context_lines":[{"line_number":211,"context_line":"* The first item in the reseller prefix list must match Keystone\u0027s endpoint"},{"line_number":212,"context_line":"  (see ``/etc/keystone/default_catalog.templates`` above). Normally"},{"line_number":213,"context_line":"  this is ``AUTH``."},{"line_number":214,"context_line":"* Use an appropriate list of roles in operator_roles. For example, in"},{"line_number":215,"context_line":"  some systems, the role ``_member`` or ``Member`` is used to indicate"},{"line_number":216,"context_line":"  that the user is allowed operator on project resources."},{"line_number":217,"context_line":"* The second item, if present, is used by other OpenStack services (e.g"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3a961159_9f62bcab","line":214,"updated":"2014-12-09 16:58:47.000000000","message":"typo: should be _member_ (trailing _)","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"bec9d55e8386bebf34a0313a0fbd03aae4602499","unresolved":false,"context_lines":[{"line_number":212,"context_line":"  (see ``/etc/keystone/default_catalog.templates`` above). Normally"},{"line_number":213,"context_line":"  this is ``AUTH``."},{"line_number":214,"context_line":"* Use an appropriate list of roles in operator_roles. For example, in"},{"line_number":215,"context_line":"  some systems, the role ``_member`` or ``Member`` is used to indicate"},{"line_number":216,"context_line":"  that the user is allowed operator on project resources."},{"line_number":217,"context_line":"* The second item, if present, is used by other OpenStack services (e.g"},{"line_number":218,"context_line":"  Glance and Cinder) to store data belonging to the project."}],"source_content_type":"text/x-rst","patch_set":2,"id":"3a961159_ff72e07a","line":215,"updated":"2014-12-09 16:58:47.000000000","message":"typo: operator -\u003e operate","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":213,"context_line":"  this is ``AUTH``."},{"line_number":214,"context_line":"* Use an appropriate list of roles in operator_roles. For example, in"},{"line_number":215,"context_line":"  some systems, the role ``_member`` or ``Member`` is used to indicate"},{"line_number":216,"context_line":"  that the user is allowed operator on project resources."},{"line_number":217,"context_line":"* The second item, if present, is used by other OpenStack services (e.g"},{"line_number":218,"context_line":"  Glance and Cinder) to store data belonging to the project."},{"line_number":219,"context_line":"* If using a second reseller prefix, set the operator_roles and service_roles"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3a961159_5d5af950","line":216,"updated":"2014-12-10 15:02:01.000000000","message":"typo \u0027operator\u0027 -\u003e \u0027operator roles\u0027?","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":214,"context_line":"* Use an appropriate list of roles in operator_roles. For example, in"},{"line_number":215,"context_line":"  some systems, the role ``_member`` or ``Member`` is used to indicate"},{"line_number":216,"context_line":"  that the user is allowed operator on project resources."},{"line_number":217,"context_line":"* The second item, if present, is used by other OpenStack services (e.g"},{"line_number":218,"context_line":"  Glance and Cinder) to store data belonging to the project."},{"line_number":219,"context_line":"* If using a second reseller prefix, set the operator_roles and service_roles"},{"line_number":220,"context_line":"  parameters as follows:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3a961159_c000c003","line":217,"updated":"2014-12-10 15:02:01.000000000","message":"Not clear which second item this is. Move ahead of previous bullet point?","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":264,"context_line":"  rejects the request."},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"In the above example, all services share the same account. You can separate"},{"line_number":267,"context_line":"each servie into its own account. For example, the following provides a"},{"line_number":268,"context_line":"dedicated account for each of the Glance and Cinder services. In addition,"},{"line_number":269,"context_line":"you must assign the ``glance_service`` and ``cinder_service`` to the"},{"line_number":270,"context_line":"appropriate service users::"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a961159_551dde61","line":267,"updated":"2015-01-12 12:40:41.000000000","message":"s/servie/service","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"27424dc70473df1068c87b9e99fe28b0fa6076de","unresolved":false,"context_lines":[{"line_number":264,"context_line":"  rejects the request."},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"In the above example, all services share the same account. You can separate"},{"line_number":267,"context_line":"each servie into its own account. For example, the following provides a"},{"line_number":268,"context_line":"dedicated account for each of the Glance and Cinder services. In addition,"},{"line_number":269,"context_line":"you must assign the ``glance_service`` and ``cinder_service`` to the"},{"line_number":270,"context_line":"appropriate service users::"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a961159_e8ec05be","line":267,"in_reply_to":"3a961159_551dde61","updated":"2015-01-12 17:53:40.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":275,"context_line":"  operator_roles \u003d admin, swiftoperator"},{"line_number":276,"context_line":"  IMAGE_service_roles \u003d glance_service"},{"line_number":277,"context_line":"  VOLUME_service_roles \u003d cinder_service"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"Access control using keystoneauth"},{"line_number":281,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a961159_154a765b","line":278,"updated":"2015-01-12 12:40:41.000000000","message":"the above is a good improvement on previous version :)","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"}],"doc/source/overview_policies.rst":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"feature is implemented throughout the entire code base so it is an important"},{"line_number":8,"context_line":"concept in understanding Swift architecture."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"As described in :doc:`overview_ring`:doc:`overview_ring`, Swift uses modified hashing rings to"},{"line_number":11,"context_line":"determine where data should reside in the cluster. There is a separate ring"},{"line_number":12,"context_line":"for account databases, container databases, and there is also one object"},{"line_number":13,"context_line":"ring per storage policy.  Each object ring behaves exactly the same way"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1a930d6b_d982b051","line":10,"updated":"2015-01-22 19:02:56.000000000","message":"oops ^^","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":7,"context_line":"feature is implemented throughout the entire code base so it is an important"},{"line_number":8,"context_line":"concept in understanding Swift architecture."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"As described in :doc:`overview_ring`:doc:`overview_ring`, Swift uses modified hashing rings to"},{"line_number":11,"context_line":"determine where data should reside in the cluster. There is a separate ring"},{"line_number":12,"context_line":"for account databases, container databases, and there is also one object"},{"line_number":13,"context_line":"ring per storage policy.  Each object ring behaves exactly the same way"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1a930d6b_1a7078a4","line":10,"in_reply_to":"1a930d6b_d982b051","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"}],"etc/proxy-server.conf-sample":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":297,"context_line":"# responsible for. The prefix is placed before the Keystone project id."},{"line_number":298,"context_line":"# For example, for project 12345678, and prefix AUTH, the account is"},{"line_number":299,"context_line":"# named AUTH_12345678 (i.e., path is /v1/AUTH_12345678/...)."},{"line_number":300,"context_line":"# Several prefixes are allowed -- by specifying a comma-separated list"},{"line_number":301,"context_line":"# as in: \"reseller_prefix \u003d AUTH, SERVICE\". If required, a value of \"_\""},{"line_number":302,"context_line":"# indicates a blank/empty prefix."},{"line_number":303,"context_line":"# reseller_prefix \u003d AUTH"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3a961159_7dc5f53a","line":300,"updated":"2014-12-10 15:02:01.000000000","message":"typo? not sure the -- is intended","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":300,"context_line":"# Several prefixes are allowed -- by specifying a comma-separated list"},{"line_number":301,"context_line":"# as in: \"reseller_prefix \u003d AUTH, SERVICE\". If required, a value of \"_\""},{"line_number":302,"context_line":"# indicates a blank/empty prefix."},{"line_number":303,"context_line":"# reseller_prefix \u003d AUTH"},{"line_number":304,"context_line":"#"},{"line_number":305,"context_line":"# The user must have at least one role named by operator_roles on a"},{"line_number":306,"context_line":"# project in order to create, delete and modify containers and objects"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3a961159_5de3d904","line":303,"updated":"2014-12-10 15:02:01.000000000","message":"oh, so reseller_prefix was missing from sample conf :(","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":305,"context_line":"# The user must have at least one role named by operator_roles on a"},{"line_number":306,"context_line":"# project in order to create, delete and modify containers and objects"},{"line_number":307,"context_line":"# and to set and read privileged headers such as ACLs."},{"line_number":308,"context_line":"# If there are several reseller prefix items, you can prefix the"},{"line_number":309,"context_line":"# parameter so it applies only to those accounts (for example"},{"line_number":310,"context_line":"# the parameter SERVICE_operator_roles applies to the /v1/SERVICE_\u003cproject\u003e"},{"line_number":311,"context_line":"# path)."}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3a961159_ddf2696e","line":308,"updated":"2014-12-10 15:02:01.000000000","message":"Add some boilerplate to effect that without prefix, the parameter applies to all account prefixes etc","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":312,"context_line":"# operator_roles \u003d admin, swiftoperator"},{"line_number":313,"context_line":"#"},{"line_number":314,"context_line":"# If the service_roles parameter is present, an X-Service-Token must be"},{"line_number":315,"context_line":"# present in the request that contains at least one role listed in the"},{"line_number":316,"context_line":"# parameter. If there are several reseller prefix items, you can prefix the"},{"line_number":317,"context_line":"# parameter so it applies only to those accounts (for example"},{"line_number":318,"context_line":"# the parameter SERVICE_service_roles applies to the /v1/SERVICE_\u003cproject\u003e"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3a961159_5d691924","line":315,"updated":"2014-12-10 15:02:01.000000000","message":"nit: the token doesn\u0027t necessarily \u0027contain\u0027 the role, the roles come from validating the token","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":275,"context_line":"# Add following require_group:"},{"line_number":276,"context_line":"# SERVICE_require_group \u003d .service"},{"line_number":277,"context_line":"# Add following user (this is username5/account5 in functional tests):"},{"line_number":278,"context_line":"# user_svcacct_tester5 \u003d testing5 .service"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"# To enable Keystone authentication you need to have the auth token"},{"line_number":281,"context_line":"# middleware first to be configured. Here is an example below, please"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"3a961159_cab74bf7","line":278,"updated":"2015-01-12 12:40:41.000000000","message":"I\u0027m not sure we need this comment here - the info is in test.conf, and we don\u0027t have similar for account4.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":275,"context_line":"# Add following require_group:"},{"line_number":276,"context_line":"# SERVICE_require_group \u003d .service"},{"line_number":277,"context_line":"# Add following user (this is username5/account5 in functional tests):"},{"line_number":278,"context_line":"# user_svcacct_tester5 \u003d testing5 .service"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"# To enable Keystone authentication you need to have the auth token"},{"line_number":281,"context_line":"# middleware first to be configured. Here is an example below, please"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"3a961159_c0aa47d1","line":278,"in_reply_to":"3a961159_cab74bf7","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"3348155b1b77493c33a334b47f36069f4b7eef57","unresolved":false,"context_lines":[{"line_number":309,"context_line":"# as in: \"reseller_prefix \u003d AUTH, SERVICE\". If required, a value of \u0027\u0027 (two"},{"line_number":310,"context_line":"# single quote characters) indicates a blank/empty prefix. Except for \u0027\u0027,"},{"line_number":311,"context_line":"# an underscore (\u0027_\u0027) character is appended to the value unless already"},{"line_number":312,"context_line":"# present."},{"line_number":313,"context_line":"# FIXME: Tempest does not handle this: reseller_prefix \u003d AUTH"},{"line_number":314,"context_line":"#"},{"line_number":315,"context_line":"# The user must have at least one role named by operator_roles on a"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"3a961159_4312f609","line":312,"updated":"2014-12-19 13:36:56.000000000","message":"The FIXME should blame DevStack -- not Tempest.\nI\u0027ve submitted a fix here: https://review.openstack.org/143085","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":309,"context_line":"# as in: \"reseller_prefix \u003d AUTH, SERVICE\". If required, a value of \u0027\u0027 (two"},{"line_number":310,"context_line":"# single quote characters) indicates a blank/empty prefix. Except for \u0027\u0027,"},{"line_number":311,"context_line":"# an underscore (\u0027_\u0027) character is appended to the value unless already"},{"line_number":312,"context_line":"# present."},{"line_number":313,"context_line":"# FIXME: Tempest does not handle this: reseller_prefix \u003d AUTH"},{"line_number":314,"context_line":"#"},{"line_number":315,"context_line":"# The user must have at least one role named by operator_roles on a"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"3a961159_aa8aff61","line":312,"in_reply_to":"3a961159_4312f609","updated":"2015-01-12 12:40:41.000000000","message":"I suggest uncommenting keystoneauth section here to avoid the devstack issue.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"27424dc70473df1068c87b9e99fe28b0fa6076de","unresolved":false,"context_lines":[{"line_number":309,"context_line":"# as in: \"reseller_prefix \u003d AUTH, SERVICE\". If required, a value of \u0027\u0027 (two"},{"line_number":310,"context_line":"# single quote characters) indicates a blank/empty prefix. Except for \u0027\u0027,"},{"line_number":311,"context_line":"# an underscore (\u0027_\u0027) character is appended to the value unless already"},{"line_number":312,"context_line":"# present."},{"line_number":313,"context_line":"# FIXME: Tempest does not handle this: reseller_prefix \u003d AUTH"},{"line_number":314,"context_line":"#"},{"line_number":315,"context_line":"# The user must have at least one role named by operator_roles on a"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"3a961159_883c6132","line":312,"in_reply_to":"3a961159_aa8aff61","updated":"2015-01-12 17:53:40.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":330,"context_line":"# parameter so it applies only to those accounts (for example"},{"line_number":331,"context_line":"# the parameter SERVICE_service_roles applies to the /v1/SERVICE_\u003cproject\u003e"},{"line_number":332,"context_line":"# path). If you omit the prefix, the option applies to all reseller"},{"line_number":333,"context_line":"# prefix items. For the blank/empty prefix, prefix with \u0027\u0027 (do not put"},{"line_number":334,"context_line":"# underscore after the two single quote characters)."},{"line_number":335,"context_line":"# By default, no service_roles are required."},{"line_number":336,"context_line":"# service_roles \u003d"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"3a961159_1529963a","line":333,"updated":"2015-01-12 12:40:41.000000000","message":"This says \u0027applies to all reseller prefix items\u0027...So would:\n service_roles \u003d service\n\nmean that the AUTH_ prefix requires a service role?","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"27424dc70473df1068c87b9e99fe28b0fa6076de","unresolved":false,"context_lines":[{"line_number":330,"context_line":"# parameter so it applies only to those accounts (for example"},{"line_number":331,"context_line":"# the parameter SERVICE_service_roles applies to the /v1/SERVICE_\u003cproject\u003e"},{"line_number":332,"context_line":"# path). If you omit the prefix, the option applies to all reseller"},{"line_number":333,"context_line":"# prefix items. For the blank/empty prefix, prefix with \u0027\u0027 (do not put"},{"line_number":334,"context_line":"# underscore after the two single quote characters)."},{"line_number":335,"context_line":"# By default, no service_roles are required."},{"line_number":336,"context_line":"# service_roles \u003d"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"3a961159_a8203df9","line":333,"in_reply_to":"3a961159_1529963a","updated":"2015-01-12 17:53:40.000000000","message":"Yes.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":241,"context_line":"#"},{"line_number":242,"context_line":"# This allows middleware higher in the WSGI pipeline to override auth"},{"line_number":243,"context_line":"# processing, useful for middleware such as tempurl and formpost. If you know"},{"line_number":244,"context_line":"# processing, useful for middleware such as tempurl and formpost. If you know"},{"line_number":245,"context_line":"# you\u0027re not going to use such middleware and you want a bit of extra security,"},{"line_number":246,"context_line":"# you can set this to false."},{"line_number":247,"context_line":"# allow_overrides \u003d true"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"1a930d6b_99902897","line":244,"updated":"2015-01-22 19:02:56.000000000","message":"oops","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":241,"context_line":"#"},{"line_number":242,"context_line":"# This allows middleware higher in the WSGI pipeline to override auth"},{"line_number":243,"context_line":"# processing, useful for middleware such as tempurl and formpost. If you know"},{"line_number":244,"context_line":"# processing, useful for middleware such as tempurl and formpost. If you know"},{"line_number":245,"context_line":"# you\u0027re not going to use such middleware and you want a bit of extra security,"},{"line_number":246,"context_line":"# you can set this to false."},{"line_number":247,"context_line":"# allow_overrides \u003d true"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"1a930d6b_7aab3cd6","line":244,"in_reply_to":"1a930d6b_99902897","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"076509d57b0799fdf82f791f8ae148249eb8c34a","unresolved":false,"context_lines":[{"line_number":264,"context_line":"# The trailing optional storage_url allows you to specify an alternate url to"},{"line_number":265,"context_line":"# hand back to the user upon authentication. If not specified, this defaults to"},{"line_number":266,"context_line":"# $HOST/v1/\u003creseller_prefix\u003e_\u003caccount\u003e where $HOST will do its best to resolve"},{"line_number":267,"context_line":"# to what the requester would need to use to reach this host."},{"line_number":268,"context_line":"# Here are example entries, required for running the tests:"},{"line_number":269,"context_line":"user_admin_admin \u003d admin .admin .reseller_admin"},{"line_number":270,"context_line":"user_test_tester \u003d testing .admin"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"1a930d6b_350e2735","line":267,"updated":"2015-01-23 12:23:54.000000000","message":"I may have been wrong to comment before that the service token config is not needed here. If this is supposed to be the config \u0027required for running the tests\u0027 then I guess the default tempauth config should include a SERVICE prefix and svcacct.\n\nAlso, if defined here then it will be picked up by the in-process tests, so its not needed in the in process test setup.","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":264,"context_line":"# The trailing optional storage_url allows you to specify an alternate url to"},{"line_number":265,"context_line":"# hand back to the user upon authentication. If not specified, this defaults to"},{"line_number":266,"context_line":"# $HOST/v1/\u003creseller_prefix\u003e_\u003caccount\u003e where $HOST will do its best to resolve"},{"line_number":267,"context_line":"# to what the requester would need to use to reach this host."},{"line_number":268,"context_line":"# Here are example entries, required for running the tests:"},{"line_number":269,"context_line":"user_admin_admin \u003d admin .admin .reseller_admin"},{"line_number":270,"context_line":"user_test_tester \u003d testing .admin"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"1a930d6b_eeb76984","line":267,"in_reply_to":"1a930d6b_350e2735","updated":"2015-01-27 12:53:19.000000000","message":"I\u0027ve added the tester5 user","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f89b32b268bde06a42a19f3557282c8dd18dfbb5","unresolved":false,"context_lines":[{"line_number":218,"context_line":"# attempting to validate it. Also, with authorization, only Swift storage"},{"line_number":219,"context_line":"# accounts with this prefix will be authorized by this middleware. Useful if"},{"line_number":220,"context_line":"# multiple auth systems are in use for one Swift cluster."},{"line_number":221,"context_line":"# The reseller_prefix may contain a space separated list of items. The first"},{"line_number":222,"context_line":"# item is used for the token as mentioned above. If second and subsequent"},{"line_number":223,"context_line":"# items exist, the middleware will handle authorization for an account with"},{"line_number":224,"context_line":"# that prefix. For example, for prefixes \"AUTH SERVICE\", a path of"}],"source_content_type":"application/octet-stream","patch_set":9,"id":"da86d52c_7f7189df","line":221,"updated":"2015-02-03 01:56:20.000000000","message":"It\u0027s not a space separated list any more, isn\u0027t it a comma separated one now?","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":218,"context_line":"# attempting to validate it. Also, with authorization, only Swift storage"},{"line_number":219,"context_line":"# accounts with this prefix will be authorized by this middleware. Useful if"},{"line_number":220,"context_line":"# multiple auth systems are in use for one Swift cluster."},{"line_number":221,"context_line":"# The reseller_prefix may contain a space separated list of items. The first"},{"line_number":222,"context_line":"# item is used for the token as mentioned above. If second and subsequent"},{"line_number":223,"context_line":"# items exist, the middleware will handle authorization for an account with"},{"line_number":224,"context_line":"# that prefix. For example, for prefixes \"AUTH SERVICE\", a path of"}],"source_content_type":"application/octet-stream","patch_set":9,"id":"da86d52c_b616b5ef","line":221,"in_reply_to":"da86d52c_7f7189df","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f89b32b268bde06a42a19f3557282c8dd18dfbb5","unresolved":false,"context_lines":[{"line_number":221,"context_line":"# The reseller_prefix may contain a space separated list of items. The first"},{"line_number":222,"context_line":"# item is used for the token as mentioned above. If second and subsequent"},{"line_number":223,"context_line":"# items exist, the middleware will handle authorization for an account with"},{"line_number":224,"context_line":"# that prefix. For example, for prefixes \"AUTH SERVICE\", a path of"},{"line_number":225,"context_line":"# /v1/SERVICE_account is handled the same as /v1/AUTH_account. If an empty"},{"line_number":226,"context_line":"# (blank) reseller prefix is required, it must be first in the list. The"},{"line_number":227,"context_line":"# underscore character indicates an empty (blank) reseller prefix."}],"source_content_type":"application/octet-stream","patch_set":9,"id":"da86d52c_7f48a987","line":224,"updated":"2015-02-03 01:56:20.000000000","message":"\"AUTH, SERVICE\"","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":221,"context_line":"# The reseller_prefix may contain a space separated list of items. The first"},{"line_number":222,"context_line":"# item is used for the token as mentioned above. If second and subsequent"},{"line_number":223,"context_line":"# items exist, the middleware will handle authorization for an account with"},{"line_number":224,"context_line":"# that prefix. For example, for prefixes \"AUTH SERVICE\", a path of"},{"line_number":225,"context_line":"# /v1/SERVICE_account is handled the same as /v1/AUTH_account. If an empty"},{"line_number":226,"context_line":"# (blank) reseller prefix is required, it must be first in the list. The"},{"line_number":227,"context_line":"# underscore character indicates an empty (blank) reseller prefix."}],"source_content_type":"application/octet-stream","patch_set":9,"id":"da86d52c_d6a249ad","line":224,"in_reply_to":"da86d52c_7f48a987","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f89b32b268bde06a42a19f3557282c8dd18dfbb5","unresolved":false,"context_lines":[{"line_number":295,"context_line":"#"},{"line_number":296,"context_line":"# [filter:keystoneauth]"},{"line_number":297,"context_line":"# use \u003d egg:swift#keystoneauth"},{"line_number":298,"context_line":"# The reseller prefix lists account namespaces that this middleware is"},{"line_number":299,"context_line":"# responsible for. The prefix is placed before the Keystone project id."},{"line_number":300,"context_line":"# For example, for project 12345678, and prefix AUTH, the account is"},{"line_number":301,"context_line":"# named AUTH_12345678 (i.e., path is /v1/AUTH_12345678/...)."}],"source_content_type":"application/octet-stream","patch_set":9,"id":"da86d52c_ff2ad98e","line":298,"updated":"2015-02-03 01:56:20.000000000","message":"s/reseller prefix/reseller_prefix/","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":295,"context_line":"#"},{"line_number":296,"context_line":"# [filter:keystoneauth]"},{"line_number":297,"context_line":"# use \u003d egg:swift#keystoneauth"},{"line_number":298,"context_line":"# The reseller prefix lists account namespaces that this middleware is"},{"line_number":299,"context_line":"# responsible for. The prefix is placed before the Keystone project id."},{"line_number":300,"context_line":"# For example, for project 12345678, and prefix AUTH, the account is"},{"line_number":301,"context_line":"# named AUTH_12345678 (i.e., path is /v1/AUTH_12345678/...)."}],"source_content_type":"application/octet-stream","patch_set":9,"id":"da86d52c_d6908945","line":298,"in_reply_to":"da86d52c_ff2ad98e","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1d68e9c669f788f55b42a139fe9471b748e59bcc","unresolved":false,"context_lines":[{"line_number":269,"context_line":"user_test_tester \u003d testing .admin"},{"line_number":270,"context_line":"user_test2_tester2 \u003d testing2 .admin"},{"line_number":271,"context_line":"user_test_tester3 \u003d testing3"},{"line_number":272,"context_line":"user_service_tester5 \u003d testing5 service"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"# To enable Keystone authentication you need to have the auth token"},{"line_number":275,"context_line":"# middleware first to be configured. Here is an example below, please"}],"source_content_type":"application/octet-stream","patch_set":14,"id":"ba7be1f8_b826e5b8","line":272,"updated":"2015-02-20 18:58:47.000000000","message":"unfortunately devstack already has a tenant called \u0027service\u0027\n\nnot a blocker, but could cause a trip for people setting up this required test account in devstack","commit_id":"bd4d4654e600972b00b055fad6ae1a658b8bb598"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"83bb5b8dba564bb29ef0233e7da626834bde76cf","unresolved":false,"context_lines":[{"line_number":269,"context_line":"user_test_tester \u003d testing .admin"},{"line_number":270,"context_line":"user_test2_tester2 \u003d testing2 .admin"},{"line_number":271,"context_line":"user_test_tester3 \u003d testing3"},{"line_number":272,"context_line":"user_service_tester5 \u003d testing5 service"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"# To enable Keystone authentication you need to have the auth token"},{"line_number":275,"context_line":"# middleware first to be configured. Here is an example below, please"}],"source_content_type":"application/octet-stream","patch_set":14,"id":"ba7be1f8_f653de36","line":272,"in_reply_to":"ba7be1f8_b826e5b8","updated":"2015-02-23 14:52:11.000000000","message":"Initially I had somewhat done this deliberately --- each of the openstack services is given a role on the \"service\" tenant/project -- many of them using the \"service\" role. However, I see what you mean...the functional tests need a username5, and it should be a user setup to run the functional tests, not an existing (e.g., cinder) user (though such a user would work as username5).\n\nI\u0027ll change the account to \"test5\".","commit_id":"bd4d4654e600972b00b055fad6ae1a658b8bb598"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"329cf7ae6af2b5e3ae01b65cc0279d20c4c8a080","unresolved":false,"context_lines":[{"line_number":269,"context_line":"user_test_tester \u003d testing .admin"},{"line_number":270,"context_line":"user_test2_tester2 \u003d testing2 .admin"},{"line_number":271,"context_line":"user_test_tester3 \u003d testing3"},{"line_number":272,"context_line":"user_test5_tester5 \u003d testing5 service"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"# To enable Keystone authentication you need to have the auth token"},{"line_number":275,"context_line":"# middleware first to be configured. Here is an example below, please"}],"source_content_type":"application/octet-stream","patch_set":15,"id":"ba7be1f8_f3303ba0","line":272,"updated":"2015-02-23 22:33:44.000000000","message":"nit: \n\ni\u0027m not sure why the crying about keystone already having a thing called a \"service\"?  What does that have to do with tempauth?\n\nI changed this to:\n\n  user_service_tester5 \u003d testing5\n\nand was pretty happy with it the simplicity of it.  I think adding arbitrary group membership to tempauth is fine, and the using of the arbitrary account name \"test5\" makes it clear there\u0027s nothing special about the user other than it can get a token and has a group that matches the required_groups options...\n\nbut using the account name \"service\" for implicit group seems to be the way tempauth users have been reasoned about in the past (e.g. test_tester3 is a member of the test group along with test_tester) - so I would have *also* been fine just using that and avoiding tempauth growing a new feature that\u0027s not strictly required to test the feature as far as I can tell (multiple prefixes and required_groups - more obviously needed to reduce the impedance mismatch with keystone auth).\n\nBut I\u0027m cool with this too...","commit_id":"89397c5b679c2ad20f96fc81d8de6b1bf86482a6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"29cd4e60bc276b7090c7be1bf16f2a0ffd01bc6d","unresolved":false,"context_lines":[{"line_number":269,"context_line":"user_test_tester \u003d testing .admin"},{"line_number":270,"context_line":"user_test2_tester2 \u003d testing2 .admin"},{"line_number":271,"context_line":"user_test_tester3 \u003d testing3"},{"line_number":272,"context_line":"user_test5_tester5 \u003d testing5 service"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"# To enable Keystone authentication you need to have the auth token"},{"line_number":275,"context_line":"# middleware first to be configured. Here is an example below, please"}],"source_content_type":"application/octet-stream","patch_set":15,"id":"ba7be1f8_5e8e557a","line":272,"in_reply_to":"ba7be1f8_f3303ba0","updated":"2015-02-24 13:36:07.000000000","message":"ok, mea culpa - here\u0027s the (flawed) logic behind the minor concern I expressed:\n\n(1) devstack config uses same user and project names for keystone and tempauth\n(2) keystone already has a project \u0027service\u0027\n(3) someone adding devstack config based on this example could unwittingly end up using the existing service project (which I acknowledge might not matter)\n\nTurns out that statement (1) is incorrect - devstack does indeed *configure* tempauth with the same user and project names used for keystone (swifttenanttest1 etc) - look at the start of [filter:tempauth] in /etc/swift/proxy-server.conf on devstack. *But* today I learnt that when the func test job is run the default tempauth accounts are used (test, test2 etc) which are left intact at the end of [filter:tempauth].\n\n(I\u0027m now not sure what if any reason there is for swifttenanttest1 etc to be added into the devstack tempauth config)","commit_id":"89397c5b679c2ad20f96fc81d8de6b1bf86482a6"}],"swift/common/middleware/keystoneauth.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        operator_roles \u003d admin, swiftoperator"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    This maps a Keystone project/tenant to an account in Swift. For example,"},{"line_number":69,"context_line":"    if the project id is ``1234``, the path is ``/v1/AUTH_1234``."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    The user who is able to give ACL / create Containers permissions"},{"line_number":72,"context_line":"    will be the user with a role listed in the ``operator_roles``"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_e8e12cd1","line":69,"updated":"2014-12-10 15:02:01.000000000","message":"This (and the existing sentence) is true but hard to connect to the config section above, since it is referring to default behaviour that is not included in the config.\n\nHow about \"keystoneauth will map a Keystone project/tenant to an account in Swift by adding a configurable reseller_prefix which defaults to \u0027AUTH_\u0027. For example, ...\"","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        reseller_prefix \u003d NEWAUTH"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    Don\u0027t forget to update the Keystone endpoint to use NEWAUTH in the path."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    It is possible to have several accounts associated with the same project."},{"line_number":85,"context_line":"    This is done by listing several prefixes as shown in the following"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_a81c84c2","line":82,"updated":"2014-12-10 15:02:01.000000000","message":"Be clear that this is not a swift config thing e.g. \"Don\u0027t forget to also update the Keystone service endpoint configuration to use NEWAUTH in the path.\"","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"bec9d55e8386bebf34a0313a0fbd03aae4602499","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    example:"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        reseller_prefix \u003d AUTH, SERVICE"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    This means that for project id \u00271234\u0027, the paths \u0027/v1/AUTH-1234\u0027 and"},{"line_number":91,"context_line":"    \u0027/v1/SERVICE_1234\u0027 are associated with the project and are authorized"},{"line_number":92,"context_line":"    using roles that a user has with that project. The core use of this feature"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_dfafe492","line":89,"updated":"2014-12-09 16:58:47.000000000","message":"typo - AUTH-1224, shuuld be AUTH_1234","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"bec9d55e8386bebf34a0313a0fbd03aae4602499","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    prefix. The following parameters may be prefixed with the appropriate"},{"line_number":95,"context_line":"    prefix:"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        operator_roles"},{"line_number":98,"context_line":"        reseller_admin_role"},{"line_number":99,"context_line":"        service_roles"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_bf83f802","line":97,"updated":"2014-12-09 16:58:47.000000000","message":"ERROR: drop reseller_admin_role","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    prefixes:"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        reseller_prefix \u003d AUTH, SERVICE"},{"line_number":106,"context_line":"        # The next two lines have identical effects"},{"line_number":107,"context_line":"        operator_roles \u003d admin, swiftoperator"},{"line_number":108,"context_line":"        AUTH_operator_roles \u003d admin, swiftoperator"},{"line_number":109,"context_line":"        # The next line only applies to the /v1/SERVICE_ path"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_08a11847","line":106,"updated":"2014-12-10 15:02:01.000000000","message":"...on accounts with the AUTH prefix","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        # The next two lines have identical effects"},{"line_number":107,"context_line":"        operator_roles \u003d admin, swiftoperator"},{"line_number":108,"context_line":"        AUTH_operator_roles \u003d admin, swiftoperator"},{"line_number":109,"context_line":"        # The next line only applies to the /v1/SERVICE_ path"},{"line_number":110,"context_line":"        SERVICE_operator_roles \u003d admin, some_other_role"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    Composite tokens are supported by the service_roles parameter. This"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_c89630f0","line":109,"updated":"2014-12-10 15:02:01.000000000","message":"\u0027path\u0027 is an inconsistent term, maybe \"The next line only applies to accounts with the SERVICE prefix\"","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        # The next line only applies to the /v1/SERVICE_ path"},{"line_number":110,"context_line":"        SERVICE_operator_roles \u003d admin, some_other_role"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    Composite tokens are supported by the service_roles parameter. This"},{"line_number":113,"context_line":"    parameter requires that the X-Service-Token header supply a token"},{"line_number":114,"context_line":"    from a user who has a role listed in service_roles. Here is an example"},{"line_number":115,"context_line":"    configuration:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_68ac5c36","line":112,"updated":"2014-12-10 15:02:01.000000000","message":"\u0027This\u0027 -\u003e \u0027The inclusion of this\u0027","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        self.logger \u003d swift_utils.get_logger(conf, log_route\u003d\u0027keystoneauth\u0027)"},{"line_number":165,"context_line":"        reseller_prefixes \u003d conf.get(\u0027reseller_prefix\u0027,"},{"line_number":166,"context_line":"                                     \u0027AUTH\u0027).split(\u0027,\u0027)"},{"line_number":167,"context_line":"        if reseller_prefixes[0] \u003d\u003d \u0027\u0027:"},{"line_number":168,"context_line":"            reseller_prefixes[0] \u003d \u0027_\u0027  # Empty/blank prefix is named as \u0027_\u0027"},{"line_number":169,"context_line":"        self.account_prefixes \u003d []"},{"line_number":170,"context_line":"        for prefix in [pre.strip() for pre in reseller_prefixes]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_7efed239","line":167,"updated":"2014-12-10 15:02:01.000000000","message":"could it be \u0027  \u0027? I\u0027m not sure if config reader would return that but to be safe use\n \n if reseller_prefixes[0].strip() \u003d\u003d \u0027\u0027","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        reseller_prefixes \u003d conf.get(\u0027reseller_prefix\u0027,"},{"line_number":166,"context_line":"                                     \u0027AUTH\u0027).split(\u0027,\u0027)"},{"line_number":167,"context_line":"        if reseller_prefixes[0] \u003d\u003d \u0027\u0027:"},{"line_number":168,"context_line":"            reseller_prefixes[0] \u003d \u0027_\u0027  # Empty/blank prefix is named as \u0027_\u0027"},{"line_number":169,"context_line":"        self.account_prefixes \u003d []"},{"line_number":170,"context_line":"        for prefix in [pre.strip() for pre in reseller_prefixes]:"},{"line_number":171,"context_line":"            if prefix[-1] !\u003d \u0027_\u0027:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_d94e006f","line":168,"updated":"2014-12-10 15:02:01.000000000","message":"hmmm, so a tray \u0027,\u0027 at start of list will cause an \u0027_\u0027 namespace to be opened up. Remind me why we are doing this? (I know there was a reason!)","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        if reseller_prefixes[0] \u003d\u003d \u0027\u0027:"},{"line_number":168,"context_line":"            reseller_prefixes[0] \u003d \u0027_\u0027  # Empty/blank prefix is named as \u0027_\u0027"},{"line_number":169,"context_line":"        self.account_prefixes \u003d []"},{"line_number":170,"context_line":"        for prefix in [pre.strip() for pre in reseller_prefixes]:"},{"line_number":171,"context_line":"            if prefix[-1] !\u003d \u0027_\u0027:"},{"line_number":172,"context_line":"                prefix +\u003d \u0027_\u0027"},{"line_number":173,"context_line":"            self.account_prefixes.append(prefix)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_be8f5acb","line":170,"updated":"2014-12-10 15:02:01.000000000","message":"errors if reseller_prefixes \u003d AUTH,  , SERVICE. Add a strip:\n\n for prefix in [pre.strip() for pre in reseller_prefixes if pre.strip()]","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"bec9d55e8386bebf34a0313a0fbd03aae4602499","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                            account_prefixes\u003dself._get_prefix_values())"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _read_account_rules(self, prefix_value, prefix_name):"},{"line_number":195,"context_line":"        for param in [\u0027operator_roles\u0027, \u0027service_roles\u0027]:"},{"line_number":196,"context_line":"            value \u003d self.conf.get(\u0027%s%s\u0027 % (prefix_value, param), None)"},{"line_number":197,"context_line":"            if value:"},{"line_number":198,"context_line":"                self.account_rules[prefix_name][param] \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_2e6d2099","line":195,"updated":"2014-12-09 16:58:47.000000000","message":"In retrospect, the way this works and is called is maybe not best. As-is, this:\n\n    reseller_prefix \u003d AUTH, SEVICE\n    operator_roles \u003d _member_\n    SERVICE_roles \u003d service\n\nresults in:\n    AUTH_operator_roles \u003d _member_                        \u003c\u003d as specified\n    AUTH_service_roles \u003d                                          \u003c\u003d default value (empty)\n    SERVICE_operator_roles \u003d admin, swiftoperator    \u003c\u003d from hard-coded default value\n    SERVICE_service_roles \u003d service                         \u003c\u003d as specified\n\nwhereas, this would be more useful result:\n\n    AUTH_operator_roles \u003d _member_                        \u003c\u003d as specified\n    AUTH_service_roles \u003d                                          \u003c\u003d default value (empty)\n    SERVICE_operator_roles \u003d _member_                  \u003c\u003d i.e. pickup default from \u003cno-prefix\u003eoperator_roles\n    SERVICE_service_roles \u003d service                         \u003c\u003d as specified\n\nSo, the proposal for next draft is that an option without a prefix becomes the default value used for all reseller prefix values. This seems more natural and less error-prone.","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                            account_prefixes\u003dself._get_prefix_values())"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _read_account_rules(self, prefix_value, prefix_name):"},{"line_number":195,"context_line":"        for param in [\u0027operator_roles\u0027, \u0027service_roles\u0027]:"},{"line_number":196,"context_line":"            value \u003d self.conf.get(\u0027%s%s\u0027 % (prefix_value, param), None)"},{"line_number":197,"context_line":"            if value:"},{"line_number":198,"context_line":"                self.account_rules[prefix_name][param] \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_63271d13","line":195,"in_reply_to":"3a961159_2e6d2099","updated":"2014-12-10 15:02:01.000000000","message":"Agree.\n\nIf _read_account_rules was changed to take a single prefix arg and return a dict for specified prefix, then lines 176-183 could be:\n\n for prefix_name in self.account_prefixes:\n        self.account_rules[prefix_name] \u003d dict(\n                operator_roles\u003d[\u0027admin\u0027, \u0027swiftoperator\u0027], service_roles\u003d[])\n        self.account_rules[prefix_name].update(self._read_account_rules(\u0027\u0027)\n        self.account_rules[prefix_name].update(self._read_account_rules(prefix_name)","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _read_account_rules(self, prefix_value, prefix_name):"},{"line_number":195,"context_line":"        for param in [\u0027operator_roles\u0027, \u0027service_roles\u0027]:"},{"line_number":196,"context_line":"            value \u003d self.conf.get(\u0027%s%s\u0027 % (prefix_value, param), None)"},{"line_number":197,"context_line":"            if value:"},{"line_number":198,"context_line":"                self.account_rules[prefix_name][param] \u003d []"},{"line_number":199,"context_line":"                for role in value.lower().split(\u0027,\u0027):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_432b0130","line":196,"updated":"2014-12-10 15:02:01.000000000","message":"the None is not required - get() will default to None","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        if \u0027HTTP_X_SERVICE_ROLES\u0027 in environ:"},{"line_number":269,"context_line":"            service_roles \u003d environ[\u0027HTTP_X_SERVICE_ROLES\u0027].split(\u0027,\u0027)"},{"line_number":270,"context_line":"        else:"},{"line_number":271,"context_line":"            service_roles \u003d []"},{"line_number":272,"context_line":"        identity \u003d {\u0027user\u0027: (environ.get(\u0027HTTP_X_USER_ID\u0027),"},{"line_number":273,"context_line":"                             environ.get(\u0027HTTP_X_USER_NAME\u0027)),"},{"line_number":274,"context_line":"                    \u0027tenant\u0027: (environ.get(\u0027HTTP_X_TENANT_ID\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_14468d7c","line":271,"updated":"2014-12-10 15:02:01.000000000","message":"the else clause is unnecessary","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"bec9d55e8386bebf34a0313a0fbd03aae4602499","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            return \u0027%s\u0027 % tenant_id"},{"line_number":318,"context_line":"        else:"},{"line_number":319,"context_line":"            return \u0027%s%s\u0027 % (first_prefix, tenant_id)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def _get_account_name(self, prefix, tenant_id):"},{"line_number":322,"context_line":"        return \u0027%s%s\u0027 % (prefix, tenant_id)"},{"line_number":323,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_5ff85449","line":320,"updated":"2014-12-09 16:58:47.000000000","message":"Might be clearer if \"prefix\" was called \"prefix_value\"","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"bec9d55e8386bebf34a0313a0fbd03aae4602499","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                return True"},{"line_number":329,"context_line":"        return False"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def _get_account_prefix_name(self, account):"},{"line_number":332,"context_line":"        \"\"\"Get the prefix of an account (where \u0027_\u0027 is for empty prefix)\"\"\""},{"line_number":333,"context_line":"        for prefix in self.account_prefixes:"},{"line_number":334,"context_line":"            if prefix \u003d\u003d \u0027_\u0027:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_dfba846d","line":331,"updated":"2014-12-09 16:58:47.000000000","message":"The \"(where \u0027_\u0027 is....)\" does not help understanding\n\nHmm, for prefix *name* of \u0027_\u0027, this function always returns \u0027_\u0027 -- this may seem right because a blank prefix matches everything. However, if the account is SERVICE_1233, and resellers are \u0027_\u0027, \u0027SERVICE\u0027 you want \u0027SERVICE_\u0027 as the result -- not \u0027_\u0027","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        operator_roles \u003d self.account_rules[account_prefix][\u0027operator_roles\u0027]"},{"line_number":515,"context_line":"        have_operator_role \u003d set(operator_roles).intersection("},{"line_number":516,"context_line":"            set(user_roles))"},{"line_number":517,"context_line":"        if service_roles and have_service_role and have_operator_role:"},{"line_number":518,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":519,"context_line":"        elif not service_roles and have_operator_role:"},{"line_number":520,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_fa83ab01","line":517,"updated":"2014-12-10 15:02:01.000000000","message":"simpler...\n\n if have_operator_role and (have_service_role if service_roles else True):","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":520,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":521,"context_line":"        if req.environ.get(\u0027swift_owner\u0027):"},{"line_number":522,"context_line":"            log_msg \u003d \u0027allow user with role(s) %s as account admin\u0027"},{"line_number":523,"context_line":"            self.logger.debug(log_msg, \u0027,\u0027.join(have_operator_role))"},{"line_number":524,"context_line":"            return"},{"line_number":525,"context_line":""},{"line_number":526,"context_line":"        # If user is of the same name of the tenant then make owner of it."}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_bade830f","line":523,"updated":"2014-12-10 15:02:01.000000000","message":"nice. could add the service role(s):\n\n \u0027,\u0027.join(have_operator_role + have_service_role)","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":561,"context_line":"            return"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        is_authoritative_authz \u003d (account and"},{"line_number":564,"context_line":"                                  self._get_account_prefix_name(account))"},{"line_number":565,"context_line":"        if not is_authoritative_authz:"},{"line_number":566,"context_line":"            return self.denied_response(req)"},{"line_number":567,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_3d97ed91","line":564,"updated":"2014-12-10 15:02:01.000000000","message":"This is broken for the reasons you discuss under _get_account_prefix - if configured with an \u0027_\u0027 prefix then this will claim to be authoritative for ALL prefixes","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        # The next line only applies to accounts with the SERVICE prefix"},{"line_number":114,"context_line":"        SERVICE_operator_roles \u003d admin, some_other_role"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    Composite tokens are supported by the inclusion of the service_roles"},{"line_number":117,"context_line":"    configuration option. When present, this option requires that the"},{"line_number":118,"context_line":"    X-Service-Token header supply a token from a user who has a role listed"},{"line_number":119,"context_line":"    in service_roles. Here is an example configuration::"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_55807ebf","line":116,"updated":"2015-01-12 12:40:41.000000000","message":"Should \u0027Composite\u0027 be \u0027Service\u0027? or...is there some place where composite token is defined as being X-Service-Token?\n\nMaybe s/Composite tokens/X-Service-Tokens/","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        # The next line only applies to accounts with the SERVICE prefix"},{"line_number":114,"context_line":"        SERVICE_operator_roles \u003d admin, some_other_role"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    Composite tokens are supported by the inclusion of the service_roles"},{"line_number":117,"context_line":"    configuration option. When present, this option requires that the"},{"line_number":118,"context_line":"    X-Service-Token header supply a token from a user who has a role listed"},{"line_number":119,"context_line":"    in service_roles. Here is an example configuration::"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_a0cc5b8b","line":116,"in_reply_to":"3a961159_55807ebf","updated":"2015-01-20 10:56:33.000000000","message":"\"Composite token\" was a term used by Keystone spec for X-Service-Token. However, I don\u0027t see many (or any) references in the documentation using that term. So I\u0027ll change to X-Service-Token","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            if prefix not in self.reseller_prefixes:"},{"line_number":179,"context_line":"                self.reseller_prefixes.append(prefix)"},{"line_number":180,"context_line":"        if len(self.reseller_prefixes) \u003d\u003d 0:"},{"line_number":181,"context_line":"            self.reseller_prefixes.append(\u0027\u0027)"},{"line_number":182,"context_line":"        # Get prefix-using config options"},{"line_number":183,"context_line":"        self.account_rules \u003d {}"},{"line_number":184,"context_line":"        for prefix in self.reseller_prefixes:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_404c3e9e","line":181,"updated":"2015-01-12 12:40:41.000000000","message":"this surprised me - and if it stays should be added to the doc, since currently doc suggests that blank namespace is set by \u0027\u0027.\n\nAn alternative would be to apply the default \u0027AUTH_\u0027 in this case. That is consistent with how e.g. operator_roles behaves - \u0027operator_roles \u003d \u0027 results in admin, swiftoperator being used","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"27424dc70473df1068c87b9e99fe28b0fa6076de","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            if prefix not in self.reseller_prefixes:"},{"line_number":179,"context_line":"                self.reseller_prefixes.append(prefix)"},{"line_number":180,"context_line":"        if len(self.reseller_prefixes) \u003d\u003d 0:"},{"line_number":181,"context_line":"            self.reseller_prefixes.append(\u0027\u0027)"},{"line_number":182,"context_line":"        # Get prefix-using config options"},{"line_number":183,"context_line":"        self.account_rules \u003d {}"},{"line_number":184,"context_line":"        for prefix in self.reseller_prefixes:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_6b5acf2b","line":181,"in_reply_to":"3a961159_404c3e9e","updated":"2015-01-12 17:53:40.000000000","message":"As-is (original code),\n\n    reseller_prefix\u003d\n\nresults in a blank prefix. So I was just keeping backwards comparability with old code. I\u0027ll update the same-conf file to say this.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8857d527c73cbc992bf25e16ff12c97a47999a00","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            if prefix not in self.reseller_prefixes:"},{"line_number":179,"context_line":"                self.reseller_prefixes.append(prefix)"},{"line_number":180,"context_line":"        if len(self.reseller_prefixes) \u003d\u003d 0:"},{"line_number":181,"context_line":"            self.reseller_prefixes.append(\u0027\u0027)"},{"line_number":182,"context_line":"        # Get prefix-using config options"},{"line_number":183,"context_line":"        self.account_rules \u003d {}"},{"line_number":184,"context_line":"        for prefix in self.reseller_prefixes:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_f093eda1","line":181,"in_reply_to":"3a961159_6b5acf2b","updated":"2015-01-13 10:30:22.000000000","message":"you\u0027re right :)","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        if \u0027HTTP_X_SERVICE_ROLES\u0027 in environ:"},{"line_number":282,"context_line":"            service_roles \u003d environ[\u0027HTTP_X_SERVICE_ROLES\u0027].split(\u0027,\u0027)"},{"line_number":283,"context_line":"        else:"},{"line_number":284,"context_line":"            service_roles \u003d []"},{"line_number":285,"context_line":"        identity \u003d {\u0027user\u0027: (environ.get(\u0027HTTP_X_USER_ID\u0027),"},{"line_number":286,"context_line":"                             environ.get(\u0027HTTP_X_USER_NAME\u0027)),"},{"line_number":287,"context_line":"                    \u0027tenant\u0027: (environ.get(\u0027HTTP_X_TENANT_ID\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_df146ba1","line":284,"updated":"2015-01-12 12:40:41.000000000","message":"the else clause is not needed (or, delete line 278)","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        if \u0027HTTP_X_SERVICE_ROLES\u0027 in environ:"},{"line_number":282,"context_line":"            service_roles \u003d environ[\u0027HTTP_X_SERVICE_ROLES\u0027].split(\u0027,\u0027)"},{"line_number":283,"context_line":"        else:"},{"line_number":284,"context_line":"            service_roles \u003d []"},{"line_number":285,"context_line":"        identity \u003d {\u0027user\u0027: (environ.get(\u0027HTTP_X_USER_ID\u0027),"},{"line_number":286,"context_line":"                             environ.get(\u0027HTTP_X_USER_NAME\u0027)),"},{"line_number":287,"context_line":"                    \u0027tenant\u0027: (environ.get(\u0027HTTP_X_TENANT_ID\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_91b40ff2","line":284,"in_reply_to":"3a961159_df146ba1","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _get_account_for_tenant(self, tenant_id):"},{"line_number":318,"context_line":"        \"\"\"Convenience function reduces unit test churn\"\"\""},{"line_number":319,"context_line":"        return \u0027%s%s\u0027 % (self.reseller_prefixes[0], tenant_id)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def _get_account_name(self, prefix, tenant_id):"},{"line_number":322,"context_line":"        return \u0027%s%s\u0027 % (prefix, tenant_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_5fd5dbb5","line":319,"updated":"2015-01-12 12:40:41.000000000","message":"can you refactor the three above methods to the test module since they are only used by tests?","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _get_account_for_tenant(self, tenant_id):"},{"line_number":318,"context_line":"        \"\"\"Convenience function reduces unit test churn\"\"\""},{"line_number":319,"context_line":"        return \u0027%s%s\u0027 % (self.reseller_prefixes[0], tenant_id)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def _get_account_name(self, prefix, tenant_id):"},{"line_number":322,"context_line":"        return \u0027%s%s\u0027 % (prefix, tenant_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_a1861663","line":319,"in_reply_to":"3a961159_5fd5dbb5","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                return True"},{"line_number":329,"context_line":"        return False"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def _get_account_prefix(self, account):"},{"line_number":332,"context_line":"        \"\"\"Get the prefix of an account\"\"\""},{"line_number":333,"context_line":"        # Empty prefix matches everything, so try to match others first"},{"line_number":334,"context_line":"        for prefix in [pre for pre in self.reseller_prefixes if pre !\u003d \u0027\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_4a10bb4f","line":331,"updated":"2015-01-12 12:40:41.000000000","message":"nit: (I think I made a similar comment elsewhere) - underscores should never appear in a project id so you could split on \u0027_\u0027 and then match.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                return True"},{"line_number":329,"context_line":"        return False"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def _get_account_prefix(self, account):"},{"line_number":332,"context_line":"        \"\"\"Get the prefix of an account\"\"\""},{"line_number":333,"context_line":"        # Empty prefix matches everything, so try to match others first"},{"line_number":334,"context_line":"        for prefix in [pre for pre in self.reseller_prefixes if pre !\u003d \u0027\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_c10a42d0","line":331,"in_reply_to":"3a961159_4a10bb4f","updated":"2015-01-20 10:56:33.000000000","message":"I\u0027ll leave this as is. Yes. a project id does does (will) not have an underscore. However, since we know the legal prefixes, we can treat project-id as opaque (and not rely on the underscore)","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f89b32b268bde06a42a19f3557282c8dd18dfbb5","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from swift.common.request_helpers import get_sys_meta_prefix"},{"line_number":19,"context_line":"from swift.common.swob import HTTPNotFound, HTTPForbidden, HTTPUnauthorized"},{"line_number":20,"context_line":"from swift.common.utils import config_read_reseller_options"},{"line_number":21,"context_line":"from swift.common.utils import register_swift_info"},{"line_number":22,"context_line":"from swift.proxy.controllers.base import get_account_info"},{"line_number":23,"context_line":"import functools"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_626f2ec6","line":21,"updated":"2015-02-03 01:56:20.000000000","message":"You should combine the 2 lines:\n\n  from swift.common.utils import register_swift_info, config_read_reseller_options","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from swift.common.request_helpers import get_sys_meta_prefix"},{"line_number":19,"context_line":"from swift.common.swob import HTTPNotFound, HTTPForbidden, HTTPUnauthorized"},{"line_number":20,"context_line":"from swift.common.utils import config_read_reseller_options"},{"line_number":21,"context_line":"from swift.common.utils import register_swift_info"},{"line_number":22,"context_line":"from swift.proxy.controllers.base import get_account_info"},{"line_number":23,"context_line":"import functools"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_f6166da6","line":21,"in_reply_to":"da86d52c_626f2ec6","updated":"2015-02-06 08:56:33.000000000","message":"Won\u0027t fit...which is why  I didn\u0027t do it in the first place...and I prefer two imports to using a backslash continuation","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7f8e69bd95ed7baa8c824f0903f18d22e1aebad4","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from swift.common.request_helpers import get_sys_meta_prefix"},{"line_number":19,"context_line":"from swift.common.swob import HTTPNotFound, HTTPForbidden, HTTPUnauthorized"},{"line_number":20,"context_line":"from swift.common.utils import config_read_reseller_options"},{"line_number":21,"context_line":"from swift.common.utils import register_swift_info"},{"line_number":22,"context_line":"from swift.proxy.controllers.base import get_account_info"},{"line_number":23,"context_line":"import functools"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_8f576c57","line":21,"updated":"2015-02-05 15:24:47.000000000","message":"echo Matt\u0027s comment from v9 - put all imports from swift.common.utils on one line","commit_id":"ec90dcc78430f67118866627d5a9847288963536"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"beadb13adad648e6c9e270dd81446f7a00784075","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from swift.common.request_helpers import get_sys_meta_prefix"},{"line_number":19,"context_line":"from swift.common.swob import HTTPNotFound, HTTPForbidden, HTTPUnauthorized"},{"line_number":20,"context_line":"from swift.common.utils import config_read_reseller_options"},{"line_number":21,"context_line":"from swift.common.utils import register_swift_info"},{"line_number":22,"context_line":"from swift.proxy.controllers.base import get_account_info"},{"line_number":23,"context_line":"import functools"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_9f43f911","line":21,"in_reply_to":"da86d52c_8f576c57","updated":"2015-02-06 17:37:53.000000000","message":"Done","commit_id":"ec90dcc78430f67118866627d5a9847288963536"},{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"1b9db3dbe367cdcd69c071944efd73c7febab6cf","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                    \u0027tenant\u0027: (environ.get(\u0027HTTP_X_TENANT_ID\u0027),"},{"line_number":272,"context_line":"                               environ.get(\u0027HTTP_X_TENANT_NAME\u0027)),"},{"line_number":273,"context_line":"                    \u0027roles\u0027: roles,"},{"line_number":274,"context_line":"                    \u0027service_roles\u0027: service_roles}"},{"line_number":275,"context_line":"        token_info \u003d environ.get(\u0027keystone.token_info\u0027, {})"},{"line_number":276,"context_line":"        auth_version \u003d 0"},{"line_number":277,"context_line":"        user_domain \u003d project_domain \u003d (None, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_f5838d53","line":274,"updated":"2015-02-11 14:00:05.000000000","message":"do we need to care auth version to get HTTP_X_SERVICE_ROLES here?\nMy concern is if there is no key \"HTTP_X_SERVICE_ROLES\", this code looks risky.","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"757db2dce2f7895a7bd2c85aed9f67ec548d8312","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                    \u0027tenant\u0027: (environ.get(\u0027HTTP_X_TENANT_ID\u0027),"},{"line_number":272,"context_line":"                               environ.get(\u0027HTTP_X_TENANT_NAME\u0027)),"},{"line_number":273,"context_line":"                    \u0027roles\u0027: roles,"},{"line_number":274,"context_line":"                    \u0027service_roles\u0027: service_roles}"},{"line_number":275,"context_line":"        token_info \u003d environ.get(\u0027keystone.token_info\u0027, {})"},{"line_number":276,"context_line":"        auth_version \u003d 0"},{"line_number":277,"context_line":"        user_domain \u003d project_domain \u003d (None, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_c5b8c913","line":274,"in_reply_to":"da86d52c_1f116daf","updated":"2015-02-17 11:04:06.000000000","message":"Using common.utils in next draft","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8e4e0edf2389067711c515e1299aa4155a905d20","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                    \u0027tenant\u0027: (environ.get(\u0027HTTP_X_TENANT_ID\u0027),"},{"line_number":272,"context_line":"                               environ.get(\u0027HTTP_X_TENANT_NAME\u0027)),"},{"line_number":273,"context_line":"                    \u0027roles\u0027: roles,"},{"line_number":274,"context_line":"                    \u0027service_roles\u0027: service_roles}"},{"line_number":275,"context_line":"        token_info \u003d environ.get(\u0027keystone.token_info\u0027, {})"},{"line_number":276,"context_line":"        auth_version \u003d 0"},{"line_number":277,"context_line":"        user_domain \u003d project_domain \u003d (None, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_1f116daf","line":274,"in_reply_to":"da86d52c_b6701fa5","updated":"2015-02-16 19:10:06.000000000","message":"+1 Clay\u0027s suggestion if you need to push another version","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5a9a0f42c7e1269dfdb3267d94f722037f952325","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                    \u0027tenant\u0027: (environ.get(\u0027HTTP_X_TENANT_ID\u0027),"},{"line_number":272,"context_line":"                               environ.get(\u0027HTTP_X_TENANT_NAME\u0027)),"},{"line_number":273,"context_line":"                    \u0027roles\u0027: roles,"},{"line_number":274,"context_line":"                    \u0027service_roles\u0027: service_roles}"},{"line_number":275,"context_line":"        token_info \u003d environ.get(\u0027keystone.token_info\u0027, {})"},{"line_number":276,"context_line":"        auth_version \u003d 0"},{"line_number":277,"context_line":"        user_domain \u003d project_domain \u003d (None, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_c3ffa132","line":274,"in_reply_to":"da86d52c_b8ce6981","updated":"2015-02-11 18:52:27.000000000","message":"this might work better:\n\n    \u0027service_roles\u0027 \u003d common.utils.list_from_csv(environ.get(\u0027HTTP_X_SERVICE_ROLES\u0027, \u0027\u0027))","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"09441aa5a56914665569b664679b1363628b3d06","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                    \u0027tenant\u0027: (environ.get(\u0027HTTP_X_TENANT_ID\u0027),"},{"line_number":272,"context_line":"                               environ.get(\u0027HTTP_X_TENANT_NAME\u0027)),"},{"line_number":273,"context_line":"                    \u0027roles\u0027: roles,"},{"line_number":274,"context_line":"                    \u0027service_roles\u0027: service_roles}"},{"line_number":275,"context_line":"        token_info \u003d environ.get(\u0027keystone.token_info\u0027, {})"},{"line_number":276,"context_line":"        auth_version \u003d 0"},{"line_number":277,"context_line":"        user_domain \u003d project_domain \u003d (None, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_b6701fa5","line":274,"in_reply_to":"da86d52c_c3ffa132","updated":"2015-02-12 01:03:10.000000000","message":"@Donagh, thanks for the info of HTTP_X_SERVICE_ROLES. We need to consider the case keystone middleware which does not support X-Service-Token but I understand this code cover it\n\nThe risk which I wrote is the following case. if there is no key in the dictionary (environ), KeyError will be raised. You covered it with \"if \u0027HTTP_X_SERVICE_ROLES\u0027 in environ\". This is my mis-reading of the code. Sorry.\n\nMy image was following but I understand you use same logic above (roles).\nroles \u003d environ.get(\u0027HTTP_X_ROLES\u0027, \u0027\u0027).split(\u0027,\u0027)","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"d75c892f17a2d1cd219af06c15e1b6da1e3e0582","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                    \u0027tenant\u0027: (environ.get(\u0027HTTP_X_TENANT_ID\u0027),"},{"line_number":272,"context_line":"                               environ.get(\u0027HTTP_X_TENANT_NAME\u0027)),"},{"line_number":273,"context_line":"                    \u0027roles\u0027: roles,"},{"line_number":274,"context_line":"                    \u0027service_roles\u0027: service_roles}"},{"line_number":275,"context_line":"        token_info \u003d environ.get(\u0027keystone.token_info\u0027, {})"},{"line_number":276,"context_line":"        auth_version \u003d 0"},{"line_number":277,"context_line":"        user_domain \u003d project_domain \u003d (None, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_b8ce6981","line":274,"in_reply_to":"da86d52c_f5838d53","updated":"2015-02-11 15:00:44.000000000","message":"HTTP_X_SERVICE_ROLES is populated by Keystone middleware\u0027s auth_token. If X-Service-Token is not present in the request (or is invalid when https://review.openstack.org/#/c/153247 lands), then HTTP_X_SERVICE_ROLE is not set in the environment ...and hence service_roles becomes an empty list. I\u0027m not sure what you mean by \"risky\", but the effect of an empty service_roles is that you get denied if service_roles option is set.\n\nBy \"version\", do you mean Keystone\u0027s v2.0 vs v3? If so, HTTP_X_SERVICE_ROLES is independent of that.\n\nIf by \"version\", you mean that you use this Swift middleware but an old version of Keystone\u0027s auth_token I would say that\u0027s a missconfiguration. auth_token supported HTTP_X_SERVICE_ROLES in Juno.","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"1b9db3dbe367cdcd69c071944efd73c7febab6cf","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        if have_operator_role and (service_roles and have_service_role):"},{"line_number":491,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":492,"context_line":"        elif have_operator_role and not service_roles:"},{"line_number":493,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":494,"context_line":"        if req.environ.get(\u0027swift_owner\u0027):"},{"line_number":495,"context_line":"            log_msg \u003d \u0027allow user with role(s) %s as account admin\u0027"},{"line_number":496,"context_line":"            self.logger.debug(log_msg, \u0027,\u0027.join(have_operator_role.union("}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_d5704942","line":493,"updated":"2015-02-11 14:00:05.000000000","message":"minor comment: here I think the logic realizes the following pattern.\n\nservice_roles have_service_role expectation\nT                          T\t\t\t  T\nT                          F                    F\nF                          T                    T\nF                          F                    T\n\nHow about the follwoing logic?\n\nif have_operator_role and \n   not (service_roles and not have_service_role):\n    req.environ[\u0027swift_owner\u0027] \u003d True\nOR\nif have_operator_role:\n    if not (service_roles and not have_service_role):\n        req.environ[\u0027swift_owner\u0027] \u003d True","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5a9a0f42c7e1269dfdb3267d94f722037f952325","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        if have_operator_role and (service_roles and have_service_role):"},{"line_number":491,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":492,"context_line":"        elif have_operator_role and not service_roles:"},{"line_number":493,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":494,"context_line":"        if req.environ.get(\u0027swift_owner\u0027):"},{"line_number":495,"context_line":"            log_msg \u003d \u0027allow user with role(s) %s as account admin\u0027"},{"line_number":496,"context_line":"            self.logger.debug(log_msg, \u0027,\u0027.join(have_operator_role.union("}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_4373b04d","line":493,"in_reply_to":"da86d52c_1b43efaf","updated":"2015-02-11 18:52:27.000000000","message":"+1 to making the boolean math as obvious as possible when reading\n\nThe primary requirement is have_operator_role, then if service_roles is a thing you also have to have_service_role\n\n    if have_operator_role:\n        if service_role:\n            if have_service_role:\n                ...\n        else:\n            ...\n\nWhich I think is basically what is written, I don\u0027t find either of the alternatives more obviously correct.  I think you may be also able to say:\n\n    service_roles_valid_enough \u003d have_operator_roles if service_roles else True\n\nThen you can just say:\n\n    if have_operator_role and service_roles_valid_enough:\n        ...\n\nDon\u0027t think it\u0027s any more maintainable really...","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"757db2dce2f7895a7bd2c85aed9f67ec548d8312","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        if have_operator_role and (service_roles and have_service_role):"},{"line_number":491,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":492,"context_line":"        elif have_operator_role and not service_roles:"},{"line_number":493,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":494,"context_line":"        if req.environ.get(\u0027swift_owner\u0027):"},{"line_number":495,"context_line":"            log_msg \u003d \u0027allow user with role(s) %s as account admin\u0027"},{"line_number":496,"context_line":"            self.logger.debug(log_msg, \u0027,\u0027.join(have_operator_role.union("}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_2558c5f9","line":493,"in_reply_to":"da86d52c_202e1ca6","updated":"2015-02-17 11:04:06.000000000","message":"I\u0027m going to leave the code as-is. However, the discussion suggested to me that the matrix would be useful as a comment. Next draft","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"f15e1c7c047696ddd355bd42e40ea5704f869452","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        if have_operator_role and (service_roles and have_service_role):"},{"line_number":491,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":492,"context_line":"        elif have_operator_role and not service_roles:"},{"line_number":493,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":494,"context_line":"        if req.environ.get(\u0027swift_owner\u0027):"},{"line_number":495,"context_line":"            log_msg \u003d \u0027allow user with role(s) %s as account admin\u0027"},{"line_number":496,"context_line":"            self.logger.debug(log_msg, \u0027,\u0027.join(have_operator_role.union("}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_3a63a6dd","line":493,"in_reply_to":"da86d52c_2558c5f9","updated":"2015-02-23 06:15:39.000000000","message":"@Donagh, thanks for the answer. to comment the matrix here is a good idea! First I thought it\u0027s better to have additional check for AUTH prefix here but I understand your stance and it\u0027s clear enough for me. Thanks!","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"09441aa5a56914665569b664679b1363628b3d06","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        if have_operator_role and (service_roles and have_service_role):"},{"line_number":491,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":492,"context_line":"        elif have_operator_role and not service_roles:"},{"line_number":493,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":494,"context_line":"        if req.environ.get(\u0027swift_owner\u0027):"},{"line_number":495,"context_line":"            log_msg \u003d \u0027allow user with role(s) %s as account admin\u0027"},{"line_number":496,"context_line":"            self.logger.debug(log_msg, \u0027,\u0027.join(have_operator_role.union("}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_e041ed39","line":493,"in_reply_to":"da86d52c_4373b04d","updated":"2015-02-12 01:03:10.000000000","message":"@Donagh, Clay, from maintenance point of view,  I completely agree with you. No objection :) If possible I prefer to have Clay\u0027s logic because first if statement has three conditions second elif statement has two conditions and both if/elif statements exist same level. This is why I commented here.\n\nOne question:\nDoes the following case expect account_prefix is \u0027AUTH\u0027 only? \nhttp://paste.openstack.org/show/171681/","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"d75c892f17a2d1cd219af06c15e1b6da1e3e0582","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        if have_operator_role and (service_roles and have_service_role):"},{"line_number":491,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":492,"context_line":"        elif have_operator_role and not service_roles:"},{"line_number":493,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":494,"context_line":"        if req.environ.get(\u0027swift_owner\u0027):"},{"line_number":495,"context_line":"            log_msg \u003d \u0027allow user with role(s) %s as account admin\u0027"},{"line_number":496,"context_line":"            self.logger.debug(log_msg, \u0027,\u0027.join(have_operator_role.union("}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_1b43efaf","line":493,"in_reply_to":"da86d52c_d5704942","updated":"2015-02-11 15:00:44.000000000","message":"Personally, when I have a number of conditions that interact, I find it easier to list the conditions/assertions and have the code reflect that. Here are the conditions:\n\n    have_operator_role   service_roles   have_service_role     swift_owner?\n    yes                  yes             yes                   yes\n    yes                  no              don\u0027t care            yes\n    no                   don\u0027t care      don\u0027t care            no\n\n\nYour suggested code does the same thing, but I had to stare at it for a couple of minutes. However, I\u0027ll let other reviewers comment and will change if needed.","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"a3a7f7b65ab9810dbfc63f9b0a846c8a84fea25f","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        if have_operator_role and (service_roles and have_service_role):"},{"line_number":491,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":492,"context_line":"        elif have_operator_role and not service_roles:"},{"line_number":493,"context_line":"            req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":494,"context_line":"        if req.environ.get(\u0027swift_owner\u0027):"},{"line_number":495,"context_line":"            log_msg \u003d \u0027allow user with role(s) %s as account admin\u0027"},{"line_number":496,"context_line":"            self.logger.debug(log_msg, \u0027,\u0027.join(have_operator_role.union("}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_202e1ca6","line":493,"in_reply_to":"da86d52c_e041ed39","updated":"2015-02-16 11:54:45.000000000","message":"\u003e Does the following case expect account_prefix is \u0027AUTH\u0027 only?\nYes -- assuming the operator does not set  AUTH_service_roles to some value, then that case applies to AUTH_ prefix.","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        self.allow_names_in_acls \u003d swift_utils.config_true_value("},{"line_number":197,"context_line":"            conf.get(\u0027allow_names_in_acls\u0027, \u0027true\u0027))"},{"line_number":198,"context_line":"        register_swift_info(\u0027keystoneauth\u0027,"},{"line_number":199,"context_line":"                            reseller_prefixes\u003dself.reseller_prefixes)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def __call__(self, environ, start_response):"},{"line_number":202,"context_line":"        identity \u003d self._keystone_identity(environ)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_9064fae5","line":199,"updated":"2015-02-19 07:08:12.000000000","message":"so this is new, anyone worried about publishing this?  Doesn\u0027t info have something that\u0027s like admin only?\n\nI know it\u0027s used in functests to validate the cluster config and raise an early skip - but I think it\u0027d be ok (better?) to just let the test fail if test.conf says to test one thing and it turns out the cluster isn\u0027t down for it.\n\nIn fact, I misconfigured my proxy-server.conf once (left out requried_groups) and got exactly that behavior, a failing test.  I *also* had some skipped tests I didn\u0027t expect when I saw the \u0027skiping service token\u0027 warning go away, only to find out the tests themselves were skipped because of cluster info.\n\nSo I don\u0027t think the functest check is a good reason to expose this - do we have any others?","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        self.allow_names_in_acls \u003d swift_utils.config_true_value("},{"line_number":197,"context_line":"            conf.get(\u0027allow_names_in_acls\u0027, \u0027true\u0027))"},{"line_number":198,"context_line":"        register_swift_info(\u0027keystoneauth\u0027,"},{"line_number":199,"context_line":"                            reseller_prefixes\u003dself.reseller_prefixes)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def __call__(self, environ, start_response):"},{"line_number":202,"context_line":"        identity \u003d self._keystone_identity(environ)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_0c3ffc87","line":199,"in_reply_to":"da86d52c_9064fae5","updated":"2015-02-19 17:57:47.000000000","message":"In doc/source/overview_backing_store.rst I suggest the service (e.g. Glance) can verify that the prefix it uses is configured. I guess we can discuss if we need this or not (or if it should require privs). I *don\u0027t* expose roles names for security reasons...I didn\u0027t think the prefix was sensitive.","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"}],"swift/common/middleware/tempauth.py":[{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"bec9d55e8386bebf34a0313a0fbd03aae4602499","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    by AUTH_. When a request\u0027s token and/or path start with AUTH_, this"},{"line_number":75,"context_line":"    middleware knows it is responsible."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    We allow the reseller prefix to be list. In tempauth, the first item"},{"line_number":78,"context_line":"    in the list is used as the prefix for tokens and user groups. The"},{"line_number":79,"context_line":"    other prefixes provide alternate accounts that user\u0027s can access. For"},{"line_number":80,"context_line":"    example if the reseller prefix list is \u0027AUTH OTHER\u0027, a user with"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_dace12b4","line":77,"updated":"2014-12-09 16:58:47.000000000","message":"drop \"and user groups\"","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"bec9d55e8386bebf34a0313a0fbd03aae4602499","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"     X-Service-Token:"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"     If an X-Service-Token is presented in the request headers, the groups"},{"line_number":95,"context_line":"     derived from the token are appended to the roles derived form"},{"line_number":96,"context_line":"     X-Auth-Token. If X-Auth-Token is missing or invalid, X-Service-Token"},{"line_number":97,"context_line":"     is not processed."}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_3ae8f60f","line":94,"updated":"2014-12-09 16:58:47.000000000","message":"typo: from","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"bec9d55e8386bebf34a0313a0fbd03aae4602499","unresolved":false,"context_lines":[{"line_number":97,"context_line":"     is not processed."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"     The X-Service-Token is useful when combined with multiple reseller prefix"},{"line_number":100,"context_line":"     items. In the following configuration, accounts prefixed SERVICE_"},{"line_number":101,"context_line":"     are only accessible if X-Auth-Token is form the end-user and"},{"line_number":102,"context_line":"     X-Service-Token is from the ``glance`` user::"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_fac4ae93","line":100,"updated":"2014-12-09 16:58:47.000000000","message":"typo: from","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"bec9d55e8386bebf34a0313a0fbd03aae4602499","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                return True"},{"line_number":345,"context_line":"        return False"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    def _get_account_prefix_name(self, account):"},{"line_number":348,"context_line":"        \"\"\"Get the prefix of an account (where \u0027_\u0027 is for empty prefix)\"\"\""},{"line_number":349,"context_line":"        for prefix in self.account_prefixes:"},{"line_number":350,"context_line":"            if prefix \u003d\u003d \u0027_\u0027:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_3a1b961c","line":347,"updated":"2014-12-09 16:58:47.000000000","message":"dito comment from keystoneauth","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self.logger \u003d get_logger(conf, log_route\u003d\u0027tempauth\u0027)"},{"line_number":161,"context_line":"        self.log_headers \u003d config_true_value(conf.get(\u0027log_headers\u0027, \u0027f\u0027))"},{"line_number":162,"context_line":"        reseller_prefixes \u003d conf.get(\u0027reseller_prefix\u0027,"},{"line_number":163,"context_line":"                                     \u0027AUTH\u0027).split()"},{"line_number":164,"context_line":"        self.reseller_prefixes \u003d []"},{"line_number":165,"context_line":"        for prefix in [pre.strip() for"},{"line_number":166,"context_line":"                       pre in reseller_prefixes if pre.strip()]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_fb16bb48","line":163,"updated":"2015-01-12 12:40:41.000000000","message":"Can this be consistent with keystoneauth and be a comma separated list?","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"27424dc70473df1068c87b9e99fe28b0fa6076de","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self.logger \u003d get_logger(conf, log_route\u003d\u0027tempauth\u0027)"},{"line_number":161,"context_line":"        self.log_headers \u003d config_true_value(conf.get(\u0027log_headers\u0027, \u0027f\u0027))"},{"line_number":162,"context_line":"        reseller_prefixes \u003d conf.get(\u0027reseller_prefix\u0027,"},{"line_number":163,"context_line":"                                     \u0027AUTH\u0027).split()"},{"line_number":164,"context_line":"        self.reseller_prefixes \u003d []"},{"line_number":165,"context_line":"        for prefix in [pre.strip() for"},{"line_number":166,"context_line":"                       pre in reseller_prefixes if pre.strip()]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_4bcfd329","line":163,"in_reply_to":"3a961159_fb16bb48","updated":"2015-01-12 17:53:40.000000000","message":"This *did* becomes a bit of a pain -- I used blank separated because everything else in tempauth seems to be blank separated. It\u0027s only a problem if you switch back and forward between the two.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2011-2014 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_60ff33ab","line":1,"updated":"2015-01-22 19:02:56.000000000","message":"2015","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    by AUTH_. When a request\u0027s token and/or path start with AUTH_, this"},{"line_number":75,"context_line":"    middleware knows it is responsible."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    We allow the reseller prefix to be list. In tempauth, the first item"},{"line_number":78,"context_line":"    in the list is used as the prefix for tokens and user groups. The"},{"line_number":79,"context_line":"    other prefixes provide alternate accounts that user\u0027s can access. For"},{"line_number":80,"context_line":"    example if the reseller prefix list is \u0027AUTH OTHER\u0027, a user with"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_062134fb","line":77,"updated":"2015-01-22 19:02:56.000000000","message":"s/list/a list/","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    by AUTH_. When a request\u0027s token and/or path start with AUTH_, this"},{"line_number":75,"context_line":"    middleware knows it is responsible."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    We allow the reseller prefix to be list. In tempauth, the first item"},{"line_number":78,"context_line":"    in the list is used as the prefix for tokens and user groups. The"},{"line_number":79,"context_line":"    other prefixes provide alternate accounts that user\u0027s can access. For"},{"line_number":80,"context_line":"    example if the reseller prefix list is \u0027AUTH OTHER\u0027, a user with"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_1accf8bb","line":77,"in_reply_to":"1a930d6b_062134fb","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    Required Group:"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    The group .admin is normally needed to access an account (ACLs provide"},{"line_number":87,"context_line":"    an additional way to access and account). You can specify the"},{"line_number":88,"context_line":"    ``require_group`` parameter. This means that you also need the named group"},{"line_number":89,"context_line":"    to access an account. If you have several reseller prefix items, prefix"},{"line_number":90,"context_line":"    the ``require_group`` parameter with the appropriate prefix."}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_46bdfc67","line":87,"updated":"2015-01-22 19:02:56.000000000","message":"s/and/an","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    Required Group:"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    The group .admin is normally needed to access an account (ACLs provide"},{"line_number":87,"context_line":"    an additional way to access and account). You can specify the"},{"line_number":88,"context_line":"    ``require_group`` parameter. This means that you also need the named group"},{"line_number":89,"context_line":"    to access an account. If you have several reseller prefix items, prefix"},{"line_number":90,"context_line":"    the ``require_group`` parameter with the appropriate prefix."}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_baba0408","line":87,"in_reply_to":"1a930d6b_46bdfc67","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                self._read_account_rules(\u0027\u0027))"},{"line_number":182,"context_line":"            prefix_name \u003d prefix if prefix !\u003d \u0027\u0027 else \"\u0027\u0027\""},{"line_number":183,"context_line":"            self.account_rules[prefix].update("},{"line_number":184,"context_line":"                self._read_account_rules(prefix_name))"},{"line_number":185,"context_line":"        # Get other options"},{"line_number":186,"context_line":"        self.logger.set_statsd_prefix(\u0027tempauth.%s\u0027 % ("},{"line_number":187,"context_line":"            self.reseller_prefix if self.reseller_prefix else \u0027NONE\u0027,))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_d86d4134","line":184,"updated":"2015-01-22 19:02:56.000000000","message":"previous 20 lines are very similar to code in keystoneauth, could be refactored to use shared functions?","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                self._read_account_rules(\u0027\u0027))"},{"line_number":182,"context_line":"            prefix_name \u003d prefix if prefix !\u003d \u0027\u0027 else \"\u0027\u0027\""},{"line_number":183,"context_line":"            self.account_rules[prefix].update("},{"line_number":184,"context_line":"                self._read_account_rules(prefix_name))"},{"line_number":185,"context_line":"        # Get other options"},{"line_number":186,"context_line":"        self.logger.set_statsd_prefix(\u0027tempauth.%s\u0027 % ("},{"line_number":187,"context_line":"            self.reseller_prefix if self.reseller_prefix else \u0027NONE\u0027,))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_14dd6ce0","line":184,"in_reply_to":"1a930d6b_d86d4134","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            return self.handle(env, start_response)"},{"line_number":258,"context_line":"        s3 \u003d env.get(\u0027HTTP_AUTHORIZATION\u0027)"},{"line_number":259,"context_line":"        token \u003d env.get(\u0027HTTP_X_AUTH_TOKEN\u0027, env.get(\u0027HTTP_X_STORAGE_TOKEN\u0027))"},{"line_number":260,"context_line":"        service_groups \u003d []"},{"line_number":261,"context_line":"        service_token \u003d env.get(\u0027HTTP_X_SERVICE_TOKEN\u0027)"},{"line_number":262,"context_line":"        if s3 or (token and token.startswith(self.reseller_prefix)):"},{"line_number":263,"context_line":"            # Note: Empty reseller_prefix will match all tokens."}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_29c0c129","line":260,"updated":"2015-01-22 19:02:56.000000000","message":"^^ variable not used","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            return self.handle(env, start_response)"},{"line_number":258,"context_line":"        s3 \u003d env.get(\u0027HTTP_AUTHORIZATION\u0027)"},{"line_number":259,"context_line":"        token \u003d env.get(\u0027HTTP_X_AUTH_TOKEN\u0027, env.get(\u0027HTTP_X_STORAGE_TOKEN\u0027))"},{"line_number":260,"context_line":"        service_groups \u003d []"},{"line_number":261,"context_line":"        service_token \u003d env.get(\u0027HTTP_X_SERVICE_TOKEN\u0027)"},{"line_number":262,"context_line":"        if s3 or (token and token.startswith(self.reseller_prefix)):"},{"line_number":263,"context_line":"            # Note: Empty reseller_prefix will match all tokens."}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_dabd106a","line":260,"in_reply_to":"1a930d6b_29c0c129","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":314,"context_line":""},{"line_number":315,"context_line":"        return self.app(env, start_response)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def i_am_definitive_auth(self, path\u003dNone, account\u003dNone):"},{"line_number":318,"context_line":"        \"\"\""},{"line_number":319,"context_line":"        Determine if we are the definitive auth"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_4516c9f2","line":317,"updated":"2015-01-22 19:02:56.000000000","message":"account arg is never used by a caller","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":314,"context_line":""},{"line_number":315,"context_line":"        return self.app(env, start_response)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def i_am_definitive_auth(self, path\u003dNone, account\u003dNone):"},{"line_number":318,"context_line":"        \"\"\""},{"line_number":319,"context_line":"        Determine if we are the definitive auth"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_c79eafb8","line":317,"in_reply_to":"1a930d6b_4516c9f2","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            rest \u003d account"},{"line_number":340,"context_line":"        for prefix in [pre for pre in self.reseller_prefixes if pre !\u003d \u0027\u0027]:"},{"line_number":341,"context_line":"            if rest and rest.startswith(prefix):"},{"line_number":342,"context_line":"                return True"},{"line_number":343,"context_line":"        return False"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def _get_account_prefix(self, account):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_a2ff6366","line":342,"updated":"2015-01-22 19:02:56.000000000","message":"can this be simplified to something like:\n\n       try:\n            v, a, c, o \u003d split_path(path, 1, 4, True)\n            return self._get_account_prefix(a) not in (\u0027\u0027, None)\n        except ValueError:\n            self.logger.increment(\u0027errors\u0027)","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            rest \u003d account"},{"line_number":340,"context_line":"        for prefix in [pre for pre in self.reseller_prefixes if pre !\u003d \u0027\u0027]:"},{"line_number":341,"context_line":"            if rest and rest.startswith(prefix):"},{"line_number":342,"context_line":"                return True"},{"line_number":343,"context_line":"        return False"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def _get_account_prefix(self, account):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_15a76b0d","line":342,"in_reply_to":"1a930d6b_a2ff6366","updated":"2015-01-27 12:53:19.000000000","message":"Neat","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        for prefix in self.reseller_prefixes:"},{"line_number":363,"context_line":"            if prefix \u003d\u003d \u0027\u0027 and account[0] \u003d\u003d \u0027.\u0027:"},{"line_number":364,"context_line":"                return True"},{"line_number":365,"context_line":"            if account.startswith(prefix) and account[len(prefix)] \u003d\u003d \u0027.\u0027:"},{"line_number":366,"context_line":"                return True"},{"line_number":367,"context_line":"        return False"},{"line_number":368,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_2207f31d","line":365,"updated":"2015-01-22 19:02:56.000000000","message":"\u003canystring\u003e.startswith(\u0027\u0027) is True, so first if clause is not needed.\n\nalso, could this be simplified to :\n\n  prefix \u003d self._get_account_prefix(account)\n  return prefix is not None and account[len(prefix)] \u003d\u003d \u0027.\u0027","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        for prefix in self.reseller_prefixes:"},{"line_number":363,"context_line":"            if prefix \u003d\u003d \u0027\u0027 and account[0] \u003d\u003d \u0027.\u0027:"},{"line_number":364,"context_line":"                return True"},{"line_number":365,"context_line":"            if account.startswith(prefix) and account[len(prefix)] \u003d\u003d \u0027.\u0027:"},{"line_number":366,"context_line":"                return True"},{"line_number":367,"context_line":"        return False"},{"line_number":368,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_d51323b6","line":365,"in_reply_to":"1a930d6b_2207f31d","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":366,"context_line":"                return True"},{"line_number":367,"context_line":"        return False"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"    def _get_user_groups(self, account, account_user, account_id):"},{"line_number":370,"context_line":"        \"\"\""},{"line_number":371,"context_line":"        :param account: example: test"},{"line_number":372,"context_line":"        :param account_user: example: test:tester"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_65eae510","line":369,"updated":"2015-01-22 19:02:56.000000000","message":"account_id arg no longer used","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":366,"context_line":"                return True"},{"line_number":367,"context_line":"        return False"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"    def _get_user_groups(self, account, account_user, account_id):"},{"line_number":370,"context_line":"        \"\"\""},{"line_number":371,"context_line":"        :param account: example: test"},{"line_number":372,"context_line":"        :param account_user: example: test:tester"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_5fcaed6e","line":369,"in_reply_to":"1a930d6b_65eae510","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        :param account: example: test"},{"line_number":372,"context_line":"        :param account_user: example: test:tester"},{"line_number":373,"context_line":"        :param account_id: example: AUTH_test"},{"line_number":374,"context_line":"        :return: list of comma separated group names. The group names are"},{"line_number":375,"context_line":"                 as follows: account,account_user,groups..."},{"line_number":376,"context_line":"                 If .admin is in the groups, this is replaced all the possible"},{"line_number":377,"context_line":"                 account ids. For example, for user joe, account acct and"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_c021c7a0","line":374,"updated":"2015-01-22 19:02:56.000000000","message":"its not a list, I guess its a \u0027comma separated string of group names\u0027","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        :param account: example: test"},{"line_number":372,"context_line":"        :param account_user: example: test:tester"},{"line_number":373,"context_line":"        :param account_id: example: AUTH_test"},{"line_number":374,"context_line":"        :return: list of comma separated group names. The group names are"},{"line_number":375,"context_line":"                 as follows: account,account_user,groups..."},{"line_number":376,"context_line":"                 If .admin is in the groups, this is replaced all the possible"},{"line_number":377,"context_line":"                 account ids. For example, for user joe, account acct and"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_9fc45560","line":374,"in_reply_to":"1a930d6b_c021c7a0","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        :param account_id: example: AUTH_test"},{"line_number":374,"context_line":"        :return: list of comma separated group names. The group names are"},{"line_number":375,"context_line":"                 as follows: account,account_user,groups..."},{"line_number":376,"context_line":"                 If .admin is in the groups, this is replaced all the possible"},{"line_number":377,"context_line":"                 account ids. For example, for user joe, account acct and"},{"line_number":378,"context_line":"                 resellers AUTH_, OTHER_, the returned list is as follows:"},{"line_number":379,"context_line":"                 acct,acct:joe,AUTH_acct,OTHER_acct"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_85519110","line":376,"updated":"2015-01-22 19:02:56.000000000","message":"s/all/by all/","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        :param account_id: example: AUTH_test"},{"line_number":374,"context_line":"        :return: list of comma separated group names. The group names are"},{"line_number":375,"context_line":"                 as follows: account,account_user,groups..."},{"line_number":376,"context_line":"                 If .admin is in the groups, this is replaced all the possible"},{"line_number":377,"context_line":"                 account ids. For example, for user joe, account acct and"},{"line_number":378,"context_line":"                 resellers AUTH_, OTHER_, the returned list is as follows:"},{"line_number":379,"context_line":"                 acct,acct:joe,AUTH_acct,OTHER_acct"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_bfa2f1ab","line":376,"in_reply_to":"1a930d6b_85519110","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        groups.extend(self.users[account_user][\u0027groups\u0027])"},{"line_number":383,"context_line":"        if \u0027.admin\u0027 in groups:"},{"line_number":384,"context_line":"            groups.remove(\u0027.admin\u0027)"},{"line_number":385,"context_line":"            for pre in self.reseller_prefixes:"},{"line_number":386,"context_line":"                groups.append(\u0027%s%s\u0027 % (pre, account))"},{"line_number":387,"context_line":"        groups \u003d \u0027,\u0027.join(groups)"},{"line_number":388,"context_line":"        return groups"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_455169d7","line":385,"updated":"2015-01-22 19:02:56.000000000","message":"nit: if \u0027\u0027 is a reseller prefix then account value will end up repeated","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        groups.extend(self.users[account_user][\u0027groups\u0027])"},{"line_number":383,"context_line":"        if \u0027.admin\u0027 in groups:"},{"line_number":384,"context_line":"            groups.remove(\u0027.admin\u0027)"},{"line_number":385,"context_line":"            for pre in self.reseller_prefixes:"},{"line_number":386,"context_line":"                groups.append(\u0027%s%s\u0027 % (pre, account))"},{"line_number":387,"context_line":"        groups \u003d \u0027,\u0027.join(groups)"},{"line_number":388,"context_line":"        return groups"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_dfa5fdb5","line":385,"in_reply_to":"1a930d6b_455169d7","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            return HTTPNotFound(request\u003dreq)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        if not account or (self._get_account_prefix(account) not in"},{"line_number":503,"context_line":"                           self.reseller_prefixes):"},{"line_number":504,"context_line":"            self.logger.debug(\"Account name: %s doesn\u0027t start with \""},{"line_number":505,"context_line":"                              \"reseller_prefix: %s.\""},{"line_number":506,"context_line":"                              % (account, self.reseller_prefix))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_45c4095f","line":503,"updated":"2015-01-22 19:02:56.000000000","message":"_get_account_prefix() will only return a value in reseller_prefixes or None so can be simpler:\n\n if not account or  self._get_account_prefix(account) is None\n\nin fact, make _set_account_prefix return None if account is None and this will reduce to:\n\n if  self._get_account_prefix(account) is None","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            return HTTPNotFound(request\u003dreq)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        if not account or (self._get_account_prefix(account) not in"},{"line_number":503,"context_line":"                           self.reseller_prefixes):"},{"line_number":504,"context_line":"            self.logger.debug(\"Account name: %s doesn\u0027t start with \""},{"line_number":505,"context_line":"                              \"reseller_prefix: %s.\""},{"line_number":506,"context_line":"                              % (account, self.reseller_prefix))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_a8a8cbdb","line":503,"in_reply_to":"1a930d6b_45c4095f","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":538,"context_line":"                \u0027require_group\u0027)"},{"line_number":539,"context_line":"            if require_group and require_group in user_groups:"},{"line_number":540,"context_line":"                req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":541,"context_line":"                self.logger.debug(\"User %s has admin and require_group.\""},{"line_number":542,"context_line":"                                  \" Authorizing.\" % account_user)"},{"line_number":543,"context_line":"                return None"},{"line_number":544,"context_line":"            elif not require_group:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_40bf97fb","line":541,"updated":"2015-01-22 19:02:56.000000000","message":"might be more useful to have the value of require_group in the debug msg.","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":538,"context_line":"                \u0027require_group\u0027)"},{"line_number":539,"context_line":"            if require_group and require_group in user_groups:"},{"line_number":540,"context_line":"                req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":541,"context_line":"                self.logger.debug(\"User %s has admin and require_group.\""},{"line_number":542,"context_line":"                                  \" Authorizing.\" % account_user)"},{"line_number":543,"context_line":"                return None"},{"line_number":544,"context_line":"            elif not require_group:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_8204fec0","line":541,"in_reply_to":"1a930d6b_40bf97fb","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f89b32b268bde06a42a19f3557282c8dd18dfbb5","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    We allow the reseller prefix to be a list. In tempauth, the first item"},{"line_number":79,"context_line":"    in the list is used as the prefix for tokens and user groups. The"},{"line_number":80,"context_line":"    other prefixes provide alternate accounts that user\u0027s can access. For"},{"line_number":81,"context_line":"    example if the reseller prefix list is \u0027AUTH OTHER\u0027, a user with"},{"line_number":82,"context_line":"    admin access to AUTH_account also has admin access to"},{"line_number":83,"context_line":"    OTHER_account."},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_021cb2c0","line":81,"updated":"2015-02-03 01:56:20.000000000","message":"s/\u0027AUTH OTHER\u0027/\u0027AUTH, OTHER\u0027/","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    We allow the reseller prefix to be a list. In tempauth, the first item"},{"line_number":79,"context_line":"    in the list is used as the prefix for tokens and user groups. The"},{"line_number":80,"context_line":"    other prefixes provide alternate accounts that user\u0027s can access. For"},{"line_number":81,"context_line":"    example if the reseller prefix list is \u0027AUTH OTHER\u0027, a user with"},{"line_number":82,"context_line":"    admin access to AUTH_account also has admin access to"},{"line_number":83,"context_line":"    OTHER_account."},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_365f2574","line":81,"in_reply_to":"da86d52c_021cb2c0","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f89b32b268bde06a42a19f3557282c8dd18dfbb5","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        [filter:tempauth]"},{"line_number":106,"context_line":"        use \u003d egg:swift#tempauth"},{"line_number":107,"context_line":"        reseller_prefix \u003d AUTH SERVICE"},{"line_number":108,"context_line":"        SERVICE_require_group \u003d .service"},{"line_number":109,"context_line":"        user_admin_admin \u003d admin .admin .reseller_admin"},{"line_number":110,"context_line":"        user_joeacct_joe \u003d joepw .admin"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_62848ed4","line":107,"updated":"2015-02-03 01:56:20.000000000","message":"s/AUTH SERVICE/AUTH, SERVICE/","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        [filter:tempauth]"},{"line_number":106,"context_line":"        use \u003d egg:swift#tempauth"},{"line_number":107,"context_line":"        reseller_prefix \u003d AUTH SERVICE"},{"line_number":108,"context_line":"        SERVICE_require_group \u003d .service"},{"line_number":109,"context_line":"        user_admin_admin \u003d admin .admin .reseller_admin"},{"line_number":110,"context_line":"        user_joeacct_joe \u003d joepw .admin"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_7650bd5e","line":107,"in_reply_to":"da86d52c_62848ed4","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":615,"context_line":"                expires, old_groups \u003d cached_auth_data"},{"line_number":616,"context_line":"                old_groups \u003d old_groups.split(\u0027,\u0027)"},{"line_number":617,"context_line":"                new_groups \u003d self._get_user_groups(account, account_user,"},{"line_number":618,"context_line":"                                                   account_id)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"                if expires \u003e time() and \\"},{"line_number":621,"context_line":"                        set(old_groups) \u003d\u003d set(new_groups.split(\u0027,\u0027)):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_f032960e","side":"PARENT","line":618,"updated":"2015-02-19 07:08:12.000000000","message":"maybe it\u0027s not important that we support it anymore, but that account_id jazz seemed to be doing something with the custom url config option that seems to be parsed out of the last value in the tempauth users config lines:\n\n    user_test_tester \u003d testing .admin http://saio:8080/v1/AUTH_monkies\n\nanyway, i\u0027d be happy to discuss getting rid of it, but probably in another change.  For now I get a 403 when I try to stat the account tempauth returns as my storage url with that config and this patch and it works on master.","commit_id":"e4b4e3e065c576ec9e5d5538aab825e8e527d467"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":615,"context_line":"                expires, old_groups \u003d cached_auth_data"},{"line_number":616,"context_line":"                old_groups \u003d old_groups.split(\u0027,\u0027)"},{"line_number":617,"context_line":"                new_groups \u003d self._get_user_groups(account, account_user,"},{"line_number":618,"context_line":"                                                   account_id)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"                if expires \u003e time() and \\"},{"line_number":621,"context_line":"                        set(old_groups) \u003d\u003d set(new_groups.split(\u0027,\u0027)):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_f8a8af8d","side":"PARENT","line":618,"in_reply_to":"da86d52c_f032960e","updated":"2015-02-19 17:57:47.000000000","message":"Thanks. I  missed the point of line 601 -- and since account_id was missing from the docstring in _get_user_accounts(), I thought it was redundant information.\n\nRestored the code and added a unit test.","commit_id":"e4b4e3e065c576ec9e5d5538aab825e8e527d467"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        self.logger \u003d get_logger(conf, log_route\u003d\u0027tempauth\u0027)"},{"line_number":162,"context_line":"        self.log_headers \u003d config_true_value(conf.get(\u0027log_headers\u0027, \u0027f\u0027))"},{"line_number":163,"context_line":"        self.reseller_prefixes, self.account_rules \u003d \\"},{"line_number":164,"context_line":"            config_read_reseller_options(conf, dict(require_group\u003d\u0027\u0027))"},{"line_number":165,"context_line":"        self.reseller_prefix \u003d self.reseller_prefixes[0]"},{"line_number":166,"context_line":"        self.logger.set_statsd_prefix(\u0027tempauth.%s\u0027 % ("},{"line_number":167,"context_line":"            self.reseller_prefix if self.reseller_prefix else \u0027NONE\u0027,))"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_ea4d3e3c","line":164,"updated":"2015-02-19 07:08:12.000000000","message":"man I had no trouble at all messing up this require_group option\n\nis there really no sane default?  Like if i add multiple reseller prefixes, do I really expect all users to be able to access all prefixes by default?\n\nI feel like in my case when I added \u0027service\u0027 to my reseller prefixes and a new user in the service group i sort of somehow expected this new prefix to be restricted - but of course it\u0027s not unless you add the SERVICE_require_group config option too.\n\n... dunno","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        self.logger \u003d get_logger(conf, log_route\u003d\u0027tempauth\u0027)"},{"line_number":162,"context_line":"        self.log_headers \u003d config_true_value(conf.get(\u0027log_headers\u0027, \u0027f\u0027))"},{"line_number":163,"context_line":"        self.reseller_prefixes, self.account_rules \u003d \\"},{"line_number":164,"context_line":"            config_read_reseller_options(conf, dict(require_group\u003d\u0027\u0027))"},{"line_number":165,"context_line":"        self.reseller_prefix \u003d self.reseller_prefixes[0]"},{"line_number":166,"context_line":"        self.logger.set_statsd_prefix(\u0027tempauth.%s\u0027 % ("},{"line_number":167,"context_line":"            self.reseller_prefix if self.reseller_prefix else \u0027NONE\u0027,))"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_b5000202","line":164,"in_reply_to":"da86d52c_ea4d3e3c","updated":"2015-02-19 17:57:47.000000000","message":"Probably the only way to default would be to make the defaults something like the single-process functional tests. ie., change default for reseller_prefix to be \"AUTH_, SERVICE_\"\n\nI thought that was a step to far...but maybe not?","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                self.users[account + \u0027:\u0027 + username] \u003d {"},{"line_number":202,"context_line":"                    \u0027key\u0027: key, \u0027url\u0027: url, \u0027groups\u0027: values}"},{"line_number":203,"context_line":"        register_swift_info(\u0027tempauth\u0027, account_acls\u003dTrue,"},{"line_number":204,"context_line":"                            reseller_prefixes\u003dself.reseller_prefixes)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def __call__(self, env, start_response):"},{"line_number":207,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_70b06643","line":204,"updated":"2015-02-19 07:08:12.000000000","message":"I don\u0027t really *care* about tempauth doing this, but being that tempauth is a reference implementation I think it\u0027s not entirely out of the question to assume that new auth systems will think it\u0027s a good idea to publish all of their reseller_prefixes if they see tempauth doing it.\n\nIs it a good idea?","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            if service_token:"},{"line_number":237,"context_line":"                service_groups \u003d self.get_groups(env, service_token)"},{"line_number":238,"context_line":"                if groups and service_groups:"},{"line_number":239,"context_line":"                    groups +\u003d \u0027,\u0027 + service_groups"},{"line_number":240,"context_line":"            if groups:"},{"line_number":241,"context_line":"                user \u003d groups and groups.split(\u0027,\u0027, 1)[0] or \u0027\u0027"},{"line_number":242,"context_line":"                trans_id \u003d env.get(\u0027swift.trans_id\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_4ab2ca06","line":239,"updated":"2015-02-19 07:08:12.000000000","message":"so the way groups get all squished down as the composite of both tokens means I can pass either:\n\n  * x-auth-token: user_token, x-service-token: service_token\n\nor\n\n  * x-auth-token: service_token, x-service-token: user_token\n\nI guess the point is you\u0027ve got two tokens, not which is which?","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            if service_token:"},{"line_number":237,"context_line":"                service_groups \u003d self.get_groups(env, service_token)"},{"line_number":238,"context_line":"                if groups and service_groups:"},{"line_number":239,"context_line":"                    groups +\u003d \u0027,\u0027 + service_groups"},{"line_number":240,"context_line":"            if groups:"},{"line_number":241,"context_line":"                user \u003d groups and groups.split(\u0027,\u0027, 1)[0] or \u0027\u0027"},{"line_number":242,"context_line":"                trans_id \u003d env.get(\u0027swift.trans_id\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_14339514","line":239,"in_reply_to":"da86d52c_4ab2ca06","updated":"2015-02-19 17:57:47.000000000","message":"This is correct for tempauth.\n\nkeystoneauth and tempauth are different because of different semantics of roles vs groups. In tempauth, \"require_group\" requires a group -- not caring which token granted the group. keystoneauth does care which token granted the roles -- hence the (roughly) equivalent option is called \"service_roles\"","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        return self.app(env, start_response)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def i_am_definitive_auth(self, path):"},{"line_number":289,"context_line":"        \"\"\""},{"line_number":290,"context_line":"        Determine if we are the definitive auth"},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_7096a64d","line":288,"updated":"2015-02-19 07:08:12.000000000","message":"probably the comments in the rather complex code this method was extracted from using the first persion influenced this method name - but I don\u0027t think we need to make this middleware any closer to self aware than it already is by naming methods like this.\n\n    if self._matching_reseller_prefix(path):\n        ...","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        return self.app(env, start_response)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def i_am_definitive_auth(self, path):"},{"line_number":289,"context_line":"        \"\"\""},{"line_number":290,"context_line":"        Determine if we are the definitive auth"},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_cf03240e","line":288,"in_reply_to":"da86d52c_7096a64d","updated":"2015-02-19 17:57:47.000000000","message":"Done -- with slightly different name","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            return False"},{"line_number":306,"context_line":"        if account:"},{"line_number":307,"context_line":"            return self._get_account_prefix(account) not in (\u0027\u0027, None)"},{"line_number":308,"context_line":"        return False"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _get_account_prefix(self, account):"},{"line_number":311,"context_line":"        \"\"\"Get the prefix of an account"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_50b522eb","line":308,"updated":"2015-02-19 07:08:12.000000000","message":"I feel like this wants to just test if the account prefix is self.reseller_prefixes, but I don\u0027t think that\u0027s what it\u0027s doing?  Maybe the negative inclusion in a list of negative values is throwing me...\n\nso the trixy test for either \u0027\u0027 or None is because of the empty reseller prefix - and also to force the return to boolean?  Hrmm...\n\n... and this is the case where we *don\u0027t* want to claim accounts with the empty prefix, even if we ourselves are configured to own the empty prefix?","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            return False"},{"line_number":306,"context_line":"        if account:"},{"line_number":307,"context_line":"            return self._get_account_prefix(account) not in (\u0027\u0027, None)"},{"line_number":308,"context_line":"        return False"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _get_account_prefix(self, account):"},{"line_number":311,"context_line":"        \"\"\"Get the prefix of an account"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_0f453b6e","line":308,"in_reply_to":"da86d52c_50b522eb","updated":"2015-02-19 17:57:47.000000000","message":"I got here by thinking though the different scenarios and reflecting that in code (see draft 8 for a more cludgely version). However, I overlooked that \u0027\u0027 in python means false.. So this:\n\n    return self._get_account_prefix(account) not in (\u0027\u0027, None)\n\ncan become:\n\n    return bool(self._get_account_prefix(account))\n\n\u003e this is the case where we *don\u0027t* want to claim accounts with the empty prefix , even if we ourselves are configured to own the empty prefix?\n\nCorrect.","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        if account is None:"},{"line_number":317,"context_line":"            return None"},{"line_number":318,"context_line":"        # Empty prefix matches everything, so try to match others first"},{"line_number":319,"context_line":"        for prefix in [pre for pre in self.reseller_prefixes if pre !\u003d \u0027\u0027]:"},{"line_number":320,"context_line":"            if account.startswith(prefix):"},{"line_number":321,"context_line":"                return prefix"},{"line_number":322,"context_line":"        if \u0027\u0027 in self.reseller_prefixes:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_3097ce3b","line":319,"updated":"2015-02-19 07:08:12.000000000","message":"so here we filter the empty prefix because all strings startswith(\u0027\u0027) ...\n\ndo we *have* to do the loop?  I think our utility method enforces our non-empty reseller_prefixes all start with \u0027_\u0027 - can we just split account on \u0027_\u0027  and see if it\u0027s a match?","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        if account is None:"},{"line_number":317,"context_line":"            return None"},{"line_number":318,"context_line":"        # Empty prefix matches everything, so try to match others first"},{"line_number":319,"context_line":"        for prefix in [pre for pre in self.reseller_prefixes if pre !\u003d \u0027\u0027]:"},{"line_number":320,"context_line":"            if account.startswith(prefix):"},{"line_number":321,"context_line":"                return prefix"},{"line_number":322,"context_line":"        if \u0027\u0027 in self.reseller_prefixes:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_72c1402e","line":319,"in_reply_to":"da86d52c_3097ce3b","updated":"2015-02-19 17:57:47.000000000","message":"I\u0027ll update the doc string so maybe this will become clearer. The tuple with startswith trick won\u0027t help here since I want to know *which* prefix we\u0027ve found. The reason for checking \u0027\u0027 last is that if reseller_prefix\u003d[\u0027\u0027,\u0027ONE_\u0027,\u0027TWO_\u0027] and account is \u0027ONE_1234\u0027, I want to return \u0027ONE_\u0027 -- not \u0027\u0027 -- even though \u0027ONE_1234\u0027 *does* match the \u0027\u0027 prefix!. However, since \u0027\u0027 is a legal prefix, an account of \u00271234\u0027, would return \u0027\u0027 as the prefix.","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        # Empty prefix matches everything, so try to match others first"},{"line_number":319,"context_line":"        for prefix in [pre for pre in self.reseller_prefixes if pre !\u003d \u0027\u0027]:"},{"line_number":320,"context_line":"            if account.startswith(prefix):"},{"line_number":321,"context_line":"                return prefix"},{"line_number":322,"context_line":"        if \u0027\u0027 in self.reseller_prefixes:"},{"line_number":323,"context_line":"            return \u0027\u0027"},{"line_number":324,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_d064b2b4","line":321,"updated":"2015-02-19 07:08:12.000000000","message":"dig on str.startswith\n\n    Help on method_descriptor in str:\n    \n    str.startswith \u003d startswith(...)\n        S.startswith(prefix[, start[, end]]) -\u003e bool\n        \n        Return True if S starts with the specified prefix, False otherwise.\n        With optional start, test S beginning at that position.\n        With optional end, stop comparing S at that position.\n        **prefix can also be a tuple of strings to try.**\n\nI guess some places this method is used it\u0027s expecting the matching prefix to get returned, so maybe that trick won\u0027t work...","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":320,"context_line":"            if account.startswith(prefix):"},{"line_number":321,"context_line":"                return prefix"},{"line_number":322,"context_line":"        if \u0027\u0027 in self.reseller_prefixes:"},{"line_number":323,"context_line":"            return \u0027\u0027"},{"line_number":324,"context_line":"        return None"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def _dot_account(self, account):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_10bbaac4","line":323,"updated":"2015-02-19 07:08:12.000000000","message":"then here we have to special case it because we oddly *do* want to claim empty account_prefixes if we\u0027ve been configured with an empty reseller_prefix?","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":320,"context_line":"            if account.startswith(prefix):"},{"line_number":321,"context_line":"                return prefix"},{"line_number":322,"context_line":"        if \u0027\u0027 in self.reseller_prefixes:"},{"line_number":323,"context_line":"            return \u0027\u0027"},{"line_number":324,"context_line":"        return None"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def _dot_account(self, account):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_d2082c93","line":323,"in_reply_to":"da86d52c_10bbaac4","updated":"2015-02-19 17:57:47.000000000","message":"See my response above -- but also see the comment in the code about empty matching everything.","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def _dot_account(self, account):"},{"line_number":327,"context_line":"        \"\"\""},{"line_number":328,"context_line":"        Detect if account starts with dot character"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        :param account: account in path (e.g., AUTH_joesaccount)"},{"line_number":331,"context_line":"        :return:True if name starts with dot character"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_d0dd92de","line":328,"updated":"2015-02-19 07:08:12.000000000","message":"+\u003d accounts that start with a dot are reserved for internal swift services\n\n???","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def _dot_account(self, account):"},{"line_number":327,"context_line":"        \"\"\""},{"line_number":328,"context_line":"        Detect if account starts with dot character"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        :param account: account in path (e.g., AUTH_joesaccount)"},{"line_number":331,"context_line":"        :return:True if name starts with dot character"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_f209b084","line":328,"in_reply_to":"da86d52c_d0dd92de","updated":"2015-02-19 17:57:47.000000000","message":"I\u0027ll update the comment\n\nI didn\u0027t work out why dot accounts need something special -- see line 398 in original. I simply preserved the logic.","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":349,"context_line":"        if \u0027.admin\u0027 in groups:"},{"line_number":350,"context_line":"            groups.remove(\u0027.admin\u0027)"},{"line_number":351,"context_line":"            for pre in [pre for pre in self.reseller_prefixes if pre !\u003d \u0027\u0027]:"},{"line_number":352,"context_line":"                groups.append(\u0027%s%s\u0027 % (pre, account))"},{"line_number":353,"context_line":"        groups \u003d \u0027,\u0027.join(groups)"},{"line_number":354,"context_line":"        return groups"},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_d0bcb2b7","line":352,"updated":"2015-02-19 07:08:12.000000000","message":"do we *ever* iter reseller_prefixes w/o stripping the empty prefix?  I think maybe a helper method is in order:\n\n    def iter_prefixes(self):\n        return iter([...])","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":349,"context_line":"        if \u0027.admin\u0027 in groups:"},{"line_number":350,"context_line":"            groups.remove(\u0027.admin\u0027)"},{"line_number":351,"context_line":"            for pre in [pre for pre in self.reseller_prefixes if pre !\u003d \u0027\u0027]:"},{"line_number":352,"context_line":"                groups.append(\u0027%s%s\u0027 % (pre, account))"},{"line_number":353,"context_line":"        groups \u003d \u0027,\u0027.join(groups)"},{"line_number":354,"context_line":"        return groups"},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_d52f36f4","line":352,"in_reply_to":"da86d52c_d0bcb2b7","updated":"2015-02-19 17:57:47.000000000","message":"Done","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1d68e9c669f788f55b42a139fe9471b748e59bcc","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        Detect if account starts with dot character"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        Accounts that start with a dot are reserved for internal"},{"line_number":338,"context_line":"        swift services"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        :param account: account in path (e.g., AUTH_joesaccount)"},{"line_number":341,"context_line":"        :return:True if name starts with dot character"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba7be1f8_9948435d","line":338,"updated":"2015-02-20 18:58:47.000000000","message":"So, unrelated to this patch, but seems reseller_admin cannot get you access to a . account but an operator role would. And I don\u0027t see anything equivalent in keystoneauth?","commit_id":"bd4d4654e600972b00b055fad6ae1a658b8bb598"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"e683b5ed2ce0ff688efdd61355fb2296b26ada06","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        Detect if account starts with dot character"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        Accounts that start with a dot are reserved for internal"},{"line_number":338,"context_line":"        swift services"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        :param account: account in path (e.g., AUTH_joesaccount)"},{"line_number":341,"context_line":"        :return:True if name starts with dot character"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba7be1f8_ac0d9639","line":338,"in_reply_to":"ba7be1f8_9948435d","updated":"2015-02-23 15:53:03.000000000","message":"On re-read, I realise that this is NOT checking for something such as /v1/.foo, but instead checks for /v1/AUTH_.foo\n\nThat\u0027s not what internal swift services use (e.g., .expiring_objects).\n\nIf you look at the original code (line 388 in original), it also checks for /v1/AUTH_/c/o (i.e., just the prefix).\n\nSo, I\u0027m not sure why tempauth tests for these -- some legacy feature or something in a private deployment? However, I\u0027ve not broken that logic.","commit_id":"bd4d4654e600972b00b055fad6ae1a658b8bb598"}],"swift/common/utils.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0a46a65e99c9b7aa5d36864589e3b810e0c39fd2","unresolved":false,"context_lines":[{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    :param conf: the configuration"},{"line_number":304,"context_line":"    :param defaults: a dict of default values. The key is the option"},{"line_number":305,"context_line":"                     name. The value if either an array of string or a string"},{"line_number":306,"context_line":"    :return: tuple of an array of reseller prefixes and a dict of option values"},{"line_number":307,"context_line":"    \"\"\""},{"line_number":308,"context_line":"    reseller_prefix_opt \u003d conf.get(\u0027reseller_prefix\u0027, \u0027AUTH\u0027).split(\u0027,\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_4db6f7da","line":305,"updated":"2015-02-02 18:21:15.000000000","message":"nit: s/if/is/","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    :param conf: the configuration"},{"line_number":304,"context_line":"    :param defaults: a dict of default values. The key is the option"},{"line_number":305,"context_line":"                     name. The value if either an array of string or a string"},{"line_number":306,"context_line":"    :return: tuple of an array of reseller prefixes and a dict of option values"},{"line_number":307,"context_line":"    \"\"\""},{"line_number":308,"context_line":"    reseller_prefix_opt \u003d conf.get(\u0027reseller_prefix\u0027, \u0027AUTH\u0027).split(\u0027,\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_568ad9bf","line":305,"in_reply_to":"da86d52c_4db6f7da","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0a46a65e99c9b7aa5d36864589e3b810e0c39fd2","unresolved":false,"context_lines":[{"line_number":340,"context_line":"    :return: a dict containing the options"},{"line_number":341,"context_line":"    \"\"\""},{"line_number":342,"context_line":"    params \u003d {}"},{"line_number":343,"context_line":"    for option_name in defaults.keys():"},{"line_number":344,"context_line":"        value \u003d conf.get(\u0027%s%s\u0027 % (prefix_name, option_name))"},{"line_number":345,"context_line":"        if value:"},{"line_number":346,"context_line":"            if isinstance(defaults.get(option_name), list):"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_9c03c2b7","line":343,"updated":"2015-02-02 18:21:15.000000000","message":"neat","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"}],"test/functional/__init__.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":650,"context_line":"            template_vars \u003d {\u0027storage_url\u0027: url[url_account]}"},{"line_number":651,"context_line":"            parsed_result \u003d urlparse(resource % template_vars)"},{"line_number":652,"context_line":"            if service_user:"},{"line_number":653,"context_line":"                try:"},{"line_number":654,"context_line":"                    dummy, service_token \u003d \\"},{"line_number":655,"context_line":"                        get_auth(swift_test_auth,"},{"line_number":656,"context_line":"                                 swift_test_user[service_user],"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_8a03830f","line":653,"updated":"2015-01-12 12:40:41.000000000","message":"we should cache the service token like other tokens are : maybe refactor lines 635-642 into a re-usable get_cached_token(account_index) and call that at line 654","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"27424dc70473df1068c87b9e99fe28b0fa6076de","unresolved":false,"context_lines":[{"line_number":650,"context_line":"            template_vars \u003d {\u0027storage_url\u0027: url[url_account]}"},{"line_number":651,"context_line":"            parsed_result \u003d urlparse(resource % template_vars)"},{"line_number":652,"context_line":"            if service_user:"},{"line_number":653,"context_line":"                try:"},{"line_number":654,"context_line":"                    dummy, service_token \u003d \\"},{"line_number":655,"context_line":"                        get_auth(swift_test_auth,"},{"line_number":656,"context_line":"                                 swift_test_user[service_user],"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_b655fa1f","line":653,"in_reply_to":"3a961159_8a03830f","updated":"2015-01-12 17:53:40.000000000","message":"I\u0027ll look into it. By not caching, it saved me having to also update lines 671 and 673 (and maybe elsewhere)","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":650,"context_line":"            template_vars \u003d {\u0027storage_url\u0027: url[url_account]}"},{"line_number":651,"context_line":"            parsed_result \u003d urlparse(resource % template_vars)"},{"line_number":652,"context_line":"            if service_user:"},{"line_number":653,"context_line":"                try:"},{"line_number":654,"context_line":"                    dummy, service_token \u003d \\"},{"line_number":655,"context_line":"                        get_auth(swift_test_auth,"},{"line_number":656,"context_line":"                                 swift_test_user[service_user],"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_0c256109","line":653,"in_reply_to":"3a961159_b655fa1f","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        \u0027client_timeout\u0027: \u00274\u0027,"},{"line_number":190,"context_line":"        \u0027allow_account_management\u0027: \u0027true\u0027,"},{"line_number":191,"context_line":"        \u0027account_autocreate\u0027: \u0027true\u0027,"},{"line_number":192,"context_line":"        \u0027allow_versions\u0027: \u0027True\u0027,"},{"line_number":193,"context_line":"        \u0027log_level\u0027: \u0027DEBUG\u0027,"},{"line_number":194,"context_line":"        # Below are values used by the functional test framework, as well as"},{"line_number":195,"context_line":"        # by the various in-process swift servers"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_029bae67","line":192,"updated":"2015-01-27 12:53:19.000000000","message":"Left over from debugging. Now removed","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"076509d57b0799fdf82f791f8ae148249eb8c34a","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        \u0027username5\u0027: \u0027tester5\u0027,"},{"line_number":215,"context_line":"        \u0027password5\u0027: \u0027testing5\u0027,"},{"line_number":216,"context_line":"        \u0027service_prefix\u0027: \u0027SERVICE\u0027,"},{"line_number":217,"context_line":"        # For tempauth middleware"},{"line_number":218,"context_line":"        \u0027reseller_prefix\u0027: \u0027AUTH  SERVICE\u0027,"},{"line_number":219,"context_line":"        \u0027SERVICE_require_group\u0027: \u0027.service\u0027,"},{"line_number":220,"context_line":"        \u0027user_admin_admin\u0027: \u0027admin .admin .reseller_admin\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_1a6f98fe","line":217,"updated":"2015-01-23 12:23:54.000000000","message":"IF this is in the proxy-server.conf.sample then it does not need to be repeated here - applies to the existing tempauth config here. See comment over in proxy-server.conf.sample","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        \u0027username5\u0027: \u0027tester5\u0027,"},{"line_number":215,"context_line":"        \u0027password5\u0027: \u0027testing5\u0027,"},{"line_number":216,"context_line":"        \u0027service_prefix\u0027: \u0027SERVICE\u0027,"},{"line_number":217,"context_line":"        # For tempauth middleware"},{"line_number":218,"context_line":"        \u0027reseller_prefix\u0027: \u0027AUTH  SERVICE\u0027,"},{"line_number":219,"context_line":"        \u0027SERVICE_require_group\u0027: \u0027.service\u0027,"},{"line_number":220,"context_line":"        \u0027user_admin_admin\u0027: \u0027admin .admin .reseller_admin\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_2edc11e4","line":217,"in_reply_to":"1a930d6b_1a6f98fe","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"076509d57b0799fdf82f791f8ae148249eb8c34a","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        \u0027service_prefix\u0027: \u0027SERVICE\u0027,"},{"line_number":217,"context_line":"        # For tempauth middleware"},{"line_number":218,"context_line":"        \u0027reseller_prefix\u0027: \u0027AUTH  SERVICE\u0027,"},{"line_number":219,"context_line":"        \u0027SERVICE_require_group\u0027: \u0027.service\u0027,"},{"line_number":220,"context_line":"        \u0027user_admin_admin\u0027: \u0027admin .admin .reseller_admin\u0027,"},{"line_number":221,"context_line":"        \u0027user_test_tester\u0027: \u0027testing .admin\u0027,"},{"line_number":222,"context_line":"        \u0027user_test2_tester2\u0027: \u0027testing2 .admin\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_30f8fde4","line":219,"updated":"2015-01-23 12:23:54.000000000","message":"nit: in the docs I think you have removed the \u0027.\u0027 from \u0027.service\u0027 in the examples, so could also remove it here, in case someone infers something special about the \u0027.\u0027","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        \u0027service_prefix\u0027: \u0027SERVICE\u0027,"},{"line_number":217,"context_line":"        # For tempauth middleware"},{"line_number":218,"context_line":"        \u0027reseller_prefix\u0027: \u0027AUTH  SERVICE\u0027,"},{"line_number":219,"context_line":"        \u0027SERVICE_require_group\u0027: \u0027.service\u0027,"},{"line_number":220,"context_line":"        \u0027user_admin_admin\u0027: \u0027admin .admin .reseller_admin\u0027,"},{"line_number":221,"context_line":"        \u0027user_test_tester\u0027: \u0027testing .admin\u0027,"},{"line_number":222,"context_line":"        \u0027user_test2_tester2\u0027: \u0027testing2 .admin\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_627392e7","line":219,"in_reply_to":"1a930d6b_30f8fde4","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0a46a65e99c9b7aa5d36864589e3b810e0c39fd2","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":""},{"line_number":600,"context_line":"def get_url_token(user_index, os_options):"},{"line_number":601,"context_line":"    authargs \u003d dict(net\u003dFalse,"},{"line_number":602,"context_line":"                    tenant_name\u003dswift_test_tenant[user_index],"},{"line_number":603,"context_line":"                    auth_version\u003dswift_test_auth_version,"},{"line_number":604,"context_line":"                    os_options\u003dos_options)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_f7469020","line":601,"updated":"2015-02-02 18:21:15.000000000","message":"probably moot now but s/net/snet","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":""},{"line_number":600,"context_line":"def get_url_token(user_index, os_options):"},{"line_number":601,"context_line":"    authargs \u003d dict(net\u003dFalse,"},{"line_number":602,"context_line":"                    tenant_name\u003dswift_test_tenant[user_index],"},{"line_number":603,"context_line":"                    auth_version\u003dswift_test_auth_version,"},{"line_number":604,"context_line":"                    os_options\u003dos_options)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_1614e14c","line":601,"in_reply_to":"da86d52c_f7469020","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0a46a65e99c9b7aa5d36864589e3b810e0c39fd2","unresolved":false,"context_lines":[{"line_number":602,"context_line":"                    tenant_name\u003dswift_test_tenant[user_index],"},{"line_number":603,"context_line":"                    auth_version\u003dswift_test_auth_version,"},{"line_number":604,"context_line":"                    os_options\u003dos_options)"},{"line_number":605,"context_line":"    if has_insecure:"},{"line_number":606,"context_line":"        authargs.update(dict(insecure\u003dinsecure))"},{"line_number":607,"context_line":"    return get_auth(swift_test_auth,"},{"line_number":608,"context_line":"                    swift_test_user[user_index],"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_b745f818","line":605,"updated":"2015-02-02 18:21:15.000000000","message":"see comment in swift_test_client.py - don\u0027t think this conditional passing of insecure is necessary","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":602,"context_line":"                    tenant_name\u003dswift_test_tenant[user_index],"},{"line_number":603,"context_line":"                    auth_version\u003dswift_test_auth_version,"},{"line_number":604,"context_line":"                    os_options\u003dos_options)"},{"line_number":605,"context_line":"    if has_insecure:"},{"line_number":606,"context_line":"        authargs.update(dict(insecure\u003dinsecure))"},{"line_number":607,"context_line":"    return get_auth(swift_test_auth,"},{"line_number":608,"context_line":"                    swift_test_user[user_index],"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_790fce2e","line":605,"in_reply_to":"da86d52c_b745f818","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0a46a65e99c9b7aa5d36864589e3b810e0c39fd2","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                                                             os_options)"},{"line_number":658,"context_line":"                    kwargs[\u0027service_token\u0027] \u003d service_token"},{"line_number":659,"context_line":"                except ClientException:"},{"line_number":660,"context_line":"                    raise AuthError"},{"line_number":661,"context_line":"            return func(url[url_account], token[use_account],"},{"line_number":662,"context_line":"                        parsed_result, conn[url_account],"},{"line_number":663,"context_line":"                        *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_f7ccd063","line":660,"updated":"2015-02-02 18:21:15.000000000","message":"i may be wrong but I *think* the intent is that AuthError gets raised by check_response i.e. when the func being retried fails due to bad (probably cached) auth token, in which case AuthError gets caught below and we make another retry with fresh credentials.\n\nClientException here indicates that auth has failed i.e. bad credentials, and retry is unlikely to fix that, so shouldn\u0027t we bomb out immediately (as would happen for the get_url_token(user_account...) above.","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                                                             os_options)"},{"line_number":658,"context_line":"                    kwargs[\u0027service_token\u0027] \u003d service_token"},{"line_number":659,"context_line":"                except ClientException:"},{"line_number":660,"context_line":"                    raise AuthError"},{"line_number":661,"context_line":"            return func(url[url_account], token[use_account],"},{"line_number":662,"context_line":"                        parsed_result, conn[url_account],"},{"line_number":663,"context_line":"                        *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_109e77b9","line":660,"in_reply_to":"da86d52c_f7ccd063","updated":"2015-02-06 08:56:33.000000000","message":"So ClientException is also raised if e.g., Keystone glitched and responded with e500. I had wanted to retry. However, I\u0027ve just noticed that the AuthError handler does not increment attempts! The original code, calling get_auth() for the normal token, would bomb out by NOT catching the ClientException,,,so I\u0027ll revert that logic.","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7f8e69bd95ed7baa8c824f0903f18d22e1aebad4","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                if swift_test_service_prefix[-1] !\u003d \u0027_\u0027:"},{"line_number":506,"context_line":"                    swift_test_service_prefix +\u003d \u0027_\u0027"},{"line_number":507,"context_line":"            else:"},{"line_number":508,"context_line":"                swift_test_service_prefix \u003d None"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"            for _ in range(5):"},{"line_number":511,"context_line":"                swift_test_perm[_] \u003d swift_test_tenant[_] + \u0027:\u0027 \\"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_1bd74b4c","line":508,"updated":"2015-02-05 15:24:47.000000000","message":"nit: lines 503-508 could be moved up to line 439 and lines 474-479 deleted, the service_prefix config loading is common to both auth versions.","commit_id":"ec90dcc78430f67118866627d5a9847288963536"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"beadb13adad648e6c9e270dd81446f7a00784075","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                if swift_test_service_prefix[-1] !\u003d \u0027_\u0027:"},{"line_number":506,"context_line":"                    swift_test_service_prefix +\u003d \u0027_\u0027"},{"line_number":507,"context_line":"            else:"},{"line_number":508,"context_line":"                swift_test_service_prefix \u003d None"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"            for _ in range(5):"},{"line_number":511,"context_line":"                swift_test_perm[_] \u003d swift_test_tenant[_] + \u0027:\u0027 \\"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_ffbcf507","line":508,"in_reply_to":"da86d52c_1bd74b4c","updated":"2015-02-06 17:37:53.000000000","message":"Done","commit_id":"ec90dcc78430f67118866627d5a9847288963536"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"beadb13adad648e6c9e270dd81446f7a00784075","unresolved":false,"context_lines":[{"line_number":624,"context_line":""},{"line_number":625,"context_line":"    # use account #1 by default; turn user\u0027s 1-indexed account into 0-indexed"},{"line_number":626,"context_line":"    use_account \u003d kwargs.pop(\u0027use_account\u0027, 1) - 1"},{"line_number":627,"context_line":"    service_user \u003d kwargs.pop(\u0027service_user\u0027, None)"},{"line_number":628,"context_line":"    service_token \u003d None"},{"line_number":629,"context_line":"    if service_user:"},{"line_number":630,"context_line":"        service_user -\u003d 1  # 0-index"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_4af4585a","line":627,"updated":"2015-02-06 17:37:53.000000000","message":"The service token is cached here...but only inside the retry loop. This should be service_token[\u003cused-index\u003e]. Worth fixing -- there is a noticeable speedup when correctly cached","commit_id":"ec90dcc78430f67118866627d5a9847288963536"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8e4e0edf2389067711c515e1299aa4155a905d20","unresolved":false,"context_lines":[{"line_number":579,"context_line":""},{"line_number":580,"context_line":"url \u003d [None, None, None, None, None]"},{"line_number":581,"context_line":"token \u003d [None, None, None, None, None]"},{"line_number":582,"context_line":"service_token \u003d [None, None, None, None, None]"},{"line_number":583,"context_line":"parsed \u003d [None, None, None, None, None]"},{"line_number":584,"context_line":"conn \u003d [None, None, None, None, None]"},{"line_number":585,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_3fbe3165","line":582,"updated":"2015-02-16 19:10:06.000000000","message":"+1 i noticed the keystone func tests running slower than the tempauth ones - was going to suggest this caching as a follow-on so great to have it done already.","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"757db2dce2f7895a7bd2c85aed9f67ec548d8312","unresolved":false,"context_lines":[{"line_number":579,"context_line":""},{"line_number":580,"context_line":"url \u003d [None, None, None, None, None]"},{"line_number":581,"context_line":"token \u003d [None, None, None, None, None]"},{"line_number":582,"context_line":"service_token \u003d [None, None, None, None, None]"},{"line_number":583,"context_line":"parsed \u003d [None, None, None, None, None]"},{"line_number":584,"context_line":"conn \u003d [None, None, None, None, None]"},{"line_number":585,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_4512190a","line":582,"in_reply_to":"da86d52c_3fbe3165","updated":"2015-02-17 11:04:06.000000000","message":"Yes-- it had a noticeable effect on run time.","commit_id":"c92acdefab064cdd895c02603144bcc73f79721c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":88,"context_line":"swift_test_perm \u003d [\u0027\u0027, \u0027\u0027, \u0027\u0027, \u0027\u0027, \u0027\u0027]"},{"line_number":89,"context_line":"swift_test_domain \u003d [\u0027\u0027, \u0027\u0027, \u0027\u0027, \u0027\u0027, \u0027\u0027]"},{"line_number":90,"context_line":"swift_test_user_id \u003d [\u0027\u0027, \u0027\u0027, \u0027\u0027, \u0027\u0027, \u0027\u0027]"},{"line_number":91,"context_line":"swift_test_tenant_id \u003d [\u0027\u0027, \u0027\u0027, \u0027\u0027, \u0027\u0027, \u0027\u0027]"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"skip, skip2, skip3, skip_service_tokens \u003d False, False, False, False"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_101d6a73","line":91,"updated":"2015-02-19 07:08:12.000000000","message":"oh ok, so everytime we add a new test user we just tack a item on this list... maybe...","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        # User on same account as first, but without admin access"},{"line_number":208,"context_line":"        \u0027username3\u0027: \u0027tester3\u0027,"},{"line_number":209,"context_line":"        \u0027password3\u0027: \u0027testing3\u0027,"},{"line_number":210,"context_line":"        # Service user and prefix (emulates glance, cinder, etc. user)"},{"line_number":211,"context_line":"        \u0027account5\u0027: \u0027svcacct\u0027,"},{"line_number":212,"context_line":"        \u0027username5\u0027: \u0027tester5\u0027,"},{"line_number":213,"context_line":"        \u0027password5\u0027: \u0027testing5\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_c3792e83","line":210,"updated":"2015-02-19 17:57:47.000000000","message":"Ok - changing \"svcacct\" to \"service\"","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        if \u0027service_prefix\u0027 in config:"},{"line_number":441,"context_line":"                swift_test_service_prefix \u003d config[\u0027service_prefix\u0027]"},{"line_number":442,"context_line":"                if swift_test_service_prefix[-1] !\u003d \u0027_\u0027:"},{"line_number":443,"context_line":"                    swift_test_service_prefix +\u003d \u0027_\u0027"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"        if swift_test_auth_version \u003d\u003d \"1\":"},{"line_number":446,"context_line":"            swift_test_auth +\u003d \u0027v1.0\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_b02c9ead","line":443,"updated":"2015-02-19 07:08:12.000000000","message":"now these two lines should definitely be a utils method - we do this \"make sure the string ends in _\" all over the place :)","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        if \u0027service_prefix\u0027 in config:"},{"line_number":441,"context_line":"                swift_test_service_prefix \u003d config[\u0027service_prefix\u0027]"},{"line_number":442,"context_line":"                if swift_test_service_prefix[-1] !\u003d \u0027_\u0027:"},{"line_number":443,"context_line":"                    swift_test_service_prefix +\u003d \u0027_\u0027"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"        if swift_test_auth_version \u003d\u003d \"1\":"},{"line_number":446,"context_line":"            swift_test_auth +\u003d \u0027v1.0\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_c7b77fd6","line":443,"in_reply_to":"da86d52c_b02c9ead","updated":"2015-02-19 17:57:47.000000000","message":"Er, actually only in two places -- here and in utils. However, done since it keeps that logic in one place","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":641,"context_line":"            resource \u003d kwargs.pop(\u0027resource\u0027, \u0027%(storage_url)s\u0027)"},{"line_number":642,"context_line":"            template_vars \u003d {\u0027storage_url\u0027: url[url_account]}"},{"line_number":643,"context_line":"            parsed_result \u003d urlparse(resource % template_vars)"},{"line_number":644,"context_line":"            if service_user:"},{"line_number":645,"context_line":"                if not service_token[service_user]:"},{"line_number":646,"context_line":"                    dummy, service_token[service_user] \u003d get_url_token("},{"line_number":647,"context_line":"                        service_user, os_options)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_db88536d","line":644,"updated":"2015-02-19 07:08:12.000000000","message":"ok, so this just let\u0027s the test add a zero-indexed test user\u0027s token as the service_token kwarg\n\nCan I tell this retry function to provide the 1st test user\u0027s token as the service_token kwarg to my wrapped func?\n\nhint:\n\n    service_user -\u003d 1  # 0-index","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":645,"context_line":"                if not service_token[service_user]:"},{"line_number":646,"context_line":"                    dummy, service_token[service_user] \u003d get_url_token("},{"line_number":647,"context_line":"                        service_user, os_options)"},{"line_number":648,"context_line":"                kwargs[\u0027service_token\u0027] \u003d service_token[service_user]"},{"line_number":649,"context_line":"            return func(url[url_account], token[use_account],"},{"line_number":650,"context_line":"                        parsed_result, conn[url_account],"},{"line_number":651,"context_line":"                        *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_5bb543eb","line":648,"updated":"2015-02-19 07:08:12.000000000","message":"ok, so retry will only get a service_user token and pass it to the wrapped func when called with the service_user kwarg.","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1d68e9c669f788f55b42a139fe9471b748e59bcc","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            resource \u003d kwargs.pop(\u0027resource\u0027, \u0027%(storage_url)s\u0027)"},{"line_number":640,"context_line":"            template_vars \u003d {\u0027storage_url\u0027: url[url_account]}"},{"line_number":641,"context_line":"            parsed_result \u003d urlparse(resource % template_vars)"},{"line_number":642,"context_line":"            if service_user is not None:  # (not None: zero is legal value)"},{"line_number":643,"context_line":"                if not service_token[service_user]:"},{"line_number":644,"context_line":"                    dummy, service_token[service_user] \u003d get_url_token("},{"line_number":645,"context_line":"                        service_user, os_options)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba7be1f8_38d115fc","line":642,"updated":"2015-02-20 18:58:47.000000000","message":"or \n\n if service_user \u003e\u003d 0 # None \u003c 0\n\nbut nobody has checked use_account \u003e\u003d 0","commit_id":"bd4d4654e600972b00b055fad6ae1a658b8bb598"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"83bb5b8dba564bb29ef0233e7da626834bde76cf","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            resource \u003d kwargs.pop(\u0027resource\u0027, \u0027%(storage_url)s\u0027)"},{"line_number":640,"context_line":"            template_vars \u003d {\u0027storage_url\u0027: url[url_account]}"},{"line_number":641,"context_line":"            parsed_result \u003d urlparse(resource % template_vars)"},{"line_number":642,"context_line":"            if service_user is not None:  # (not None: zero is legal value)"},{"line_number":643,"context_line":"                if not service_token[service_user]:"},{"line_number":644,"context_line":"                    dummy, service_token[service_user] \u003d get_url_token("},{"line_number":645,"context_line":"                        service_user, os_options)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba7be1f8_d10344b6","line":642,"in_reply_to":"ba7be1f8_38d115fc","updated":"2015-02-23 14:52:11.000000000","message":"I\u0027ll change to\n\n    if isinstance(service_user, int):\n\n...less likely someone will refactor","commit_id":"bd4d4654e600972b00b055fad6ae1a658b8bb598"}],"test/functional/swift_test_client.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0a46a65e99c9b7aa5d36864589e3b810e0c39fd2","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        self.insecure \u003d False"},{"line_number":125,"context_line":"        if \u0027insecure\u0027 in config:"},{"line_number":126,"context_line":"            self.insecure \u003d config[\u0027insecure\u0027].lower() in (\u0027on\u0027, \u0027true\u0027,"},{"line_number":127,"context_line":"                                                           \u0027yes\u0027, \u00271\u0027)"},{"line_number":128,"context_line":"        self.auth_prefix \u003d config.get(\u0027auth_prefix\u0027, \u0027/\u0027)"},{"line_number":129,"context_line":"        self.auth_version \u003d str(config.get(\u0027auth_version\u0027, \u00271\u0027))"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_17916499","line":127,"updated":"2015-02-02 18:21:15.000000000","message":"consider using swift.common.utils.config_true_value","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f89b32b268bde06a42a19f3557282c8dd18dfbb5","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        self.insecure \u003d False"},{"line_number":125,"context_line":"        if \u0027insecure\u0027 in config:"},{"line_number":126,"context_line":"            self.insecure \u003d config[\u0027insecure\u0027].lower() in (\u0027on\u0027, \u0027true\u0027,"},{"line_number":127,"context_line":"                                                           \u0027yes\u0027, \u00271\u0027)"},{"line_number":128,"context_line":"        self.auth_prefix \u003d config.get(\u0027auth_prefix\u0027, \u0027/\u0027)"},{"line_number":129,"context_line":"        self.auth_version \u003d str(config.get(\u0027auth_version\u0027, \u00271\u0027))"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_65101802","line":127,"in_reply_to":"da86d52c_17916499","updated":"2015-02-03 01:56:20.000000000","message":"+1","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        self.insecure \u003d False"},{"line_number":125,"context_line":"        if \u0027insecure\u0027 in config:"},{"line_number":126,"context_line":"            self.insecure \u003d config[\u0027insecure\u0027].lower() in (\u0027on\u0027, \u0027true\u0027,"},{"line_number":127,"context_line":"                                                           \u0027yes\u0027, \u00271\u0027)"},{"line_number":128,"context_line":"        self.auth_prefix \u003d config.get(\u0027auth_prefix\u0027, \u0027/\u0027)"},{"line_number":129,"context_line":"        self.auth_version \u003d str(config.get(\u0027auth_version\u0027, \u00271\u0027))"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_107cb7eb","line":127,"in_reply_to":"da86d52c_17916499","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0a46a65e99c9b7aa5d36864589e3b810e0c39fd2","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        authargs \u003d dict(snet\u003dFalse, tenant_name\u003dself.account,"},{"line_number":167,"context_line":"                        auth_version\u003dself.auth_version, os_options\u003d{})"},{"line_number":168,"context_line":"        if has_insecure:"},{"line_number":169,"context_line":"            authargs.update(dict(insecure\u003dself.insecure))"},{"line_number":170,"context_line":"        (storage_url, storage_token) \u003d get_auth("},{"line_number":171,"context_line":"            auth_url, auth_user, self.password, **authargs)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_d768acbc","line":168,"updated":"2015-02-02 18:21:15.000000000","message":"I don\u0027t think you need to make the inclusion of insecure kwarg conditional when calling get_auth since it takes a **kwargs arg (unlike where its done for calling http_connection which may or may not have an \u0027insecure\u0027 named arg depending on swiftclient version)","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        authargs \u003d dict(snet\u003dFalse, tenant_name\u003dself.account,"},{"line_number":167,"context_line":"                        auth_version\u003dself.auth_version, os_options\u003d{})"},{"line_number":168,"context_line":"        if has_insecure:"},{"line_number":169,"context_line":"            authargs.update(dict(insecure\u003dself.insecure))"},{"line_number":170,"context_line":"        (storage_url, storage_token) \u003d get_auth("},{"line_number":171,"context_line":"            auth_url, auth_user, self.password, **authargs)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_3081bbc4","line":168,"in_reply_to":"da86d52c_d768acbc","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.auth_host \u003d config[\u0027auth_host\u0027]"},{"line_number":113,"context_line":"        self.auth_port \u003d int(config[\u0027auth_port\u0027])"},{"line_number":114,"context_line":"        self.auth_ssl \u003d config[\u0027auth_ssl\u0027] in (\u0027on\u0027, \u0027true\u0027, \u0027yes\u0027, \u00271\u0027)"},{"line_number":115,"context_line":"        self.insecure \u003d config_true_value(config.get(\u0027insecure\u0027, \u0027false\u0027))"},{"line_number":116,"context_line":"        self.auth_prefix \u003d config.get(\u0027auth_prefix\u0027, \u0027/\u0027)"},{"line_number":117,"context_line":"        self.auth_version \u003d str(config.get(\u0027auth_version\u0027, \u00271\u0027))"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_7bc5a78c","line":115,"updated":"2015-02-19 07:08:12.000000000","message":"seems like a reasonable addition, thanks!","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"}],"test/functional/tests.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":2800,"context_line":""},{"line_number":2801,"context_line":"    def setUp(self):"},{"line_number":2802,"context_line":"        self.conn \u003d Connection(tf.config)"},{"line_number":2803,"context_line":"        self.conn.authenticate()"},{"line_number":2804,"context_line":""},{"line_number":2805,"context_line":"        self.account_prefixes \u003d []"},{"line_number":2806,"context_line":"        if (\u0027keystoneauth\u0027 in cluster_info and \u0027reseller_prefixes\u0027 in"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_85e2949e","line":2803,"updated":"2015-01-12 12:40:41.000000000","message":"self.conn is not used?","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":2815,"context_line":"    def _service_account(self, path):"},{"line_number":2816,"context_line":"        parts \u003d path.split(\u0027/\u0027, 3)"},{"line_number":2817,"context_line":"        account \u003d parts[2]"},{"line_number":2818,"context_line":"        prefix \u003d self.account_prefixes[0]"},{"line_number":2819,"context_line":"        if account.startswith(prefix):"},{"line_number":2820,"context_line":"            project_id \u003d account[len(prefix):]"},{"line_number":2821,"context_line":"            parts[2] \u003d \u0027%s%s\u0027 % (self.account_prefixes[1], project_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_5a3166ec","line":2818,"updated":"2015-01-12 12:40:41.000000000","message":"I\u0027m not sure it is safe to assume that the user prefix is first in list and service prefix is second.\n\nHmmm, one idea might be for the info dict to separate reported prefixes into a \u0027user\u0027 and \u0027service\u0027 list.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8857d527c73cbc992bf25e16ff12c97a47999a00","unresolved":false,"context_lines":[{"line_number":2815,"context_line":"    def _service_account(self, path):"},{"line_number":2816,"context_line":"        parts \u003d path.split(\u0027/\u0027, 3)"},{"line_number":2817,"context_line":"        account \u003d parts[2]"},{"line_number":2818,"context_line":"        prefix \u003d self.account_prefixes[0]"},{"line_number":2819,"context_line":"        if account.startswith(prefix):"},{"line_number":2820,"context_line":"            project_id \u003d account[len(prefix):]"},{"line_number":2821,"context_line":"            parts[2] \u003d \u0027%s%s\u0027 % (self.account_prefixes[1], project_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_fa23ce03","line":2818,"in_reply_to":"3a961159_51a860db","updated":"2015-01-13 10:30:22.000000000","message":"hmm, there\u0027s (a) does the non-service prefix have to be first in config list? but possibly harder is (b) is the order of the prefix list loaded from config guaranteed to be preserved when serialized via json? I need to go and read json docs...\n\nA workaround would be to include the service prefix in test.conf along with the account5 parameters - that is equivalent to a service needing to be configured with the prefix, since it is not returned from keystone.\n\nThen as discussed below, let the tests proceed and if that service prefix is not available in the test cluster then the service token tests will fail, but that is because the tester has made a false assertion about the test cluster.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"27424dc70473df1068c87b9e99fe28b0fa6076de","unresolved":false,"context_lines":[{"line_number":2815,"context_line":"    def _service_account(self, path):"},{"line_number":2816,"context_line":"        parts \u003d path.split(\u0027/\u0027, 3)"},{"line_number":2817,"context_line":"        account \u003d parts[2]"},{"line_number":2818,"context_line":"        prefix \u003d self.account_prefixes[0]"},{"line_number":2819,"context_line":"        if account.startswith(prefix):"},{"line_number":2820,"context_line":"            project_id \u003d account[len(prefix):]"},{"line_number":2821,"context_line":"            parts[2] \u003d \u0027%s%s\u0027 % (self.account_prefixes[1], project_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_51a860db","line":2818,"in_reply_to":"3a961159_5a3166ec","updated":"2015-01-12 17:53:40.000000000","message":"I realise that throughout, I\u0027ve kind of assumed the first prefix is the prefix used in Keystone. However, I\u0027ve not either said this, or in retrospect, does it seem to be required....unless you count these functional tests are requiring such an assumption.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":2815,"context_line":"    def _service_account(self, path):"},{"line_number":2816,"context_line":"        parts \u003d path.split(\u0027/\u0027, 3)"},{"line_number":2817,"context_line":"        account \u003d parts[2]"},{"line_number":2818,"context_line":"        prefix \u003d self.account_prefixes[0]"},{"line_number":2819,"context_line":"        if account.startswith(prefix):"},{"line_number":2820,"context_line":"            project_id \u003d account[len(prefix):]"},{"line_number":2821,"context_line":"            parts[2] \u003d \u0027%s%s\u0027 % (self.account_prefixes[1], project_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_1b2d47af","line":2818,"in_reply_to":"3a961159_fa23ce03","updated":"2015-01-20 10:56:33.000000000","message":"Have added a service prefix to test.conf\nHowever, will continue to state that first prefix must be the same as Keystone\u0027s prefix","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":2823,"context_line":""},{"line_number":2824,"context_line":"    def test_reseller_prefixes_info(self):"},{"line_number":2825,"context_line":"        if tf.skip_service_tokens:"},{"line_number":2826,"context_line":"            raise SkipTest"},{"line_number":2827,"context_line":"        if len(self.account_prefixes) \u003c 2:"},{"line_number":2828,"context_line":"            tf.skip_service_tokens \u003d True  # No point in doing more tests"},{"line_number":2829,"context_line":"        self.assertGreaterEqual(len(self.account_prefixes), 2,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_0555c4f9","line":2826,"updated":"2015-01-12 12:40:41.000000000","message":"Put the conditional skip in setUp() and remove form all the tests - less lines and avoids setting up a connection and then skipping","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":2823,"context_line":""},{"line_number":2824,"context_line":"    def test_reseller_prefixes_info(self):"},{"line_number":2825,"context_line":"        if tf.skip_service_tokens:"},{"line_number":2826,"context_line":"            raise SkipTest"},{"line_number":2827,"context_line":"        if len(self.account_prefixes) \u003c 2:"},{"line_number":2828,"context_line":"            tf.skip_service_tokens \u003d True  # No point in doing more tests"},{"line_number":2829,"context_line":"        self.assertGreaterEqual(len(self.account_prefixes), 2,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_9b07771e","line":2826,"in_reply_to":"3a961159_0555c4f9","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":2825,"context_line":"        if tf.skip_service_tokens:"},{"line_number":2826,"context_line":"            raise SkipTest"},{"line_number":2827,"context_line":"        if len(self.account_prefixes) \u003c 2:"},{"line_number":2828,"context_line":"            tf.skip_service_tokens \u003d True  # No point in doing more tests"},{"line_number":2829,"context_line":"        self.assertGreaterEqual(len(self.account_prefixes), 2,"},{"line_number":2830,"context_line":"                                \u0027Only one reseller_prefix found:\u0027"},{"line_number":2831,"context_line":"                                \u0027 this is invalid when username5 is configured\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_e53998a4","line":2828,"updated":"2015-01-12 12:40:41.000000000","message":"can\u0027t this be set in __init__.py?","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":2825,"context_line":"        if tf.skip_service_tokens:"},{"line_number":2826,"context_line":"            raise SkipTest"},{"line_number":2827,"context_line":"        if len(self.account_prefixes) \u003c 2:"},{"line_number":2828,"context_line":"            tf.skip_service_tokens \u003d True  # No point in doing more tests"},{"line_number":2829,"context_line":"        self.assertGreaterEqual(len(self.account_prefixes), 2,"},{"line_number":2830,"context_line":"                                \u0027Only one reseller_prefix found:\u0027"},{"line_number":2831,"context_line":"                                \u0027 this is invalid when username5 is configured\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_bb04331a","line":2828,"in_reply_to":"3a961159_e53998a4","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":2826,"context_line":"            raise SkipTest"},{"line_number":2827,"context_line":"        if len(self.account_prefixes) \u003c 2:"},{"line_number":2828,"context_line":"            tf.skip_service_tokens \u003d True  # No point in doing more tests"},{"line_number":2829,"context_line":"        self.assertGreaterEqual(len(self.account_prefixes), 2,"},{"line_number":2830,"context_line":"                                \u0027Only one reseller_prefix found:\u0027"},{"line_number":2831,"context_line":"                                \u0027 this is invalid when username5 is configured\u0027"},{"line_number":2832,"context_line":"                                \u0027 in test.conf\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_656cc89e","line":2829,"updated":"2015-01-12 12:40:41.000000000","message":"Func test should not fail when there is a valid cluster config - should establish skip condition and not attempt the test.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":2826,"context_line":"            raise SkipTest"},{"line_number":2827,"context_line":"        if len(self.account_prefixes) \u003c 2:"},{"line_number":2828,"context_line":"            tf.skip_service_tokens \u003d True  # No point in doing more tests"},{"line_number":2829,"context_line":"        self.assertGreaterEqual(len(self.account_prefixes), 2,"},{"line_number":2830,"context_line":"                                \u0027Only one reseller_prefix found:\u0027"},{"line_number":2831,"context_line":"                                \u0027 this is invalid when username5 is configured\u0027"},{"line_number":2832,"context_line":"                                \u0027 in test.conf\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_464e1670","line":2829,"in_reply_to":"3a961159_35fac743","updated":"2015-01-20 10:56:33.000000000","message":"I\u0027ve copied a method used elsewhere -- now try to detect if the system if service prefix (now in test.conf) is in the prefixes of the cluster.If not, the tests are skipped.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"27424dc70473df1068c87b9e99fe28b0fa6076de","unresolved":false,"context_lines":[{"line_number":2826,"context_line":"            raise SkipTest"},{"line_number":2827,"context_line":"        if len(self.account_prefixes) \u003c 2:"},{"line_number":2828,"context_line":"            tf.skip_service_tokens \u003d True  # No point in doing more tests"},{"line_number":2829,"context_line":"        self.assertGreaterEqual(len(self.account_prefixes), 2,"},{"line_number":2830,"context_line":"                                \u0027Only one reseller_prefix found:\u0027"},{"line_number":2831,"context_line":"                                \u0027 this is invalid when username5 is configured\u0027"},{"line_number":2832,"context_line":"                                \u0027 in test.conf\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_d1fd30b3","line":2829,"in_reply_to":"3a961159_656cc89e","updated":"2015-01-12 17:53:40.000000000","message":"I made a deliberate exception to that rule here. I could have setup to skip these tests if there was only a single prefix in the configured cluster. However, I then worried that someone would configure the tests to have a username5 and not realise that no service-token tests were actually being done (since the system was not configured correctly).\n\nMaybe that\u0027s a bad idea. If so, then skip test is set if (not username5) OR (len(reseller_prefix) \u003c 2)","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8857d527c73cbc992bf25e16ff12c97a47999a00","unresolved":false,"context_lines":[{"line_number":2826,"context_line":"            raise SkipTest"},{"line_number":2827,"context_line":"        if len(self.account_prefixes) \u003c 2:"},{"line_number":2828,"context_line":"            tf.skip_service_tokens \u003d True  # No point in doing more tests"},{"line_number":2829,"context_line":"        self.assertGreaterEqual(len(self.account_prefixes), 2,"},{"line_number":2830,"context_line":"                                \u0027Only one reseller_prefix found:\u0027"},{"line_number":2831,"context_line":"                                \u0027 this is invalid when username5 is configured\u0027"},{"line_number":2832,"context_line":"                                \u0027 in test.conf\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_35fac743","line":2829,"in_reply_to":"3a961159_d1fd30b3","updated":"2015-01-13 10:30:22.000000000","message":"OK, but you shouldn\u0027t assume that tests run in any order so setting tf.skip_service_tokens here will not necessarily prevent other tests running and failing. You could make the assertion in setUp() as a \u0027dynamic\u0027 skip condition.\n\nHowever, the approach I took with keystone v3 tests was that if account4 parameters are in test.conf then it is assumed that keystone v3 API is being used and those tests will be run. If swift is not configured to use v3 AIP then the tests will fail.\n\nSo I think it is sufficient to detect account5 in test.conf and proceed to run the service token tests - the tester is implicitly asserting that service token tests should pass.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":2831,"context_line":"                                \u0027 this is invalid when username5 is configured\u0027"},{"line_number":2832,"context_line":"                                \u0027 in test.conf\u0027)"},{"line_number":2833,"context_line":""},{"line_number":2834,"context_line":"    def test_user_access_own_auth_account(self):"},{"line_number":2835,"context_line":"        if tf.skip_service_tokens:"},{"line_number":2836,"context_line":"            raise SkipTest"},{"line_number":2837,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_2529e037","line":2834,"updated":"2015-01-12 12:40:41.000000000","message":"duplicating existing tests??","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":2831,"context_line":"                                \u0027 this is invalid when username5 is configured\u0027"},{"line_number":2832,"context_line":"                                \u0027 in test.conf\u0027)"},{"line_number":2833,"context_line":""},{"line_number":2834,"context_line":"    def test_user_access_own_auth_account(self):"},{"line_number":2835,"context_line":"        if tf.skip_service_tokens:"},{"line_number":2836,"context_line":"            raise SkipTest"},{"line_number":2837,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_469c56c0","line":2834,"in_reply_to":"3a961159_2529e037","updated":"2015-01-20 10:56:33.000000000","message":"Yes. Added a comment","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"076509d57b0799fdf82f791f8ae148249eb8c34a","unresolved":false,"context_lines":[{"line_number":2847,"context_line":"                               \u0027, \u0027.join(self.account_prefixes)))"},{"line_number":2848,"context_line":"        if \u0027keystoneauth\u0027 in cluster_info:"},{"line_number":2849,"context_line":"            # Keystone only denies DELETE account to non reseller admins"},{"line_number":2850,"context_line":"            self.put_account_response \u003d (200, 201)"},{"line_number":2851,"context_line":"        else:"},{"line_number":2852,"context_line":"            # Tempauth denies both PUT and DELETE account"},{"line_number":2853,"context_line":"            self.put_account_response \u003d (403, 403)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_8907cc1b","line":2850,"updated":"2015-01-23 12:23:54.000000000","message":"But the account controller will return 405 for account if allow_account_management\u003dfalse, which is the default, and other functional tests will fail with keystone if allow_account_management\u003dtrue.","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":2847,"context_line":"                               \u0027, \u0027.join(self.account_prefixes)))"},{"line_number":2848,"context_line":"        if \u0027keystoneauth\u0027 in cluster_info:"},{"line_number":2849,"context_line":"            # Keystone only denies DELETE account to non reseller admins"},{"line_number":2850,"context_line":"            self.put_account_response \u003d (200, 201)"},{"line_number":2851,"context_line":"        else:"},{"line_number":2852,"context_line":"            # Tempauth denies both PUT and DELETE account"},{"line_number":2853,"context_line":"            self.put_account_response \u003d (403, 403)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_077c3771","line":2850,"in_reply_to":"1a930d6b_8907cc1b","updated":"2015-01-27 12:53:19.000000000","message":"Refactored per your suggestion elsewhere","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":2850,"context_line":"            self.put_account_response \u003d (200, 201)"},{"line_number":2851,"context_line":"        else:"},{"line_number":2852,"context_line":"            # Tempauth denies both PUT and DELETE account"},{"line_number":2853,"context_line":"            self.put_account_response \u003d (403, 403)"},{"line_number":2854,"context_line":""},{"line_number":2855,"context_line":"        # Matrix of method, container, obj requests and expected response"},{"line_number":2856,"context_line":"        self.deny_matrix \u003d [(\u0027PUT\u0027, None, None, 403),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_1ec88721","line":2853,"updated":"2015-01-22 19:02:56.000000000","message":"why the two identical values?","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":2850,"context_line":"            self.put_account_response \u003d (200, 201)"},{"line_number":2851,"context_line":"        else:"},{"line_number":2852,"context_line":"            # Tempauth denies both PUT and DELETE account"},{"line_number":2853,"context_line":"            self.put_account_response \u003d (403, 403)"},{"line_number":2854,"context_line":""},{"line_number":2855,"context_line":"        # Matrix of method, container, obj requests and expected response"},{"line_number":2856,"context_line":"        self.deny_matrix \u003d [(\u0027PUT\u0027, None, None, 403),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_62638ddc","line":2853,"in_reply_to":"1a930d6b_1ec88721","updated":"2015-01-27 12:53:19.000000000","message":"Ditto","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"4cdb566373867d333ac3e12095366f1cd84f05b9","unresolved":false,"context_lines":[{"line_number":2861,"context_line":"                            (\u0027DELETE\u0027, None, None, 403),"},{"line_number":2862,"context_line":"                            (\u0027PUT\u0027, \u0027c\u0027, None, 403),"},{"line_number":2863,"context_line":"                            (\u0027POST\u0027, \u0027c\u0027, None, 403),"},{"line_number":2864,"context_line":"                            (\u0027HEAD\u0027, \u0027c\u0027, None, 404),  # Not found"},{"line_number":2865,"context_line":"                            (\u0027GET\u0027, \u0027c\u0027, None, 404),   # Not found"},{"line_number":2866,"context_line":"                            (\u0027OPTIONS\u0027, \u0027c\u0027, None, 200),"},{"line_number":2867,"context_line":"                            (\u0027DELETE\u0027, \u0027c\u0027, None, 403),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_bf8f56cb","line":2864,"updated":"2015-01-23 11:45:33.000000000","message":"I\u0027ve concluded this is a regression -- should be 403","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"076509d57b0799fdf82f791f8ae148249eb8c34a","unresolved":false,"context_lines":[{"line_number":2862,"context_line":"                            (\u0027PUT\u0027, \u0027c\u0027, None, 403),"},{"line_number":2863,"context_line":"                            (\u0027POST\u0027, \u0027c\u0027, None, 403),"},{"line_number":2864,"context_line":"                            (\u0027HEAD\u0027, \u0027c\u0027, None, 404),  # Not found"},{"line_number":2865,"context_line":"                            (\u0027GET\u0027, \u0027c\u0027, None, 404),   # Not found"},{"line_number":2866,"context_line":"                            (\u0027OPTIONS\u0027, \u0027c\u0027, None, 200),"},{"line_number":2867,"context_line":"                            (\u0027DELETE\u0027, \u0027c\u0027, None, 403),"},{"line_number":2868,"context_line":"                            (\u0027PUT\u0027, \u0027c\u0027, \u0027o\u0027, 403),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_c42b7b92","line":2865,"updated":"2015-01-23 12:23:54.000000000","message":"Only 404 if the account does not exist, so if you run the tests more than once without deleting account you will get 403s (and tests fail). Since we can\u0027t always reset the test cluster, best thing IMHO would be to simply check for a 4xx response.","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":2862,"context_line":"                            (\u0027PUT\u0027, \u0027c\u0027, None, 403),"},{"line_number":2863,"context_line":"                            (\u0027POST\u0027, \u0027c\u0027, None, 403),"},{"line_number":2864,"context_line":"                            (\u0027HEAD\u0027, \u0027c\u0027, None, 404),  # Not found"},{"line_number":2865,"context_line":"                            (\u0027GET\u0027, \u0027c\u0027, None, 404),   # Not found"},{"line_number":2866,"context_line":"                            (\u0027OPTIONS\u0027, \u0027c\u0027, None, 200),"},{"line_number":2867,"context_line":"                            (\u0027DELETE\u0027, \u0027c\u0027, None, 403),"},{"line_number":2868,"context_line":"                            (\u0027PUT\u0027, \u0027c\u0027, \u0027o\u0027, 403),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_27f693f9","line":2865,"in_reply_to":"1a930d6b_c42b7b92","updated":"2015-01-27 12:53:19.000000000","message":"Refectored per your suggestion","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":2914,"context_line":"        :param headers: Optional. Adds additional headers."},{"line_number":2915,"context_line":"        :param x_auth_token: Optional. A string containing one of the"},{"line_number":2916,"context_line":"               following (where \u0027user_token\u0027 is the default):"},{"line_number":2917,"context_line":"                   \u0027user_token\u0027 -- put the test user\u0027s token in X-Auth-Token"},{"line_number":2918,"context_line":"                   \u0027service_token\u0027 -- put the service token in X-Auth-Token"},{"line_number":2919,"context_line":"        :param x_service_token: Optional. A string containing one of the"},{"line_number":2920,"context_line":"               following (where \u0027none\u0027 is default):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_1650755d","line":2917,"updated":"2015-01-22 19:02:56.000000000","message":"s/user_token/users_token/","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":2914,"context_line":"        :param headers: Optional. Adds additional headers."},{"line_number":2915,"context_line":"        :param x_auth_token: Optional. A string containing one of the"},{"line_number":2916,"context_line":"               following (where \u0027user_token\u0027 is the default):"},{"line_number":2917,"context_line":"                   \u0027user_token\u0027 -- put the test user\u0027s token in X-Auth-Token"},{"line_number":2918,"context_line":"                   \u0027service_token\u0027 -- put the service token in X-Auth-Token"},{"line_number":2919,"context_line":"        :param x_service_token: Optional. A string containing one of the"},{"line_number":2920,"context_line":"               following (where \u0027none\u0027 is default):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_e7d64b4e","line":2917,"in_reply_to":"1a930d6b_1650755d","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":2919,"context_line":"        :param x_service_token: Optional. A string containing one of the"},{"line_number":2920,"context_line":"               following (where \u0027none\u0027 is default):"},{"line_number":2921,"context_line":"                   \u0027none\u0027 -- do not specify X-Service-Token"},{"line_number":2922,"context_line":"                   \u0027user_token\u0027 -- put the test user\u0027s token in X-Service-Token"},{"line_number":2923,"context_line":"                   \u0027service_token\u0027 -- put the service token in X-Service-Token"},{"line_number":2924,"context_line":"        :param dbg: Optional. Set true to check request arguments"},{"line_number":2925,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_96cb851d","line":2922,"updated":"2015-01-22 19:02:56.000000000","message":"ditto","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":2919,"context_line":"        :param x_service_token: Optional. A string containing one of the"},{"line_number":2920,"context_line":"               following (where \u0027none\u0027 is default):"},{"line_number":2921,"context_line":"                   \u0027none\u0027 -- do not specify X-Service-Token"},{"line_number":2922,"context_line":"                   \u0027user_token\u0027 -- put the test user\u0027s token in X-Service-Token"},{"line_number":2923,"context_line":"                   \u0027service_token\u0027 -- put the service token in X-Service-Token"},{"line_number":2924,"context_line":"        :param dbg: Optional. Set true to check request arguments"},{"line_number":2925,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_58303e01","line":2922,"in_reply_to":"1a930d6b_96cb851d","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7f8e69bd95ed7baa8c824f0903f18d22e1aebad4","unresolved":false,"context_lines":[{"line_number":2849,"context_line":"        elif (\u0027tempauth\u0027 in cluster_info and"},{"line_number":2850,"context_line":"              \u0027reseller_prefixes\u0027 in cluster_info.get(\u0027tempauth\u0027)):"},{"line_number":2851,"context_line":"            self.account_prefixes \u003d cluster_info.get(\u0027tempauth\u0027).get("},{"line_number":2852,"context_line":"                \u0027reseller_prefixes\u0027)"},{"line_number":2853,"context_line":"        if tf.swift_test_service_prefix not in self.account_prefixes:"},{"line_number":2854,"context_line":"            raise SkipTest(\u0027test.conf reseller_prefix(%s) not in\u0027"},{"line_number":2855,"context_line":"                           \u0027 test cluster reseller_prefix (%s):\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_360fc6e2","line":2852,"updated":"2015-02-05 15:24:47.000000000","message":"If i have both tempauth and kesytoneauth in the pipeline (like devstack) then if keystoneauth declares reseller_prefix SERVICE, the tests will not skip, even if the tests are running against tempauth.\n\nSimilarly, if keystoneauth does not declare SERVICE prefix then tests are skipped against tempauth.\n\nGiven that in devstack setup the service prefixes will need to be different for tempauth and keystoneauth, in order for them to coexist, then we can\u0027t have the keystoneauth prefixes determining whether to skip or not.\n\nSo we need the if/elif to also be conditional on tf.swift_test_auth_version","commit_id":"ec90dcc78430f67118866627d5a9847288963536"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"beadb13adad648e6c9e270dd81446f7a00784075","unresolved":false,"context_lines":[{"line_number":2849,"context_line":"        elif (\u0027tempauth\u0027 in cluster_info and"},{"line_number":2850,"context_line":"              \u0027reseller_prefixes\u0027 in cluster_info.get(\u0027tempauth\u0027)):"},{"line_number":2851,"context_line":"            self.account_prefixes \u003d cluster_info.get(\u0027tempauth\u0027).get("},{"line_number":2852,"context_line":"                \u0027reseller_prefixes\u0027)"},{"line_number":2853,"context_line":"        if tf.swift_test_service_prefix not in self.account_prefixes:"},{"line_number":2854,"context_line":"            raise SkipTest(\u0027test.conf reseller_prefix(%s) not in\u0027"},{"line_number":2855,"context_line":"                           \u0027 test cluster reseller_prefix (%s):\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_1f4389af","line":2852,"in_reply_to":"da86d52c_360fc6e2","updated":"2015-02-06 17:37:53.000000000","message":"Done","commit_id":"ec90dcc78430f67118866627d5a9847288963536"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7f8e69bd95ed7baa8c824f0903f18d22e1aebad4","unresolved":false,"context_lines":[{"line_number":2859,"context_line":"        # keystoneauth and tempauth differ in allowing PUT account"},{"line_number":2860,"context_line":"        # Even if keystoneauth allows it, the proxy-server uses"},{"line_number":2861,"context_line":"        # allow_account_management to decide if accounts can be created"},{"line_number":2862,"context_line":"        if (cluster_info.get(\u0027swift\u0027).get(\u0027allow_account_management\u0027) and"},{"line_number":2863,"context_line":"                \u0027keystoneauth\u0027 in cluster_info):"},{"line_number":2864,"context_line":"            self.put_account_expect \u003d is_success"},{"line_number":2865,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_4f265469","line":2862,"updated":"2015-02-05 15:24:47.000000000","message":"ditto w.r.t. choice of put_account_expect","commit_id":"ec90dcc78430f67118866627d5a9847288963536"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"beadb13adad648e6c9e270dd81446f7a00784075","unresolved":false,"context_lines":[{"line_number":2859,"context_line":"        # keystoneauth and tempauth differ in allowing PUT account"},{"line_number":2860,"context_line":"        # Even if keystoneauth allows it, the proxy-server uses"},{"line_number":2861,"context_line":"        # allow_account_management to decide if accounts can be created"},{"line_number":2862,"context_line":"        if (cluster_info.get(\u0027swift\u0027).get(\u0027allow_account_management\u0027) and"},{"line_number":2863,"context_line":"                \u0027keystoneauth\u0027 in cluster_info):"},{"line_number":2864,"context_line":"            self.put_account_expect \u003d is_success"},{"line_number":2865,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_3f15ad9b","line":2862,"in_reply_to":"da86d52c_4f265469","updated":"2015-02-06 17:37:53.000000000","message":"Done","commit_id":"ec90dcc78430f67118866627d5a9847288963536"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":2868,"context_line":"            for method in (\u0027PUT\u0027, \u0027POST\u0027, \u0027HEAD\u0027, \u0027GET\u0027, \u0027OPTIONS\u0027):"},{"line_number":2869,"context_line":"                yield method, path[0], path[1]"},{"line_number":2870,"context_line":"        for path in reversed(paths):"},{"line_number":2871,"context_line":"            yield \u0027DELETE\u0027, path[0], path[1]"},{"line_number":2872,"context_line":""},{"line_number":2873,"context_line":"    def _assert_is_authed_response(self, method, container, object, resp):"},{"line_number":2874,"context_line":"        resp.read()"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_db4db33c","line":2871,"updated":"2015-02-19 07:08:12.000000000","message":"cool!","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":2916,"context_line":"                   \u0027none\u0027 -- do not specify X-Service-Token"},{"line_number":2917,"context_line":"                   \u0027users_token\u0027 -- put the test user\u0027s token in"},{"line_number":2918,"context_line":"                                    X-Service-Token"},{"line_number":2919,"context_line":"                   \u0027service_token\u0027 -- put the service token in X-Service-Token"},{"line_number":2920,"context_line":"        :param dbg: Optional. Set true to check request arguments"},{"line_number":2921,"context_line":"        \"\"\""},{"line_number":2922,"context_line":"        self.method \u003d method"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_9b1c1b15","line":2919,"updated":"2015-02-19 07:08:12.000000000","message":"ahhh stringly typed :D","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":2916,"context_line":"                   \u0027none\u0027 -- do not specify X-Service-Token"},{"line_number":2917,"context_line":"                   \u0027users_token\u0027 -- put the test user\u0027s token in"},{"line_number":2918,"context_line":"                                    X-Service-Token"},{"line_number":2919,"context_line":"                   \u0027service_token\u0027 -- put the service token in X-Service-Token"},{"line_number":2920,"context_line":"        :param dbg: Optional. Set true to check request arguments"},{"line_number":2921,"context_line":"        \"\"\""},{"line_number":2922,"context_line":"        self.method \u003d method"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_1dff2867","line":2919,"in_reply_to":"da86d52c_9b1c1b15","updated":"2015-02-19 17:57:47.000000000","message":"Sorry. Fixed; hopefully more obvious","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":2929,"context_line":"        self.x_service_token \u003d x_service_token"},{"line_number":2930,"context_line":"        self.dbg \u003d dbg"},{"line_number":2931,"context_line":""},{"line_number":2932,"context_line":"    def do_request(self, url, token, parsed, conn, service_token\u003d\u0027\u0027):"},{"line_number":2933,"context_line":"            if self.use_service_account:"},{"line_number":2934,"context_line":"                path \u003d self._service_account(parsed.path)"},{"line_number":2935,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_dbe933e4","line":2932,"updated":"2015-02-19 07:08:12.000000000","message":"oh our poor functest framework...\n\nso service_token gets built by the test.functional.retry helper - but it\u0027ll only get *used* if the preflight prepare_request set some state on the testcase here to mandate it should get added.  got it.","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"}],"test/sample.conf":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"076509d57b0799fdf82f791f8ae148249eb8c34a","unresolved":false,"context_lines":[{"line_number":38,"context_line":"# The user must not have a group (tempauth) or role (keystoneauth) on"},{"line_number":39,"context_line":"# the primary test account. The user must have a group/role that is unique"},{"line_number":40,"context_line":"# and not given to the primary tester and is specified in the options"},{"line_number":41,"context_line":"# \u003cprefix\u003e_require_group (tempauth) or \u003cprefix\u003e_service_roles (keystoneauth)."},{"line_number":42,"context_line":"#account5 \u003d svcacct"},{"line_number":43,"context_line":"#username5 \u003d tester5"},{"line_number":44,"context_line":"#password5 \u003d testing5"}],"source_content_type":"text/plain","patch_set":8,"id":"1a930d6b_b5e3f731","line":41,"updated":"2015-01-23 12:23:54.000000000","message":"I *think* these options can be uncommented - assuming we include the account details in the default tempauth config then the tests can and should be run by default. They will still be skipped if the auth middleware does not have a service prefix.","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":38,"context_line":"# The user must not have a group (tempauth) or role (keystoneauth) on"},{"line_number":39,"context_line":"# the primary test account. The user must have a group/role that is unique"},{"line_number":40,"context_line":"# and not given to the primary tester and is specified in the options"},{"line_number":41,"context_line":"# \u003cprefix\u003e_require_group (tempauth) or \u003cprefix\u003e_service_roles (keystoneauth)."},{"line_number":42,"context_line":"#account5 \u003d svcacct"},{"line_number":43,"context_line":"#username5 \u003d tester5"},{"line_number":44,"context_line":"#password5 \u003d testing5"}],"source_content_type":"text/plain","patch_set":8,"id":"1a930d6b_0e5f5573","line":41,"in_reply_to":"1a930d6b_b5e3f731","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"}],"test/unit/common/middleware/test_keystoneauth.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":297,"context_line":""},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"class SwiftAuthMultiple(SwiftAuth):"},{"line_number":300,"context_line":"    \"\"\"Runs same tests as SwiftAuth with multiply reseller prefixes"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    Runs SwiftAuth tests while a second reseller prefix item exists."},{"line_number":303,"context_line":"    Validates that there is no regression against the original"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_03cc9934","line":300,"updated":"2014-12-10 15:02:01.000000000","message":"nit multiply-\u003emultiple","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"234b7388e8790a5e8025f6dfb65198001fb6f961","unresolved":false,"context_lines":[{"line_number":1407,"context_line":"    def test_single_blank_reseller(self):"},{"line_number":1408,"context_line":"        conf \u003d {\u0027reseller_prefix\u0027: \u0027\u0027}"},{"line_number":1409,"context_line":"        test_auth \u003d keystoneauth.filter_factory(conf)(FakeApp())"},{"line_number":1410,"context_line":"        self.assertEquals(test_auth.account_prefixes, [\u0027_\u0027])"},{"line_number":1411,"context_line":"        for role in self.default_rules.get(\u0027operator_roles\u0027):"},{"line_number":1412,"context_line":"            self.assertTrue(role in test_auth.account_rules[\u0027_\u0027].get("},{"line_number":1413,"context_line":"                            \u0027operator_roles\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_43406156","line":1410,"updated":"2014-12-10 15:02:01.000000000","message":"*nit*: assertEqual is preferred over assertEquals - not suggetsing you change it everywhere in this module (!) but additions could be consistent","commit_id":"03b28c3ddc8221808809b0dbf75a3800fc6f2142"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"class ServiceTokenFunctionality(unittest.TestCase):"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def _get_identity_headers(self, status\u003d\u0027Confirmed\u0027, tenant_id\u003d\u00271\u0027,"},{"line_number":316,"context_line":"                              tenant_name\u003d\u0027acct\u0027, project_domain_name\u003d\u0027domA\u0027,"},{"line_number":317,"context_line":"                              project_domain_id\u003d\u002799\u0027,"},{"line_number":318,"context_line":"                              user_name\u003d\u0027usr\u0027, user_id\u003d\u002742\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_64d5aeb6","line":315,"updated":"2015-01-12 12:40:41.000000000","message":"you could move this and the almost identical function in SwiftAuth to be a module function (self is not references) with service_role optionally added to the dict.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"class ServiceTokenFunctionality(unittest.TestCase):"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def _get_identity_headers(self, status\u003d\u0027Confirmed\u0027, tenant_id\u003d\u00271\u0027,"},{"line_number":316,"context_line":"                              tenant_name\u003d\u0027acct\u0027, project_domain_name\u003d\u0027domA\u0027,"},{"line_number":317,"context_line":"                              project_domain_id\u003d\u002799\u0027,"},{"line_number":318,"context_line":"                              user_name\u003d\u0027usr\u0027, user_id\u003d\u002742\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_36493567","line":315,"in_reply_to":"3a961159_64d5aeb6","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"27424dc70473df1068c87b9e99fe28b0fa6076de","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"class ServiceTokenFunctionality(unittest.TestCase):"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def _get_identity_headers(self, status\u003d\u0027Confirmed\u0027, tenant_id\u003d\u00271\u0027,"},{"line_number":316,"context_line":"                              tenant_name\u003d\u0027acct\u0027, project_domain_name\u003d\u0027domA\u0027,"},{"line_number":317,"context_line":"                              project_domain_id\u003d\u002799\u0027,"},{"line_number":318,"context_line":"                              user_name\u003d\u0027usr\u0027, user_id\u003d\u002742\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_f1c4ec0f","line":315,"in_reply_to":"3a961159_64d5aeb6","updated":"2015-01-12 17:53:40.000000000","message":"ok","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":382,"context_line":"            user_role\u003d\u0027ResellerAdmin\u0027)"},{"line_number":383,"context_line":"        self.assertEqual(resp.status_int, 200)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    def test_denied_for_path_single(self):"},{"line_number":386,"context_line":"        resp \u003d self._make_authed_request("},{"line_number":387,"context_line":"            {\u0027reseller_prefix\u0027: \u0027AUTH\u0027}, \u002712345678\u0027, \u0027/v1/AUTH_789\u0027)"},{"line_number":388,"context_line":"        self.assertEqual(resp.status_int, 403)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_3f372fe6","line":385,"updated":"2015-01-12 12:40:41.000000000","message":"add test when reseller_prefix !\u003d account prefix","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":382,"context_line":"            user_role\u003d\u0027ResellerAdmin\u0027)"},{"line_number":383,"context_line":"        self.assertEqual(resp.status_int, 200)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    def test_denied_for_path_single(self):"},{"line_number":386,"context_line":"        resp \u003d self._make_authed_request("},{"line_number":387,"context_line":"            {\u0027reseller_prefix\u0027: \u0027AUTH\u0027}, \u002712345678\u0027, \u0027/v1/AUTH_789\u0027)"},{"line_number":388,"context_line":"        self.assertEqual(resp.status_int, 403)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_16ffd903","line":385,"in_reply_to":"3a961159_3f372fe6","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                    user_domain_name\u003d\u0027domA\u0027, user_domain_id\u003d\u002799\u0027,"},{"line_number":515,"context_line":"                    auth_version\u003d\u00273\u0027):"},{"line_number":516,"context_line":"        if not roles:"},{"line_number":517,"context_line":"            roles \u003d []"},{"line_number":518,"context_line":"        env \u003d self._get_identity(tenant_id, tenant_name, user_id, user_name,"},{"line_number":519,"context_line":"                                 roles, project_domain_name,"},{"line_number":520,"context_line":"                                 project_domain_id, user_domain_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_df91cb47","line":517,"updated":"2015-01-12 12:40:41.000000000","message":"i don\u0027t think this is necessary, will be handled in _get_identity","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                    user_domain_name\u003d\u0027domA\u0027, user_domain_id\u003d\u002799\u0027,"},{"line_number":515,"context_line":"                    auth_version\u003d\u00273\u0027):"},{"line_number":516,"context_line":"        if not roles:"},{"line_number":517,"context_line":"            roles \u003d []"},{"line_number":518,"context_line":"        env \u003d self._get_identity(tenant_id, tenant_name, user_id, user_name,"},{"line_number":519,"context_line":"                                 roles, project_domain_name,"},{"line_number":520,"context_line":"                                 project_domain_id, user_domain_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_7653bd16","line":517,"in_reply_to":"3a961159_df91cb47","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        self.assertTrue(req.environ.get(\u0027swift_owner\u0027))"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def test_authorize_succeeds_as_owner_for_operator_role(self):"},{"line_number":578,"context_line":"        roles \u003d self.test_auth.operator_roles()"},{"line_number":579,"context_line":"        identity \u003d self._get_identity(roles\u003droles)"},{"line_number":580,"context_line":"        req \u003d self._check_authenticate(identity\u003didentity)"},{"line_number":581,"context_line":"        self.assertTrue(req.environ.get(\u0027swift_owner\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_7fd8d71e","line":578,"updated":"2015-01-12 12:40:41.000000000","message":"copy roles before passing on to test code just in case a future change in the tests modifies the roles list","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        self.assertTrue(req.environ.get(\u0027swift_owner\u0027))"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def test_authorize_succeeds_as_owner_for_operator_role(self):"},{"line_number":578,"context_line":"        roles \u003d self.test_auth.operator_roles()"},{"line_number":579,"context_line":"        identity \u003d self._get_identity(roles\u003droles)"},{"line_number":580,"context_line":"        req \u003d self._check_authenticate(identity\u003didentity)"},{"line_number":581,"context_line":"        self.assertTrue(req.environ.get(\u0027swift_owner\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_b63c45c2","line":578,"in_reply_to":"3a961159_7fd8d71e","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":752,"context_line":"            \u0027tenantID:userID\u0027)"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"    def test_delete_own_account_not_allowed(self):"},{"line_number":755,"context_line":"        roles \u003d self.test_auth.operator_roles()"},{"line_number":756,"context_line":"        identity \u003d self._get_identity(roles\u003droles)"},{"line_number":757,"context_line":"        account \u003d self._get_account(identity)"},{"line_number":758,"context_line":"        self._check_authenticate(account\u003daccount,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_df062b85","line":755,"updated":"2015-01-12 12:40:41.000000000","message":"ditto","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":752,"context_line":"            \u0027tenantID:userID\u0027)"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"    def test_delete_own_account_not_allowed(self):"},{"line_number":755,"context_line":"        roles \u003d self.test_auth.operator_roles()"},{"line_number":756,"context_line":"        identity \u003d self._get_identity(roles\u003droles)"},{"line_number":757,"context_line":"        account \u003d self._get_account(identity)"},{"line_number":758,"context_line":"        self._check_authenticate(account\u003daccount,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_d639d1d0","line":755,"in_reply_to":"3a961159_df062b85","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"        self.assertTrue(\u0027role1\u0027 in test_auth.account_rules[\u0027PRE1_\u0027].get("},{"line_number":1482,"context_line":"                        \u0027operator_roles\u0027))"},{"line_number":1483,"context_line":"        self.assertTrue(\u0027role2\u0027 in test_auth.account_rules[\u0027PRE1_\u0027].get("},{"line_number":1484,"context_line":"                        \u0027operator_roles\u0027))"},{"line_number":1485,"context_line":"        self.assertTrue(\u0027role5\u0027 in test_auth.account_rules[\u0027PRE2_\u0027].get("},{"line_number":1486,"context_line":"                        \u0027operator_roles\u0027))"},{"line_number":1487,"context_line":"        self.assertTrue(\u0027role3\u0027 in test_auth.account_rules[\u0027PRE1_\u0027].get("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_7b5acbf3","line":1484,"updated":"2015-01-12 12:40:41.000000000","message":"These tests should probably check that other roles are not in rule for each prefix e.g.:\n\n self.assertEqual([\u0027role1\u0027, \u0027role2\u0027], test_auth.account_rules[\u0027PRE1_\u0027].get( \u0027operator_roles\u0027)","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"        self.assertTrue(\u0027role1\u0027 in test_auth.account_rules[\u0027PRE1_\u0027].get("},{"line_number":1482,"context_line":"                        \u0027operator_roles\u0027))"},{"line_number":1483,"context_line":"        self.assertTrue(\u0027role2\u0027 in test_auth.account_rules[\u0027PRE1_\u0027].get("},{"line_number":1484,"context_line":"                        \u0027operator_roles\u0027))"},{"line_number":1485,"context_line":"        self.assertTrue(\u0027role5\u0027 in test_auth.account_rules[\u0027PRE2_\u0027].get("},{"line_number":1486,"context_line":"                        \u0027operator_roles\u0027))"},{"line_number":1487,"context_line":"        self.assertTrue(\u0027role3\u0027 in test_auth.account_rules[\u0027PRE1_\u0027].get("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_82d9c358","line":1484,"in_reply_to":"3a961159_7b5acbf3","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":1494,"context_line":"        self.assertEqual(swift_info.get(\u0027reseller_prefixes\u0027),"},{"line_number":1495,"context_line":"                         [\u0027PRE1_\u0027, \u0027PRE2_\u0027])"},{"line_number":1496,"context_line":""},{"line_number":1497,"context_line":"    def test_several_resellers_first_blank(self):"},{"line_number":1498,"context_line":"        conf \u003d {\u0027reseller_prefix\u0027: \" \u0027\u0027 , PRE2\","},{"line_number":1499,"context_line":"                \"\u0027\u0027operator_roles\": \u0027role1, role2\u0027,"},{"line_number":1500,"context_line":"                \"\u0027\u0027service_roles\": \u0027role3, role4\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_464ff66a","line":1497,"updated":"2015-01-12 12:40:41.000000000","message":"is it significant that first is blank? does there need to be a test when the blank is not first in list?","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":1494,"context_line":"        self.assertEqual(swift_info.get(\u0027reseller_prefixes\u0027),"},{"line_number":1495,"context_line":"                         [\u0027PRE1_\u0027, \u0027PRE2_\u0027])"},{"line_number":1496,"context_line":""},{"line_number":1497,"context_line":"    def test_several_resellers_first_blank(self):"},{"line_number":1498,"context_line":"        conf \u003d {\u0027reseller_prefix\u0027: \" \u0027\u0027 , PRE2\","},{"line_number":1499,"context_line":"                \"\u0027\u0027operator_roles\": \u0027role1, role2\u0027,"},{"line_number":1500,"context_line":"                \"\u0027\u0027service_roles\": \u0027role3, role4\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_04e5caa3","line":1497,"in_reply_to":"3a961159_464ff66a","updated":"2015-01-20 10:56:33.000000000","message":"First being blank is only significant in that blank matches all prefixes, so this test was to check that being first, blank did not mask the remaining ones. However, I added a test where blank is elsewhere in the list","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":1500,"context_line":"                \"\u0027\u0027service_roles\": \u0027role3, role4\u0027,"},{"line_number":1501,"context_line":"                \u0027PRE2_operator_roles\u0027: \u0027role5\u0027,"},{"line_number":1502,"context_line":"                \u0027PRE2_service_roles\u0027: \u0027role6\u0027}"},{"line_number":1503,"context_line":"        test_auth \u003d keystoneauth.filter_factory(conf)(FakeApp())"},{"line_number":1504,"context_line":"        self.assertTrue(\u0027role1\u0027 in test_auth.account_rules[\u0027\u0027].get("},{"line_number":1505,"context_line":"                        \u0027operator_roles\u0027))"},{"line_number":1506,"context_line":"        self.assertTrue(\u0027role2\u0027 in test_auth.account_rules[\u0027\u0027].get("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_1b02a7ba","line":1503,"updated":"2015-01-12 12:40:41.000000000","message":"as above - test for non-inclusion of other roles...","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":1500,"context_line":"                \"\u0027\u0027service_roles\": \u0027role3, role4\u0027,"},{"line_number":1501,"context_line":"                \u0027PRE2_operator_roles\u0027: \u0027role5\u0027,"},{"line_number":1502,"context_line":"                \u0027PRE2_service_roles\u0027: \u0027role6\u0027}"},{"line_number":1503,"context_line":"        test_auth \u003d keystoneauth.filter_factory(conf)(FakeApp())"},{"line_number":1504,"context_line":"        self.assertTrue(\u0027role1\u0027 in test_auth.account_rules[\u0027\u0027].get("},{"line_number":1505,"context_line":"                        \u0027operator_roles\u0027))"},{"line_number":1506,"context_line":"        self.assertTrue(\u0027role2\u0027 in test_auth.account_rules[\u0027\u0027].get("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_24eac674","line":1503,"in_reply_to":"3a961159_1b02a7ba","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":1516,"context_line":"        swift_info \u003d get_swift_info().get(\u0027keystoneauth\u0027)"},{"line_number":1517,"context_line":"        self.assertEqual(swift_info.get(\u0027reseller_prefixes\u0027),"},{"line_number":1518,"context_line":"                         [\u0027\u0027, \u0027PRE2_\u0027])"},{"line_number":1519,"context_line":""},{"line_number":1520,"context_line":""},{"line_number":1521,"context_line":"class PrefixAccount(unittest.TestCase):"},{"line_number":1522,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_bb4d13c8","line":1519,"updated":"2015-01-12 12:40:41.000000000","message":"I may have missed it but I don\u0027t see a test that verifies un-prefixed parameters get applied to all prefixes when there are multiple prefixes. (including when one is a blank prefix).\n\nAnd then testing that a prefixed-parameter overrides the unprefixed \u0027default\u0027 parameter.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f5ec06ece9a580b34af5d6632fb5010855028e0a","unresolved":false,"context_lines":[{"line_number":1516,"context_line":"        swift_info \u003d get_swift_info().get(\u0027keystoneauth\u0027)"},{"line_number":1517,"context_line":"        self.assertEqual(swift_info.get(\u0027reseller_prefixes\u0027),"},{"line_number":1518,"context_line":"                         [\u0027\u0027, \u0027PRE2_\u0027])"},{"line_number":1519,"context_line":""},{"line_number":1520,"context_line":""},{"line_number":1521,"context_line":"class PrefixAccount(unittest.TestCase):"},{"line_number":1522,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_847d3ab5","line":1519,"in_reply_to":"3a961159_bb4d13c8","updated":"2015-01-20 10:56:33.000000000","message":"Done","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f6492567a0e5f851b5f10cdcec86634b39c1466b","unresolved":false,"context_lines":[{"line_number":1558,"context_line":"        self.assertEqual(test_auth._get_account_prefix("},{"line_number":1559,"context_line":"                         \u00271234\u0027), \u0027\u0027)"},{"line_number":1560,"context_line":"        self.assertEqual(test_auth._get_account_prefix("},{"line_number":1561,"context_line":"                         \u0027JUNK_1234\u0027), \u0027\u0027)  # yes, it should return \u0027\u0027"},{"line_number":1562,"context_line":"        self.assertTrue(test_auth._account_matches_tenant("},{"line_number":1563,"context_line":"                        \u00271234\u0027, \u00271234\u0027))"},{"line_number":1564,"context_line":"        self.assertFalse(test_auth._account_matches_tenant("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_bb1ef372","line":1561,"updated":"2015-01-12 12:40:41.000000000","message":"interesting, so the project id would be JUNK_1234 - elsewhere we rely on project ids not containing an underscore, so you could just split on the \u0027_\u0027 and compare JUNK_ against all the prefixes.\n\nI guess it doesn\u0027t matter so long as JUNK_1234 is never considered a valid account.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8857d527c73cbc992bf25e16ff12c97a47999a00","unresolved":false,"context_lines":[{"line_number":1558,"context_line":"        self.assertEqual(test_auth._get_account_prefix("},{"line_number":1559,"context_line":"                         \u00271234\u0027), \u0027\u0027)"},{"line_number":1560,"context_line":"        self.assertEqual(test_auth._get_account_prefix("},{"line_number":1561,"context_line":"                         \u0027JUNK_1234\u0027), \u0027\u0027)  # yes, it should return \u0027\u0027"},{"line_number":1562,"context_line":"        self.assertTrue(test_auth._account_matches_tenant("},{"line_number":1563,"context_line":"                        \u00271234\u0027, \u00271234\u0027))"},{"line_number":1564,"context_line":"        self.assertFalse(test_auth._account_matches_tenant("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_d0cb51a2","line":1561,"in_reply_to":"3a961159_11633842","updated":"2015-01-13 10:30:22.000000000","message":"I was thinking of how \u0027_unknown\u0027 is used as a placeholder domain id, based on (domain) ids not having an \u0027_\u0027\n\nIts not a big deal, leave as is.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"27424dc70473df1068c87b9e99fe28b0fa6076de","unresolved":false,"context_lines":[{"line_number":1558,"context_line":"        self.assertEqual(test_auth._get_account_prefix("},{"line_number":1559,"context_line":"                         \u00271234\u0027), \u0027\u0027)"},{"line_number":1560,"context_line":"        self.assertEqual(test_auth._get_account_prefix("},{"line_number":1561,"context_line":"                         \u0027JUNK_1234\u0027), \u0027\u0027)  # yes, it should return \u0027\u0027"},{"line_number":1562,"context_line":"        self.assertTrue(test_auth._account_matches_tenant("},{"line_number":1563,"context_line":"                        \u00271234\u0027, \u00271234\u0027))"},{"line_number":1564,"context_line":"        self.assertFalse(test_auth._account_matches_tenant("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_11633842","line":1561,"in_reply_to":"3a961159_bb1ef372","updated":"2015-01-12 17:53:40.000000000","message":"It pretty much used the same logic as tempauth, not using knowledge that Keystone project ids never contain an \"_\". However, I\u0027m trying think where keystoneauth assumes that a project id cannot contain an \"_\". It seems to treat the tenant/project id a blob. It seems to me that keystoneauth will reject JUNK_1234 because the token won\u0027t be scoped to JUNK_1234. not because it thinks JUNK_1234 is an invalid project id.","commit_id":"4b02de594a6ba4b1a7caaf7c768a271f5cd4776f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        resp \u003d req.get_response(test_auth)"},{"line_number":364,"context_line":"        return resp"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def test_unknown_prefix(self):"},{"line_number":367,"context_line":"        resp \u003d self._make_authed_request({}, \u002712345678\u0027, \u0027/v1/BLAH_12345678\u0027)"},{"line_number":368,"context_line":"        self.assertEqual(resp.status_int, 403)"},{"line_number":369,"context_line":"        resp \u003d self._make_authed_request("}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_2372a249","line":366,"updated":"2015-01-22 19:02:56.000000000","message":"ok","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":520,"context_line":"                    user_domain_name\u003d\u0027domA\u0027, user_domain_id\u003d\u002799\u0027,"},{"line_number":521,"context_line":"                    auth_version\u003d\u00273\u0027):"},{"line_number":522,"context_line":"        if not roles:"},{"line_number":523,"context_line":"            roles \u003d []"},{"line_number":524,"context_line":"        env \u003d self._get_identity(tenant_id, tenant_name, user_id, user_name,"},{"line_number":525,"context_line":"                                 roles, project_domain_name,"},{"line_number":526,"context_line":"                                 project_domain_id, user_domain_name,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_d99550e5","line":523,"updated":"2015-01-22 19:02:56.000000000","message":"i don\u0027t think this is necessary, \u0027roles \u003d None\u0027 will be handled in _get_identity","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":520,"context_line":"                    user_domain_name\u003d\u0027domA\u0027, user_domain_id\u003d\u002799\u0027,"},{"line_number":521,"context_line":"                    auth_version\u003d\u00273\u0027):"},{"line_number":522,"context_line":"        if not roles:"},{"line_number":523,"context_line":"            roles \u003d []"},{"line_number":524,"context_line":"        env \u003d self._get_identity(tenant_id, tenant_name, user_id, user_name,"},{"line_number":525,"context_line":"                                 roles, project_domain_name,"},{"line_number":526,"context_line":"                                 project_domain_id, user_domain_name,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_9b646023","line":523,"in_reply_to":"1a930d6b_d99550e5","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":921,"context_line":""},{"line_number":922,"context_line":"        # service token in environ"},{"line_number":923,"context_line":"        req.headers.update({\u0027X-Service-Roles\u0027: \u0027%s,%s\u0027 % service_roles})"},{"line_number":924,"context_line":"        req.environ[\u0027keystone.token_info\u0027] \u003d _fake_token_info(version\u003d\u00273\u0027)"},{"line_number":925,"context_line":"        expected \u003d {\u0027user\u0027: user,"},{"line_number":926,"context_line":"                    \u0027tenant\u0027: project,"},{"line_number":927,"context_line":"                    \u0027roles\u0027: list(roles),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_23738216","line":924,"updated":"2015-01-22 19:02:56.000000000","message":"nit: already set line 911","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":921,"context_line":""},{"line_number":922,"context_line":"        # service token in environ"},{"line_number":923,"context_line":"        req.headers.update({\u0027X-Service-Roles\u0027: \u0027%s,%s\u0027 % service_roles})"},{"line_number":924,"context_line":"        req.environ[\u0027keystone.token_info\u0027] \u003d _fake_token_info(version\u003d\u00273\u0027)"},{"line_number":925,"context_line":"        expected \u003d {\u0027user\u0027: user,"},{"line_number":926,"context_line":"                    \u0027tenant\u0027: project,"},{"line_number":927,"context_line":"                    \u0027roles\u0027: list(roles),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_05faaa42","line":924,"in_reply_to":"1a930d6b_23738216","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":1474,"context_line":"        self.assertEqual(swift_info.get(\u0027reseller_prefixes\u0027),"},{"line_number":1475,"context_line":"                         [\u0027PRE1_\u0027, \u0027PRE2_\u0027])"},{"line_number":1476,"context_line":""},{"line_number":1477,"context_line":"    def test_several_resellers_with_conf(self):"},{"line_number":1478,"context_line":"        conf \u003d {\u0027reseller_prefix\u0027: \u0027PRE1, PRE2\u0027,"},{"line_number":1479,"context_line":"                \u0027PRE1_operator_roles\u0027: \u0027role1, role2\u0027,"},{"line_number":1480,"context_line":"                \u0027PRE1_service_roles\u0027: \u0027role3, role4\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_63302a9f","line":1477,"updated":"2015-01-22 19:02:56.000000000","message":"ok","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":1497,"context_line":"        self.assertEqual(swift_info.get(\u0027reseller_prefixes\u0027),"},{"line_number":1498,"context_line":"                         [\u0027PRE1_\u0027, \u0027PRE2_\u0027])"},{"line_number":1499,"context_line":""},{"line_number":1500,"context_line":"    def test_several_resellers_first_blank(self):"},{"line_number":1501,"context_line":"        conf \u003d {\u0027reseller_prefix\u0027: \" \u0027\u0027 , PRE2\","},{"line_number":1502,"context_line":"                \"\u0027\u0027operator_roles\": \u0027role1, role2\u0027,"},{"line_number":1503,"context_line":"                \"\u0027\u0027service_roles\": \u0027role3, role4\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_8310b602","line":1500,"updated":"2015-01-22 19:02:56.000000000","message":"ok","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"        self.assertEqual(swift_info.get(\u0027reseller_prefixes\u0027),"},{"line_number":1519,"context_line":"                         [\u0027\u0027, \u0027PRE2_\u0027])"},{"line_number":1520,"context_line":""},{"line_number":1521,"context_line":"    def test_several_resellers_with_blank_comma(self):"},{"line_number":1522,"context_line":"        conf \u003d {\u0027reseller_prefix\u0027: \"AUTH , \u0027\u0027, PRE2\","},{"line_number":1523,"context_line":"                \"\u0027\u0027operator_roles\": \u0027role1, role2\u0027,"},{"line_number":1524,"context_line":"                \"\u0027\u0027service_roles\": \u0027role3, role4\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_43832e56","line":1521,"updated":"2015-01-22 19:02:56.000000000","message":"ok","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":1525,"context_line":"                \u0027PRE2_operator_roles\u0027: \u0027role5\u0027,"},{"line_number":1526,"context_line":"                \u0027PRE2_service_roles\u0027: \u0027role6\u0027}"},{"line_number":1527,"context_line":"        test_auth \u003d keystoneauth.filter_factory(conf)(FakeApp())"},{"line_number":1528,"context_line":"        print(\u0027DEBUGDMC: rules: %s\u0027 % test_auth.account_rules)"},{"line_number":1529,"context_line":"        self.assertEquals(set([\u0027admin\u0027, \u0027swiftoperator\u0027]),"},{"line_number":1530,"context_line":"                          set(test_auth.account_rules[\u0027AUTH_\u0027].get("},{"line_number":1531,"context_line":"                              \u0027operator_roles\u0027)))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_3941f45a","line":1528,"updated":"2015-01-22 19:02:56.000000000","message":"stray print","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":1525,"context_line":"                \u0027PRE2_operator_roles\u0027: \u0027role5\u0027,"},{"line_number":1526,"context_line":"                \u0027PRE2_service_roles\u0027: \u0027role6\u0027}"},{"line_number":1527,"context_line":"        test_auth \u003d keystoneauth.filter_factory(conf)(FakeApp())"},{"line_number":1528,"context_line":"        print(\u0027DEBUGDMC: rules: %s\u0027 % test_auth.account_rules)"},{"line_number":1529,"context_line":"        self.assertEquals(set([\u0027admin\u0027, \u0027swiftoperator\u0027]),"},{"line_number":1530,"context_line":"                          set(test_auth.account_rules[\u0027AUTH_\u0027].get("},{"line_number":1531,"context_line":"                              \u0027operator_roles\u0027)))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_859dba0c","line":1528,"in_reply_to":"1a930d6b_3941f45a","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":1545,"context_line":"        self.assertEqual(swift_info.get(\u0027reseller_prefixes\u0027),"},{"line_number":1546,"context_line":"                         [\"AUTH_\", \u0027\u0027, \"PRE2_\"])"},{"line_number":1547,"context_line":""},{"line_number":1548,"context_line":"    def test_stray_comma(self):"},{"line_number":1549,"context_line":"        conf \u003d {\u0027reseller_prefix\u0027: \"AUTH ,, PRE2\","},{"line_number":1550,"context_line":"                \"\u0027\u0027operator_roles\": \u0027role1, role2\u0027,"},{"line_number":1551,"context_line":"                \"\u0027\u0027service_roles\": \u0027role3, role4\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_238c627f","line":1548,"updated":"2015-01-22 19:02:56.000000000","message":"ok","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":1552,"context_line":"                \u0027PRE2_operator_roles\u0027: \u0027role5\u0027,"},{"line_number":1553,"context_line":"                \u0027PRE2_service_roles\u0027: \u0027role6\u0027}"},{"line_number":1554,"context_line":"        test_auth \u003d keystoneauth.filter_factory(conf)(FakeApp())"},{"line_number":1555,"context_line":"        print(\u0027DEBUGDMC: rules: %s\u0027 % test_auth.account_rules)"},{"line_number":1556,"context_line":"        self.assertEquals(set([\u0027admin\u0027, \u0027swiftoperator\u0027]),"},{"line_number":1557,"context_line":"                          set(test_auth.account_rules[\u0027AUTH_\u0027].get("},{"line_number":1558,"context_line":"                              \u0027operator_roles\u0027)))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_79229cba","line":1555,"updated":"2015-01-22 19:02:56.000000000","message":"stray print","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":1566,"context_line":"        self.assertEqual(swift_info.get(\u0027reseller_prefixes\u0027),"},{"line_number":1567,"context_line":"                         [\u0027AUTH_\u0027, \u0027PRE2_\u0027])"},{"line_number":1568,"context_line":""},{"line_number":1569,"context_line":"    def test_multiple_stray_commas_resellers(self):"},{"line_number":1570,"context_line":"        conf \u003d {\u0027reseller_prefix\u0027: \u0027 , , ,\u0027}"},{"line_number":1571,"context_line":"        test_auth \u003d keystoneauth.filter_factory(conf)(FakeApp())"},{"line_number":1572,"context_line":"        self.assertEquals(set([\u0027admin\u0027, \u0027swiftoperator\u0027]),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_e3bfbafa","line":1569,"updated":"2015-01-22 19:02:56.000000000","message":"ok","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":1577,"context_line":"        swift_info \u003d get_swift_info().get(\u0027keystoneauth\u0027)"},{"line_number":1578,"context_line":"        self.assertEqual(swift_info.get(\u0027reseller_prefixes\u0027), [\u0027\u0027])"},{"line_number":1579,"context_line":""},{"line_number":1580,"context_line":"    def test_unprefixed_options(self):"},{"line_number":1581,"context_line":"        conf \u003d {\u0027reseller_prefix\u0027: \"AUTH , \u0027\u0027, PRE2\","},{"line_number":1582,"context_line":"                \"operator_roles\": \u0027role1, role2\u0027,"},{"line_number":1583,"context_line":"                \"service_roles\": \u0027role3, role4\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_c372be7b","line":1580,"updated":"2015-01-22 19:02:56.000000000","message":"ok","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"da86d52c_d9d19a58","updated":"2015-02-03 15:16:01.000000000","message":"ok","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"}],"test/unit/common/middleware/test_tempauth.py":[{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"7303524c9ee5382046fbbf42cc3a6e008aa3813f","unresolved":false,"context_lines":[{"line_number":918,"context_line":"        self.assertEquals(result, False)"},{"line_number":919,"context_line":"        result \u003d ath.i_am_definitive_auth(path\u003d\u0027/v1/BLAH_test\u0027)"},{"line_number":920,"context_line":"        self.assertEquals(result, False)"},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"    def test_underscrore_prefix(self):"},{"line_number":923,"context_line":"        ath \u003d auth.filter_factory({\u0027reseller_prefix\u0027: \u0027\u0027})(FakeApp())"},{"line_number":924,"context_line":"        result \u003d ath.i_am_definitive_auth(path\u003d\u0027/v1/test\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_97e73ae4","line":921,"updated":"2015-01-21 11:37:17.000000000","message":"Typo in \"underscrore\". Anyway, this should be called \"test_blank_prefix\" (underscore is a legacy of draft 2)","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":918,"context_line":"        self.assertEquals(result, False)"},{"line_number":919,"context_line":"        result \u003d ath.i_am_definitive_auth(path\u003d\u0027/v1/BLAH_test\u0027)"},{"line_number":920,"context_line":"        self.assertEquals(result, False)"},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"    def test_underscrore_prefix(self):"},{"line_number":923,"context_line":"        ath \u003d auth.filter_factory({\u0027reseller_prefix\u0027: \u0027\u0027})(FakeApp())"},{"line_number":924,"context_line":"        result \u003d ath.i_am_definitive_auth(path\u003d\u0027/v1/test\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_67e5fb07","line":921,"in_reply_to":"1a930d6b_97e73ae4","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"da86d52c_d9d43a22","updated":"2015-02-03 15:16:01.000000000","message":"ok","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2011-2014 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_d9bb5ae3","line":1,"updated":"2015-02-03 15:16:01.000000000","message":"nit: 2015","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2011-2014 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_491f665b","line":1,"in_reply_to":"da86d52c_d9bb5ae3","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        d \u003d \u0027swift.cache:: \u0027"},{"line_number":58,"context_line":"        for key in self.store:"},{"line_number":59,"context_line":"            d \u003d d + \u0027 %s: %s \u0027 % (key, self.store[key])"},{"line_number":60,"context_line":"        return d"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"class FakeApp(object):"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_59cbea52","line":60,"updated":"2015-02-03 15:16:01.000000000","message":"does this get used anywhere?","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        d \u003d \u0027swift.cache:: \u0027"},{"line_number":58,"context_line":"        for key in self.store:"},{"line_number":59,"context_line":"            d \u003d d + \u0027 %s: %s \u0027 % (key, self.store[key])"},{"line_number":60,"context_line":"        return d"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"class FakeApp(object):"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_c98ef678","line":60,"in_reply_to":"da86d52c_59cbea52","updated":"2015-02-06 08:56:33.000000000","message":"I believe I needed it for tempory debug which I\u0027ve since removed","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[{"line_number":905,"context_line":"        self.test_auth \u003d auth.filter_factory("},{"line_number":906,"context_line":"            {\u0027reseller_prefix\u0027: \u0027AUTH_, SOMEOTHER_\u0027})(FakeApp())"},{"line_number":907,"context_line":""},{"line_number":908,"context_line":"    def _make_request(self, path, **kwargs):"},{"line_number":909,"context_line":"        req \u003d Request.blank(path, **kwargs)"},{"line_number":910,"context_line":"        req.environ[\u0027swift.cache\u0027] \u003d FakeMemcache()"},{"line_number":911,"context_line":"        return req"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_19ea5275","line":908,"updated":"2015-02-03 15:16:01.000000000","message":"method not used","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":905,"context_line":"        self.test_auth \u003d auth.filter_factory("},{"line_number":906,"context_line":"            {\u0027reseller_prefix\u0027: \u0027AUTH_, SOMEOTHER_\u0027})(FakeApp())"},{"line_number":907,"context_line":""},{"line_number":908,"context_line":"    def _make_request(self, path, **kwargs):"},{"line_number":909,"context_line":"        req \u003d Request.blank(path, **kwargs)"},{"line_number":910,"context_line":"        req.environ[\u0027swift.cache\u0027] \u003d FakeMemcache()"},{"line_number":911,"context_line":"        return req"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_4925a65a","line":908,"in_reply_to":"da86d52c_19ea5275","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[{"line_number":910,"context_line":"        req.environ[\u0027swift.cache\u0027] \u003d FakeMemcache()"},{"line_number":911,"context_line":"        return req"},{"line_number":912,"context_line":""},{"line_number":913,"context_line":"    def test_noresller_prefix(self):"},{"line_number":914,"context_line":"        ath \u003d auth.filter_factory({\u0027reseller_prefix\u0027: \u0027\u0027})(FakeApp())"},{"line_number":915,"context_line":"        result \u003d ath.i_am_definitive_auth(path\u003d\u0027/v1/test\u0027)"},{"line_number":916,"context_line":"        self.assertEquals(result, False)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_d9619a3a","line":913,"updated":"2015-02-03 15:16:01.000000000","message":"nit: typo_noreseller_","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":910,"context_line":"        req.environ[\u0027swift.cache\u0027] \u003d FakeMemcache()"},{"line_number":911,"context_line":"        return req"},{"line_number":912,"context_line":""},{"line_number":913,"context_line":"    def test_noresller_prefix(self):"},{"line_number":914,"context_line":"        ath \u003d auth.filter_factory({\u0027reseller_prefix\u0027: \u0027\u0027})(FakeApp())"},{"line_number":915,"context_line":"        result \u003d ath.i_am_definitive_auth(path\u003d\u0027/v1/test\u0027)"},{"line_number":916,"context_line":"        self.assertEquals(result, False)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_ffeb6c10","line":913,"in_reply_to":"da86d52c_d9619a3a","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[{"line_number":926,"context_line":"        result \u003d ath.i_am_definitive_auth(path\u003d\u0027/v1/AUTH_test\u0027)"},{"line_number":927,"context_line":"        self.assertEquals(result, False)"},{"line_number":928,"context_line":"        result \u003d ath.i_am_definitive_auth(path\u003d\u0027/v1/BLAH_test\u0027)"},{"line_number":929,"context_line":"        self.assertEquals(result, False)"},{"line_number":930,"context_line":"        ath \u003d auth.filter_factory({\u0027reseller_prefix\u0027:"},{"line_number":931,"context_line":"                                   \" \u0027\u0027, SOMEOTHER\"})(FakeApp())"},{"line_number":932,"context_line":"        result \u003d ath.i_am_definitive_auth(path\u003d\u0027/v1/test\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_7908ae2d","line":929,"updated":"2015-02-03 15:16:01.000000000","message":"7 lines above duplicate test_noresller_prefix()","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":926,"context_line":"        result \u003d ath.i_am_definitive_auth(path\u003d\u0027/v1/AUTH_test\u0027)"},{"line_number":927,"context_line":"        self.assertEquals(result, False)"},{"line_number":928,"context_line":"        result \u003d ath.i_am_definitive_auth(path\u003d\u0027/v1/BLAH_test\u0027)"},{"line_number":929,"context_line":"        self.assertEquals(result, False)"},{"line_number":930,"context_line":"        ath \u003d auth.filter_factory({\u0027reseller_prefix\u0027:"},{"line_number":931,"context_line":"                                   \" \u0027\u0027, SOMEOTHER\"})(FakeApp())"},{"line_number":932,"context_line":"        result \u003d ath.i_am_definitive_auth(path\u003d\u0027/v1/test\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_5f455815","line":929,"in_reply_to":"da86d52c_7908ae2d","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[{"line_number":1464,"context_line":"             \u0027PRE2_require_group\u0027: \u0027.service\u0027},"},{"line_number":1465,"context_line":"            \u0027acct:joe,acct,AUTH_acct,PRE2_acct\u0027,"},{"line_number":1466,"context_line":"            \u0027/v1/PRE2_acct\u0027)"},{"line_number":1467,"context_line":"        self.assertEqual(resp.status_int, 403)"},{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"        # User puts token in both X-Auth-Token and X-Service-Token"},{"line_number":1470,"context_line":"        resp \u003d self._make_authed_request("}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_cf00e803","line":1467,"updated":"2015-02-03 15:16:01.000000000","message":"lines 1462-1467 \u003d\u003d 1454-1459","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":1464,"context_line":"             \u0027PRE2_require_group\u0027: \u0027.service\u0027},"},{"line_number":1465,"context_line":"            \u0027acct:joe,acct,AUTH_acct,PRE2_acct\u0027,"},{"line_number":1466,"context_line":"            \u0027/v1/PRE2_acct\u0027)"},{"line_number":1467,"context_line":"        self.assertEqual(resp.status_int, 403)"},{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"        # User puts token in both X-Auth-Token and X-Service-Token"},{"line_number":1470,"context_line":"        resp \u003d self._make_authed_request("}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_e6e04998","line":1467,"in_reply_to":"da86d52c_cf00e803","updated":"2015-02-06 08:56:33.000000000","message":"Yes. In unit test terms, both scenarios are identical -- fixed","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[{"line_number":1470,"context_line":"        resp \u003d self._make_authed_request("},{"line_number":1471,"context_line":"            {\u0027reseller_prefix\u0027: \u0027AUTH, PRE2\u0027,"},{"line_number":1472,"context_line":"             \u0027PRE2_require_group\u0027: \u0027.service\u0027},"},{"line_number":1473,"context_line":"            \u0027acct:joe,acct,AUTH_acct,PRE2_acct,AUTH_acct,PRE2_acct\u0027,"},{"line_number":1474,"context_line":"            \u0027/v1/PRE2_acct\u0027)"},{"line_number":1475,"context_line":"        self.assertEqual(resp.status_int, 403)"},{"line_number":1476,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_6fab7cd6","line":1473,"updated":"2015-02-03 15:16:01.000000000","message":"is it correct that the groups \u0027AUTH_acct,PRE2_acct\u0027 are repeated here","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":1470,"context_line":"        resp \u003d self._make_authed_request("},{"line_number":1471,"context_line":"            {\u0027reseller_prefix\u0027: \u0027AUTH, PRE2\u0027,"},{"line_number":1472,"context_line":"             \u0027PRE2_require_group\u0027: \u0027.service\u0027},"},{"line_number":1473,"context_line":"            \u0027acct:joe,acct,AUTH_acct,PRE2_acct,AUTH_acct,PRE2_acct\u0027,"},{"line_number":1474,"context_line":"            \u0027/v1/PRE2_acct\u0027)"},{"line_number":1475,"context_line":"        self.assertEqual(resp.status_int, 403)"},{"line_number":1476,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_064d5d9a","line":1473,"in_reply_to":"da86d52c_6fab7cd6","updated":"2015-02-06 08:56:33.000000000","message":"Yes. See line 239 in swift/common/middleware/tempauth.py","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":815,"context_line":"        self.assertEquals(groups, \u0027test,test:tester,AUTH_test\u0027)"},{"line_number":816,"context_line":""},{"line_number":817,"context_line":"        ath.users \u003d {\u0027test:tester\u0027: {\u0027groups\u0027: []}}"},{"line_number":818,"context_line":"        groups \u003d ath._get_user_groups(\u0027test\u0027, \u0027test:tester\u0027)"},{"line_number":819,"context_line":"        self.assertEquals(groups, \u0027test,test:tester\u0027)"},{"line_number":820,"context_line":""},{"line_number":821,"context_line":"    def test_auth_scheme(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_9b509b5f","line":818,"updated":"2015-02-19 07:08:12.000000000","message":"so sad the only test for that account_id was so non-descriptive :\u0027(","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":1347,"context_line":"        self.assertEquals(test_auth._get_account_prefix("},{"line_number":1348,"context_line":"                          \u00271234\u0027), \u0027\u0027)"},{"line_number":1349,"context_line":"        self.assertEquals(test_auth._get_account_prefix("},{"line_number":1350,"context_line":"                          \u0027JUNK_1234\u0027), \u0027\u0027)  # yes, it should return \u0027\u0027"},{"line_number":1351,"context_line":""},{"line_number":1352,"context_line":"    def test_multiple_resellers(self):"},{"line_number":1353,"context_line":"        conf \u003d {\u0027reseller_prefix\u0027: \u0027AUTH, PRE2\u0027}"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_fbefd784","line":1350,"updated":"2015-02-19 07:08:12.000000000","message":"lol","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"}],"test/unit/common/middleware/test_tempurl.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":5,"context_line":"# Copyright (c) 2013 Alex Gaynor"},{"line_number":6,"context_line":"# Copyright (c) 2013 Chuck Thier"},{"line_number":7,"context_line":"# Copyright (c) 2013 David Goetz"},{"line_number":8,"context_line":"# Copyright (c) 2013-2014 Donagh McCabe"},{"line_number":9,"context_line":"# Copyright (c) 2013 Greg Lange"},{"line_number":10,"context_line":"# Copyright (c) 2013 John Dickinson"},{"line_number":11,"context_line":"# Copyright (c) 2013 Kun Huang"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_e60ee831","line":8,"updated":"2015-01-22 19:02:56.000000000","message":"Its 2015 now :)","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"96aabcc1587bfa60d397f7e28f8a3d6d039880a3","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        # filter factory above. However, that would change all paths to be"},{"line_number":73,"context_line":"        # something such as /v1/a_/c/o."},{"line_number":74,"context_line":"        self.auth.reseller_prefix \u003d \u0027a\u0027"},{"line_number":75,"context_line":"        self.auth.reseller_prefixes \u003d [\u0027a\u0027]"},{"line_number":76,"context_line":"        self.tempurl \u003d tempurl.filter_factory({})(self.auth)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def _make_request(self, path, environ\u003dNone, keys\u003d(), **kwargs):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_86ffe466","line":75,"updated":"2015-01-22 19:02:56.000000000","message":"I haven\u0027t studied *why*, but the tests all pass if you simply set an empty prefix:\n\n  self.auth \u003d tempauth.filter_factory({\u0027reseller_prefix\u0027: \u0027\u0027})(self.app)\n\npresumably because the \u0027a\u0027 part of the paths the gets treated as the tenant name?\n\nSo maybe none of the hackery is needed.","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"774a984a4ba61abedb32348f9ee0fa4505673b65","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        # filter factory above. However, that would change all paths to be"},{"line_number":73,"context_line":"        # something such as /v1/a_/c/o."},{"line_number":74,"context_line":"        self.auth.reseller_prefix \u003d \u0027a\u0027"},{"line_number":75,"context_line":"        self.auth.reseller_prefixes \u003d [\u0027a\u0027]"},{"line_number":76,"context_line":"        self.tempurl \u003d tempurl.filter_factory({})(self.auth)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def _make_request(self, path, environ\u003dNone, keys\u003d(), **kwargs):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_a85a8b27","line":75,"in_reply_to":"1a930d6b_86ffe466","updated":"2015-01-27 12:53:19.000000000","message":"Done","commit_id":"30412d699238eb769d60e90b8132f897183fe32f"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"da86d52c_59b04a43","updated":"2015-02-03 15:16:01.000000000","message":"ok","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[{"line_number":2766,"context_line":"        conf \u003d {}"},{"line_number":2767,"context_line":"        prefixes, options \u003d utils.config_read_reseller_options("},{"line_number":2768,"context_line":"            conf, self.default_rules)"},{"line_number":2769,"context_line":"        self.assertEqual(prefixes, [\u0027AUTH_\u0027])"},{"line_number":2770,"context_line":"        self.assertEqual(options[\u0027AUTH_\u0027].get(\u0027operator_roles\u0027),"},{"line_number":2771,"context_line":"                         self.default_rules.get(\u0027operator_roles\u0027))"},{"line_number":2772,"context_line":"        self.assertEqual(options[\u0027AUTH_\u0027].get(\u0027service_roles\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_b6f8754a","line":2769,"updated":"2015-02-03 15:16:01.000000000","message":"nit: you could save some lines using:\n\n  self.assertEqual(options[\u0027AUTH_\u0027], self.default_rules)","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":2766,"context_line":"        conf \u003d {}"},{"line_number":2767,"context_line":"        prefixes, options \u003d utils.config_read_reseller_options("},{"line_number":2768,"context_line":"            conf, self.default_rules)"},{"line_number":2769,"context_line":"        self.assertEqual(prefixes, [\u0027AUTH_\u0027])"},{"line_number":2770,"context_line":"        self.assertEqual(options[\u0027AUTH_\u0027].get(\u0027operator_roles\u0027),"},{"line_number":2771,"context_line":"                         self.default_rules.get(\u0027operator_roles\u0027))"},{"line_number":2772,"context_line":"        self.assertEqual(options[\u0027AUTH_\u0027].get(\u0027service_roles\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_df722810","line":2769,"in_reply_to":"da86d52c_b6f8754a","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[{"line_number":2780,"context_line":"        prefixes, options \u003d utils.config_read_reseller_options("},{"line_number":2781,"context_line":"            conf, self.default_rules)"},{"line_number":2782,"context_line":"        self.assertEqual(prefixes, [\u0027AUTH_\u0027])"},{"line_number":2783,"context_line":"        self.assertEqual(options[\u0027AUTH_\u0027].get(\u0027operator_roles\u0027),"},{"line_number":2784,"context_line":"                         self.default_rules.get(\u0027operator_roles\u0027))"},{"line_number":2785,"context_line":"        self.assertEqual(options[\u0027AUTH_\u0027].get(\u0027service_roles\u0027),"},{"line_number":2786,"context_line":"                         self.default_rules.get(\u0027service_roles\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_f61cad79","line":2783,"updated":"2015-02-03 15:16:01.000000000","message":"ditto","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":2780,"context_line":"        prefixes, options \u003d utils.config_read_reseller_options("},{"line_number":2781,"context_line":"            conf, self.default_rules)"},{"line_number":2782,"context_line":"        self.assertEqual(prefixes, [\u0027AUTH_\u0027])"},{"line_number":2783,"context_line":"        self.assertEqual(options[\u0027AUTH_\u0027].get(\u0027operator_roles\u0027),"},{"line_number":2784,"context_line":"                         self.default_rules.get(\u0027operator_roles\u0027))"},{"line_number":2785,"context_line":"        self.assertEqual(options[\u0027AUTH_\u0027].get(\u0027service_roles\u0027),"},{"line_number":2786,"context_line":"                         self.default_rules.get(\u0027service_roles\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_9f6c3037","line":2783,"in_reply_to":"da86d52c_f61cad79","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[{"line_number":2792,"context_line":"        prefixes, options \u003d utils.config_read_reseller_options("},{"line_number":2793,"context_line":"            conf, self.default_rules)"},{"line_number":2794,"context_line":"        self.assertEqual(prefixes, [\u0027\u0027])"},{"line_number":2795,"context_line":"        self.assertEqual(options[\u0027\u0027].get(\u0027operator_roles\u0027),"},{"line_number":2796,"context_line":"                         self.default_rules.get(\u0027operator_roles\u0027))"},{"line_number":2797,"context_line":"        self.assertEqual(options[\u0027\u0027].get(\u0027service_roles\u0027),"},{"line_number":2798,"context_line":"                         self.default_rules.get(\u0027service_roles\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_9607f11b","line":2795,"updated":"2015-02-03 15:16:01.000000000","message":"ditto","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":2792,"context_line":"        prefixes, options \u003d utils.config_read_reseller_options("},{"line_number":2793,"context_line":"            conf, self.default_rules)"},{"line_number":2794,"context_line":"        self.assertEqual(prefixes, [\u0027\u0027])"},{"line_number":2795,"context_line":"        self.assertEqual(options[\u0027\u0027].get(\u0027operator_roles\u0027),"},{"line_number":2796,"context_line":"                         self.default_rules.get(\u0027operator_roles\u0027))"},{"line_number":2797,"context_line":"        self.assertEqual(options[\u0027\u0027].get(\u0027service_roles\u0027),"},{"line_number":2798,"context_line":"                         self.default_rules.get(\u0027service_roles\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_7f6f7c2b","line":2795,"in_reply_to":"da86d52c_9607f11b","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8b320cca6c97adaa1fe7cc053e53cab17efed66a","unresolved":false,"context_lines":[{"line_number":2920,"context_line":"        prefixes, options \u003d utils.config_read_reseller_options("},{"line_number":2921,"context_line":"            conf, self.default_rules)"},{"line_number":2922,"context_line":"        self.assertEqual(prefixes, [\u0027\u0027])"},{"line_number":2923,"context_line":"        self.assertEqual(options[\u0027\u0027].get(\u0027operator_roles\u0027),"},{"line_number":2924,"context_line":"                         self.default_rules.get(\u0027operator_roles\u0027))"},{"line_number":2925,"context_line":"        self.assertEqual(options[\u0027\u0027].get(\u0027service_roles\u0027),"},{"line_number":2926,"context_line":"                         self.default_rules.get(\u0027service_roles\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_d9751a99","line":2923,"updated":"2015-02-03 15:16:01.000000000","message":"ditto","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"717234ac973dd921514112be125a7395dbc8a52c","unresolved":false,"context_lines":[{"line_number":2920,"context_line":"        prefixes, options \u003d utils.config_read_reseller_options("},{"line_number":2921,"context_line":"            conf, self.default_rules)"},{"line_number":2922,"context_line":"        self.assertEqual(prefixes, [\u0027\u0027])"},{"line_number":2923,"context_line":"        self.assertEqual(options[\u0027\u0027].get(\u0027operator_roles\u0027),"},{"line_number":2924,"context_line":"                         self.default_rules.get(\u0027operator_roles\u0027))"},{"line_number":2925,"context_line":"        self.assertEqual(options[\u0027\u0027].get(\u0027service_roles\u0027),"},{"line_number":2926,"context_line":"                         self.default_rules.get(\u0027service_roles\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_ff7b6cf2","line":2923,"in_reply_to":"da86d52c_d9751a99","updated":"2015-02-06 08:56:33.000000000","message":"Done","commit_id":"2cc9eecbd146e8e5ba344b47f7003f200f2428f3"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"550714da5bea518dd46b0850ab99a2123f7fb9ce","unresolved":false,"context_lines":[{"line_number":2787,"context_line":""},{"line_number":2788,"context_line":"    def test_single_blank_reseller_with_conf(self):"},{"line_number":2789,"context_line":"        conf \u003d {\u0027reseller_prefix\u0027: \u0027\u0027,"},{"line_number":2790,"context_line":"                \"\u0027\u0027operator_roles\": \u0027role1, role2\u0027}"},{"line_number":2791,"context_line":"        prefixes, options \u003d utils.config_read_reseller_options("},{"line_number":2792,"context_line":"            conf, self.default_rules)"},{"line_number":2793,"context_line":"        self.assertEqual(prefixes, [\u0027\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_3baecf81","line":2790,"updated":"2015-02-19 07:08:12.000000000","message":"oh man, i sure hope no one ever tries to actually configure this - thanks for the test!","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"cb47bfa5c6afe1e3211491b90b719c80e8f00984","unresolved":false,"context_lines":[{"line_number":2787,"context_line":""},{"line_number":2788,"context_line":"    def test_single_blank_reseller_with_conf(self):"},{"line_number":2789,"context_line":"        conf \u003d {\u0027reseller_prefix\u0027: \u0027\u0027,"},{"line_number":2790,"context_line":"                \"\u0027\u0027operator_roles\": \u0027role1, role2\u0027}"},{"line_number":2791,"context_line":"        prefixes, options \u003d utils.config_read_reseller_options("},{"line_number":2792,"context_line":"            conf, self.default_rules)"},{"line_number":2793,"context_line":"        self.assertEqual(prefixes, [\u0027\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_020d05e8","line":2790,"in_reply_to":"da86d52c_3baecf81","updated":"2015-02-19 17:57:47.000000000","message":"The empty reseller prefix was the bane of my life -- however, it turns outI know if a public cloud that works that way!","commit_id":"d1ec61d5fab63b18e6f74b3f928802850341e636"}]}
