Skip to content

Commit aa802a9

Browse files
Merge 5788711 into b2c7a25
2 parents b2c7a25 + 5788711 commit aa802a9

File tree

14 files changed

+813
-638
lines changed

14 files changed

+813
-638
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ Keyfactor Vault Secrets Engine Guide.docx
88
Makefile
99
sample_config.json
1010
README.md
11+
README.md

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
- 1.4.2
2+
- Updated the Hashicorp SDK libraries
3+
- Incorporated the Keyfactor GO SDK for authentication and interaction with the Command API
4+
15
- 1.4.1
26
- Updated CA and CA chain retreival to work for CA's hosted outside of Command (EJBCA)
37
- Updated Keyfactor Client library to 1.2.0

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,9 +620,12 @@ instance of the plugin is named "keyfactor".
620620
### Read CA cert
621621

622622
`vault read keyfactor/ca ca=<ca name>`
623+
> Note: The certificate for the CA needs to have been imported into Command for this endpoint to return the CA Certificate
623624
624625
### Read CA chain
625626

626627
`vault read keyfactor/ca_chain ca=<ca name>`
628+
> Note: _All_ certificates in the chain need to have been imported into Command for this endpoint to return the CA Certificate Chain
629+
627630

628631

backend.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ import (
1616
"strings"
1717
"sync"
1818

19+
"github.com/Keyfactor/keyfactor-go-client-sdk/v24"
1920
"github.com/hashicorp/vault/sdk/framework"
2021
"github.com/hashicorp/vault/sdk/logical"
2122
)
2223

2324
const (
2425
operationPrefixKeyfactor string = "keyfactor"
26+
PluginVersion = "1.4.2" // this should match the release version of the plugin
2527
)
2628

2729
// Factory configures and returns backend
@@ -39,7 +41,7 @@ type keyfactorBackend struct {
3941
*framework.Backend
4042
configLock sync.RWMutex
4143
cachedConfig *keyfactorConfig
42-
client *keyfactorClient
44+
client *keyfactor.APIClient
4345
}
4446

4547
// keyfactorBackend defines the target API keyfactorBackend
@@ -67,6 +69,7 @@ func backend() *keyfactorBackend {
6769
BackendType: logical.TypeLogical,
6870
Invalidate: b.invalidate,
6971
InitializeFunc: b.Initialize,
72+
RunningVersion: "v" + PluginVersion,
7073
}
7174
return &b
7275
}
@@ -100,13 +103,12 @@ func (b *keyfactorBackend) invalidate(ctx context.Context, key string) {
100103

101104
// getClient locks the backend as it configures and creates a
102105
// a new client for the target API
103-
func (b *keyfactorBackend) getClient(ctx context.Context, s logical.Storage) (*keyfactorClient, error) {
106+
func (b *keyfactorBackend) getClient(ctx context.Context, s logical.Storage) (*keyfactor.APIClient, error) {
104107
b.configLock.RLock()
105108
defer b.configLock.RUnlock()
106109

107110
if b.client != nil {
108-
b.Logger().Debug("closing idle connections before returning existing client")
109-
b.client.httpClient.CloseIdleConnections()
111+
b.Logger().Trace("returning existing client")
110112
return b.client, nil
111113
}
112114

@@ -127,5 +129,5 @@ func (b *keyfactorBackend) getClient(ctx context.Context, s logical.Storage) (*k
127129
}
128130

129131
const keyfactorHelp = `
130-
The Keyfactor backend is a pki service that issues and manages certificates.
132+
The Keyfactor backend is a pki service that issues and manages certificates via the Keyfactor Command platform.
131133
`

0 commit comments

Comments
 (0)