vault_plugin: TypeError: 'NoneType' object is not subscriptable on secret_store operation

Bug #1799132 reported by Frode Nordahl on 2018-10-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
High
Unassigned
Rocky
High
Unassigned
castellan
Undecided
Unassigned
python-castellan (Ubuntu)
High
Unassigned
Cosmic
High
Unassigned
Disco
High
Unassigned

Bug Description

Modified `castellan/key_manager/vault_key_manager.py` to get extra debug output below:
[Mon Oct 22 06:20:58.543811 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.543 5780 DEBUG barbican.model.repositories [req-04b83251-4b59-49ff-ad86-3af6eb98b9ec 6abd0959b63546d0bd4f4f4e5a84e485 b99281f6b15b453aa9140bf0622d689e - bb39d2073fa9418d9bb97897a7809a39 bb39d2073fa9418d9bb97897a7809a39] Getting session... get_session /usr/lib/python3/dist-packages/barbican/model/repositories.py:363\x1b[00m
[Mon Oct 22 06:20:58.605091 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] {'auth': None,
[Mon Oct 22 06:20:58.605138 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605395 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'data': {'accessor': 'kv_5b25ebdf',
[Mon Oct 22 06:20:58.605421 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605561 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'config': {'default_lease_ttl': 0,
[Mon Oct 22 06:20:58.605581 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605617 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'force_no_cache': False,
[Mon Oct 22 06:20:58.605638 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605674 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'max_lease_ttl': 0,
[Mon Oct 22 06:20:58.605688 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605730 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'plugin_name': ''},
[Mon Oct 22 06:20:58.605745 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605782 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'description': 'Charm created KV backend',
[Mon Oct 22 06:20:58.605816 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605851 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'local': False,
[Mon Oct 22 06:20:58.605864 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605899 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'options': None,
[Mon Oct 22 06:20:58.605913 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605948 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'path': 'charm-barbican-vault/',
[Mon Oct 22 06:20:58.605962 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605996 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'seal_wrap': False,
[Mon Oct 22 06:20:58.606010 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606050 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'type': 'kv'},
[Mon Oct 22 06:20:58.606063 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606099 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'lease_duration': 0,
[Mon Oct 22 06:20:58.606113 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606149 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'lease_id': '',
[Mon Oct 22 06:20:58.606163 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606196 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'renewable': False,
[Mon Oct 22 06:20:58.606210 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606246 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'request_id': '26a98ddc-d22d-04fa-b5ba-c78f9f264cfe',
[Mon Oct 22 06:20:58.606261 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606295 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'warnings': None,
[Mon Oct 22 06:20:58.606309 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606351 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'wrap_info': None}
[Mon Oct 22 06:20:58.608802 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store [req-04b83251-4b59-49ff-ad86-3af6eb98b9ec 6abd0959b63546d0bd4f4f4e5a84e485 b99281f6b15b453aa9140bf0622d689e - bb39d2073fa9418d9bb97897a7809a39 bb39d2073fa9418d9bb97897a7809a39] Error storing secret: 'NoneType' object is not subscriptable: TypeError: 'NoneType' object is not subscriptable
[Mon Oct 22 06:20:58.608841 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store Traceback (most recent call last):
[Mon Oct 22 06:20:58.608854 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store File "/usr/lib/python3/dist-packages/barbican/plugin/castellan_secret_store.py", line 86, in store_secret
[Mon Oct 22 06:20:58.608863 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store opaque_data.OpaqueData(secret_dto.secret)
[Mon Oct 22 06:20:58.608872 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store File "/usr/lib/python3/dist-packages/castellan/key_manager/vault_key_manager.py", line 321, in store
[Mon Oct 22 06:20:58.608896 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store return self._store_key_value(key_id, key_value)
[Mon Oct 22 06:20:58.608907 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store File "/usr/lib/python3/dist-packages/castellan/key_manager/vault_key_manager.py", line 286, in _store_key_value
[Mon Oct 22 06:20:58.608916 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store if self._get_api_version() != '1':
[Mon Oct 22 06:20:58.608925 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store File "/usr/lib/python3/dist-packages/castellan/key_manager/vault_key_manager.py", line 134, in _get_api_version
[Mon Oct 22 06:20:58.608935 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store self._vault_kv_version = resp.json()['data']['options']['version']
[Mon Oct 22 06:20:58.608944 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store TypeError: 'NoneType' object is not subscriptable
[Mon Oct 22 06:20:58.608956 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store \x1b[00m
[Mon Oct 22 06:20:58.608971 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.610925 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.609 5780 ERROR barbican.api.controllers [req-04b83251-4b59-49ff-ad86-3af6eb98b9ec 6abd0959b63546d0bd4f4f4e5a84e485 b99281f6b15b453aa9140bf0622d689e - bb39d2073fa9418d9bb97897a7809a39 bb39d2073fa9418d9bb97897a7809a39] Secret update failure seen - please contact site administrator.: barbican.plugin.interface.secret_store.SecretGeneralException: Problem seen during crypto processing - Reason: 'NoneType' object is not subscriptable

Corey Bryant (corey.bryant) wrote :

I wonder if this is limited to python 3.

Changed in python-castellan (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in cloud-archive:
status: New → Triaged
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers