Note that the certificate payload can be retrieved through the CLI without any issues, so it doesn't appear to be a problem with the creation of the certificate.
From python:
>>> certificate = barbican.secrets.get('http://localhost:9311/v1/secrets/8ec681e6-145d-4e72-99c7-8a354af6696f')
>>> certificate
Secret(secret_ref="http://localhost:9311/v1/secrets/8ec681e6-145d-4e72-99c7-8a354af6696f")
>>> certificate.payload
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/stack/python-barbicanclient/barbicanclient/secrets.py", line 188, in payload
self._fetch_payload()
File "/opt/stack/python-barbicanclient/barbicanclient/secrets.py", line 259, in _fetch_payload
payload = self._api._get_raw(payload_url, headers=headers)
File "/opt/stack/python-barbicanclient/barbicanclient/client.py", line 79, in _get_raw
return self.request(path, 'GET', *args, **kwargs).content
File "/opt/stack/python-barbicanclient/barbicanclient/client.py", line 63, in request
self._check_status_code(resp)
File "/opt/stack/python-barbicanclient/barbicanclient/client.py", line 103, in _check_status_code
status
barbicanclient.exceptions.HTTPClientError: Not Acceptable
>>> certificate.payload_content_type
u'application/pkix-cert'
>>>
Note that the certificate payload can be retrieved through the CLI without any issues, so it doesn't appear to be a problem with the creation of the certificate.
From CLI: localhost: 9311/v1/ secrets/ 8ec681e6- 145d-4e72- 99c7-8a354af669 6f --payload ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- + ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- + YIEMsaETJsaf+ z9ryNxkwDQYJKoZ IhvcNAQELBQAwXD ELMAkG | MBgNVBAgTBVVuc2 V0MQ4wDAYDVQQHE wVVbnNldDEOMAwG A1UE | bBgNVBAMTFFNuYW tlb2lsIENlcnRpZ mljYXRlMB4XDTE1 MDcy | 1MDcyOTE3NDI1N1 owKDEUMBIGA1UEC hMLZXhhbXBsZS5j b20x | lcnZlcjEwgZ8wDQ YJKoZIhvcNAQEBB QADgY0AMIGJAoGB AMuu | Vn5EnjlJqTsMjal +Hw1x0RLvCEgMPI Yj+qHzp2SFOh5g2 GUDz | /wWVXZe5l/ J/Pva0q1+ jOdMXI+ ozQnoA6wRYE2cO2 6fZLRUkW | 2H9VTAA5ygcff/ TdGrBcalhftAgMB AAEwDQYJKoZIhvc NAQEL | 4jwoINsts+ 9ynIUFSWjxBvb/ 89g0x2K/ Of3lXd1XfiqHI3o OXl | MYIFvgDr0zQwXDR pYPk26x7HhlPuHy DSp0KMruIOzkCUb jqfu | +HSpgLuigHXta9H 4GvCVvKzvgyRXt5 AgRifc1OkJO7rXW MQ7V | gT6P+BR460Sc8Ba 7U7AT+36IXIHS9U m2ndbNM3i+ Gy15/M5Aj | dokHQg+ kz1M9sgNzYEKkXC 5ivuwSJMwvB5J+ LjBkj/nSG5MsoIj u+a/+ | 2bUOHqnaZ4UIwzi g= | ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- +
~/devstack$ barbican secret get http://
Starting new HTTP connection (1): 10.109.24.227
Starting new HTTP connection (1): localhost
+------
| Field | Value |
+------
| Payload | -----BEGIN CERTIFICATE----- |
| | MIICgzCCAWsCECC
| | A1UEBhMCWFgxDjA
| | ChMFVW5zZXQxHTA
| | OTE3MzA0N1oXDTE
| | EDAOBgNVBAMTB3N
| | gzIK2zuz5p3qHfU
| | rk7zxXBt6K5e25W
| | QGcnLMgfzsnuRKT
| | BQADggEBAAmgO+
| | jpTfbwET7wiykc+
| | 6lttenTvqWloNrf
| | Z9z/XhIOHwyQpU1
| | ajAOWGB/
| | pQDNWViJBf2Edx3
| | -----END CERTIFICATE----- |
| | |
+------
~/devstack$
From python: secrets. get('http:// localhost: 9311/v1/ secrets/ 8ec681e6- 145d-4e72- 99c7-8a354af669 6f') localhost: 9311/v1/ secrets/ 8ec681e6- 145d-4e72- 99c7-8a354af669 6f") python- barbicanclient/ barbicanclient/ secrets. py", line 188, in payload _fetch_ payload( ) python- barbicanclient/ barbicanclient/ secrets. py", line 259, in _fetch_payload _get_raw( payload_ url, headers=headers) python- barbicanclient/ barbicanclient/ client. py", line 79, in _get_raw python- barbicanclient/ barbicanclient/ client. py", line 63, in request _check_ status_ code(resp) python- barbicanclient/ barbicanclient/ client. py", line 103, in _check_status_code exceptions. HTTPClientError : Not Acceptable payload_ content_ type pkix-cert'
>>> certificate = barbican.
>>> certificate
Secret(secret_ref="http://
>>> certificate.payload
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/stack/
self.
File "/opt/stack/
payload = self._api.
File "/opt/stack/
return self.request(path, 'GET', *args, **kwargs).content
File "/opt/stack/
self.
File "/opt/stack/
status
barbicanclient.
>>> certificate.
u'application/
>>>