From 19c78dc4900ff5a2f2c89e5c63d6efeff276e2b1 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Thu, 23 May 2019 10:44:19 -0400 Subject: [PATCH] Update vendor --- .../hashicorp/vault/sdk/logical/audit.go | 4 ++-- .../hashicorp/vault/sdk/logical/logical.go | 5 +++++ .../hashicorp/vault/sdk/logical/system_view.go | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/audit.go b/vendor/github.com/hashicorp/vault/sdk/logical/audit.go index f3bf622b3d..8ba70f37e0 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/audit.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/audit.go @@ -3,8 +3,8 @@ package logical type LogInput struct { Type string Auth *Auth - Request interface{} - Response interface{} + Request *Request + Response *Response OuterErr error NonHMACReqDataKeys []string NonHMACRespDataKeys []string diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/logical.go b/vendor/github.com/hashicorp/vault/sdk/logical/logical.go index a3456e9671..cc3f6ae475 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/logical.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/logical.go @@ -124,3 +124,8 @@ type Paths struct { // unless it ends with '/' in which case it will be treated as a prefix. SealWrapStorage []string } + +type Auditor interface { + AuditRequest(ctx context.Context, input *LogInput) error + AuditResponse(ctx context.Context, input *LogInput) error +} diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go b/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go index 82f995176b..550b74a915 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go @@ -70,6 +70,10 @@ type SystemView interface { PluginEnv(context.Context) (*PluginEnvironment, error) } +type ExtendedSystemView interface { + Auditor() Auditor +} + type StaticSystemView struct { DefaultLeaseTTLVal time.Duration MaxLeaseTTLVal time.Duration @@ -86,6 +90,20 @@ type StaticSystemView struct { PluginEnvironment *PluginEnvironment } +type noopAuditor struct{} + +func (a noopAuditor) AuditRequest(ctx context.Context, input *LogInput) error { + return nil +} + +func (a noopAuditor) AuditResponse(ctx context.Context, input *LogInput) error { + return nil +} + +func (d StaticSystemView) Auditor() Auditor { + return noopAuditor{} +} + func (d StaticSystemView) DefaultLeaseTTL() time.Duration { return d.DefaultLeaseTTLVal }