Categorygithub.com/Seagate/kmip-go
modulepackage
1.1.2
Repository: https://github.com/seagate/kmip-go.git
Documentation: pkg.go.dev

# README

kmip-go GoDoc Go Report Card Build

kmip-go is a go implemenation of KMIP protocol primitives. It supports marshaling data in TTLV, XML, or JSON encodings to and from go values and structs. It can be used to implement KMIP clients or servers.

Installation

go get github.com/Seagate/kmip-go

Or, to just install the ppkmip pretty printing tool:

go install github.com/Seagate/kmip-go/cmd/ppkmip

Packages

The ttlv package implements the core encoder and decoder logic.

The kmip14 package contains constants for all the tags, types, enumerations and bitmasks defined in the KMIP 1.4 specification. It also contains mappings from these values to the normalized names used in the JSON and XML encodings, and the canonical names used in Attribute structures.
The kmip14 definitions are all automatically registered with ttlv.DefaultRegistry.

The kmip20 package adds additional enumeration values from the 2.0 specification. It is meant to be registered on top of the 1.4 definitions.

The root package defines golang structures for some of the significant Structure definitions in the 1.4 specification, like Attributes, Request, Response, etc. It is incomplete, but can be used as an example for defining other structures. It also contains an example of a client and server.

cmd/kmipgen is a code generation tool which generates the tag and enum constants from a JSON specification input. It can also be used independently in your own code to generate additional tags and constants. make install to build and install the tool. See kmip14/kmip_1_4.go for an example of using the tool.

cmd/kmipgen is a tool for pretty printing kmip values. It can accept KMIP input from stdin or files, encoded in TTLV, XML, or JSON, and output in a variety of formats. make install to intall the tool, and ppkmip --help to see usage.

Contributing

To build, be sure to have a recent go SDK, and make. Run make tools to install other dependencies.

There is also a dockerized build, which only requires make and docker-compose: make docker. You can also do make fish or make bash to shell into the docker build container.

Merge requests are welcome! Before submitting, please run make and make sure all tests pass and there are no linter findings.

# Packages

No description provided by the author
Code generated by kmipgen; DO NOT EDIT.
nolint:dupl.
No description provided by the author
Package ttlv encodes and decodes the 3 wire formats defined in the KMIP specification: 1.

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

DefaultErrorHandler tries to map errors to ResultReasons.
No description provided by the author
No description provided by the author
No description provided by the author
ErrServerClosed is returned by the Server's Serve, ServeTLS, ListenAndServe, and ListenAndServeTLS methods after a call to Shutdown or Close.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
AttestationCredentialValue 2.1.2 Table 6 If the Credential Type in the Credential is Attestation, then Credential Value is a structure as shown in Table 6.
Attribute 2.1.1 Table 2 An Attribute object is a structure (see Table 2) used for sending and receiving Managed Object attributes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CreateKeyPairRequestPayload 4.2 Create Key Pair This operation requests the server to generate a new public/private key pair and register the two corresponding new Managed Cryptographic Objects.
No description provided by the author
CreateRequestPayload 4.1 Table 163 TemplateAttribute MUST include CryptographicAlgorithm (3.4) and CryptographicUsageMask (3.19).
CreateResponsePayload 4.1 Table 164.
Credential 2.1.2 Table 3 A Credential is a structure (see Table 3) used for client identification purposes and is not managed by the key management system (e.g., user id/password pairs, Kerberos tokens, etc.).
Cryptographic Parameters 3.6 Table 65 The Cryptographic Parameters attribute is a structure (see Table 65) that contains a set of OPTIONAL fields that describe certain cryptographic parameters to be used when performing cryptographic operations using the object.
No description provided by the author
DestroyRequestPayload ////////////////////////////////////////.
DestroyResponsePayload.
DeviceCredentialValue 2.1.2 Table 5 If the Credential Type in the Credential is Device, then Credential Value is a structure as shown in Table 5.
No description provided by the author
No description provided by the author
No description provided by the author
EncryptionKeyInformation 2.1.5 Table 10.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetRequestPayload ////////////////////////////////////////.
GetResponsePayload.
KeyBlock 2.1.3 Table 7 A Key Block object is a structure (see Table 7) used to encapsulate all of the information that is closely associated with a cryptographic key.
KeyValue 2.1.4 Table 8 The Key Value is used only inside a Key Block and is either a Byte String or a structure (see Table 8): - The Key Value structure contains the key material, either as a byte string or as a Transparent Key structure (see Section 2.1.7), and OPTIONAL attribute information that is associated and encapsulated with the key material.
KeyWrappingData 2.1.5 Table 9 The Key Block MAY also supply OPTIONAL information about a cryptographic key wrapping mechanism used to wrap the Key Value.
No description provided by the author
No description provided by the author
No description provided by the author
MACSignatureKeyInformation 2.1.5 Table 11.
No description provided by the author
Name 3.2 Table 57 The Name attribute is a structure (see Table 57) used to identify and locate an object.
No description provided by the author
No description provided by the author
OperationMux is an implementation of MessageHandler which handles each batch item in the request by routing the operation to an ItemHandler.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReKeyRequestPayload ////////////////////////////////////////.
ReKeyResponsePayload.
Request represents a KMIP request.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Server serves KMIP protocol connections from a net.Listener.
No description provided by the author
StandardProtocolHandler is the default ProtocolHandler implementation.
No description provided by the author
No description provided by the author
TemplateAttribute 2.1.8 Table 29 The Template Managed Object is deprecated as of version 1.3 of this specification and MAY be removed from subsequent versions of the specification.
TransparentDHPrivateKey 2.1.7.6 Table 19 If the Key Format Type in the Key Block is Transparent DH Private Key, then Key Material is a structure as shown in Table 19.
TransparentDHPublicKey 2.1.7.7 Table 20 If the Key Format Type in the Key Block is Transparent DH Public Key, then Key Material is a structure as shown in Table 20.
TransparentDSAPrivateKey 2.1.7.2 Table 15 If the Key Format Type in the Key Block is Transparent DSA Private Key, then Key Material is a structure as shown in Table 15.
TransparentDSAPublicKey 2.1.7.3 Table 16 If the Key Format Type in the Key Block is Transparent DSA Public Key, then Key Material is a structure as shown in Table 16.
TransparentECDSAPrivateKey 2.1.7.8 Table 21 The Transparent ECDSA Private Key structure is deprecated as of version 1.3 of this specification and MAY be removed from subsequent versions of the specification.
TransparentECDSAPublicKey 2.1.7.9 Table 22 The Transparent ECDSA Public Key structure is deprecated as of version 1.3 of this specification and MAY be removed from subsequent versions of the specification.
TransparentECPrivateKey 2.1.7.14 Table 27 If the Key Format Type in the Key Block is Transparent EC Private Key, then Key Material is a structure as shown in Table 27.
TransparentECPublicKey 2.1.7.15 Table 28 If the Key Format Type in the Key Block is Transparent EC Public Key, then Key Material is a structure as shown in Table 28.
TransparentRSAPrivateKey 2.1.7.4 Table 17 If the Key Format Type in the Key Block is Transparent RSA Private Key, then Key Material is a structure as shown in Table 17.
TransparentRSAPublicKey 2.1.7.5 Table 18 If the Key Format Type in the Key Block is Transparent RSA Public Key, then Key Material is a structure as shown in Table 18.
TransparentSymmetricKey 2.1.7.1 Table 14 If the Key Format Type in the Key Block is Transparent Symmetric Key, then Key Material is a structure as shown in Table 14.
UsernameAndPasswordCredentialValue 2.1.2 Table 4 If the Credential Type in the Credential is Username and Password, then Credential Value is a structure as shown in Table 4.

# Interfaces

ErrorHandler converts a golang error into a *ResponseBatchItem (which should hold information about the error to convey back to the client).
ItemHandler handles a single batch item in a KMIP request.
MessageHandler handles KMIP requests which have already be decoded.
ProtocolHandler is responsible for handling raw requests read off the wire.
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TransparentECDHPrivateKey 2.1.7.10 Table 23 The Transparent ECDH Private Key structure is deprecated as of version 1.3 of this specification and MAY be removed from subsequent versions of the specification.
TransparentECDHPublicKey 2.1.7.11 Table 24 The Transparent ECDH Public Key structure is deprecated as of version 1.3 of this specification and MAY be removed from subsequent versions of the specification.
TransparentECMQVPrivateKey 2.1.7.12 Table 25 The Transparent ECMQV Private Key structure is deprecated as of version 1.3 of this specification and MAY be removed from subsequent versions of the specification.
TransparentECMQVPublicKey 2.1.7.13 Table 26 The Transparent ECMQV Public Key structure is deprecated as of version 1.3 of this specification and MAY be removed from subsequent versions of the specification.