* refactor (oidc): Stop emitting error for not found token id Stop emitting errors when authtoken repo.IssueAuthToken is called and there's if no pending token. It's not an "normal" state and not an error condition. * feature (audit tagging): Add tags for auth method requests/responses Including testing functions for asserting audit events created when a service is called
24 lines
625 B
Go
24 lines
625 B
Go
package api
|
|
|
|
import (
|
|
"reflect"
|
|
"testing"
|
|
|
|
"github.com/hashicorp/eventlogger/filters/encrypt"
|
|
wrapping "github.com/hashicorp/go-kms-wrapping"
|
|
"google.golang.org/protobuf/types/known/fieldmaskpb"
|
|
)
|
|
|
|
// NewEncryptFilter is a copy of event.NewEncryptFilter since importing it would
|
|
// case circular deps. The primary reason for this test func is to make sure
|
|
// the proper IgnoreTypes are included for testing.
|
|
func NewEncryptFilter(t *testing.T, w wrapping.Wrapper) *encrypt.Filter {
|
|
t.Helper()
|
|
return &encrypt.Filter{
|
|
Wrapper: w,
|
|
IgnoreTypes: []reflect.Type{
|
|
reflect.TypeOf(&fieldmaskpb.FieldMask{}),
|
|
},
|
|
}
|
|
}
|