Add action recording for sensitive data search
This commit is contained in:
@@ -327,6 +327,8 @@ func (svc record) SearchSensitive(ctx context.Context) (set []types.SensitiveRec
|
||||
namespaces types.NamespaceSet
|
||||
modules types.ModuleSet
|
||||
|
||||
aProps = &recordActionProps{}
|
||||
|
||||
userID = auth.GetIdentityFromContext(ctx).Identity()
|
||||
)
|
||||
|
||||
@@ -364,7 +366,7 @@ func (svc record) SearchSensitive(ctx context.Context) (set []types.SensitiveRec
|
||||
return nil
|
||||
}()
|
||||
|
||||
return set, err
|
||||
return set, svc.recordAction(ctx, aProps, RecordActionSearchSensitive, err)
|
||||
}
|
||||
|
||||
func (svc record) searchSensitive(ctx context.Context, userID uint64, namespace *types.Namespace, module *types.Module, filter types.RecordFilter) (out types.SensitiveRecordSet, err error) {
|
||||
|
||||
20
compose/service/record_actions.gen.go
generated
20
compose/service/record_actions.gen.go
generated
@@ -452,6 +452,26 @@ func RecordActionSearch(props ...*recordActionProps) *recordAction {
|
||||
return a
|
||||
}
|
||||
|
||||
// RecordActionSearchSensitive returns "compose:record.searchSensitive" action
|
||||
//
|
||||
// This function is auto-generated.
|
||||
//
|
||||
func RecordActionSearchSensitive(props ...*recordActionProps) *recordAction {
|
||||
a := &recordAction{
|
||||
timestamp: time.Now(),
|
||||
resource: "compose:record",
|
||||
action: "searchSensitive",
|
||||
log: "searched for records with sensitive data",
|
||||
severity: actionlog.Info,
|
||||
}
|
||||
|
||||
if len(props) > 0 {
|
||||
a.props = props[0]
|
||||
}
|
||||
|
||||
return a
|
||||
}
|
||||
|
||||
// RecordActionLookup returns "compose:record.lookup" action
|
||||
//
|
||||
// This function is auto-generated.
|
||||
|
||||
@@ -46,6 +46,10 @@ actions:
|
||||
log: "searched for records"
|
||||
severity: info
|
||||
|
||||
- action: searchSensitive
|
||||
log: "searched for records with sensitive data"
|
||||
severity: info
|
||||
|
||||
- action: lookup
|
||||
log: "looked-up for a {{record}}"
|
||||
severity: info
|
||||
|
||||
Reference in New Issue
Block a user