Skip to content

Conversation

@PeterHamilton
Copy link
Contributor

This change fixes a bug with how key pair names are handled by the ProxyKmipClient. The original implementation stored key pair names in the 'names' field of the various template attributes used to define the key pair attributes. However, the 'names' field is meant for the names of existing template objects that should be used as another source for attribute values. Before KMIP 2.0 support was added, this worked because attributes and names were encoded the same way and were interpreted by the server correctly. The addition of KMIP 2.0 drops the 'names' field when handling template attributes, dropping the names from being sent to the server when creating new key pairs. This change fixes this and updates relevant client unit tests to detect this error in the future.

Fixes #560

This change fixes a bug with how key pair names are handled by the
ProxyKmipClient. The original implementation stored key pair names
in the 'names' field of the various template attributes used to
define the key pair attributes. However, the 'names' field is
meant for the names of existing template objects that should be
used as another source for attribute values. Before KMIP 2.0
support was added, this worked because attributes and names were
encoded the same way and were interpreted by the server correctly.
The addition of KMIP 2.0 drops the 'names' field when handling
template attributes, dropping the names from being sent to the
server when creating new key pairs. This change fixes this and
updates relevant client unit tests to detect this error in the
future.

Fixes #560
@codecov-io
Copy link

codecov-io commented Aug 23, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@16480bc). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master    #578   +/-   ##
========================================
  Coverage          ?     96%           
========================================
  Files             ?      75           
  Lines             ?   15582           
  Branches          ?       0           
========================================
  Hits              ?   14959           
  Misses            ?     623           
  Partials          ?       0
Impacted Files Coverage Δ
kmip/pie/client.py 99.35% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 16480bc...ecdd324. Read the comment docs.

@PeterHamilton PeterHamilton merged commit c1b816b into master Aug 23, 2019
@PeterHamilton PeterHamilton deleted the bug/fix-key-pair-names-kmip-2.0 branch August 23, 2019 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Name" attribute dropped from Public/Private Keys (KMIP 2.0)

3 participants