Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions x-pack/filebeat/input/o365audit/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@
Type: pluginName,
Configure: configure,
},

// ExcludeFromFIPS = true to prevent this input from being used in FIPS-capable
// Filebeat distributions. This input indirectly uses algorithms that are not
// FIPS-compliant. Specifically, the input depends on the
// github.com/Azure/azure-sdk-for-go/sdk/azidentity package which, in turn,
// depends on the golang.org/x/crypto/pkcs12 package, which is not FIPS-compliant.
ExcludeFromFIPS: true,
}
}

Expand Down Expand Up @@ -94,7 +101,7 @@
func (inp *o365input) Name() string { return pluginName }

func (inp *o365input) Test(src cursor.Source, ctx v2.TestContext) error {
tenantID := src.(*stream).tenantID

Check failure on line 104 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Error return value is not checked (errcheck)
auth, err := inp.config.NewTokenProvider(tenantID)
if err != nil {
return err
Expand All @@ -118,7 +125,7 @@
if err == nil {
break
}
if ctx.Cancelation.Err() != err && err != context.Canceled {

Check failure on line 128 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

comparing with != will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
msg := mapstr.M{}
msg.Put("error.message", err.Error())
msg.Put("event.kind", "pipeline_error")
Expand All @@ -126,10 +133,10 @@
Timestamp: time.Now(),
Fields: msg,
}
publisher.Publish(event, nil)

Check failure on line 136 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Error return value of `publisher.Publish` is not checked (errcheck)
ctx.Logger.Errorf("Input failed: %v", err)
ctx.Logger.Infof("Restarting in %v", inp.config.API.ErrorRetryInterval)
timed.Wait(ctx.Cancelation, inp.config.API.ErrorRetryInterval)

Check failure on line 139 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Error return value of `timed.Wait` is not checked (errcheck)
}
}
return nil
Expand All @@ -141,7 +148,7 @@
cursor cursor.Cursor,
publisher cursor.Publisher,
) error {
stream := src.(*stream)

Check failure on line 151 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Error return value is not checked (errcheck)
tenantID, contentType := stream.tenantID, stream.contentType
log := v2ctx.Logger.With("tenantID", tenantID, "contentType", contentType)
ctx := ctxtool.FromCanceller(v2ctx.Cancelation)
Expand Down Expand Up @@ -259,14 +266,14 @@
}
}
if env.Config.PreserveOriginalEvent {
b.PutValue("event.original", string(raw))

Check failure on line 269 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Error return value of `b.PutValue` is not checked (errcheck)
}
if len(errs) > 0 {
msgs := make([]string, len(errs))
for idx, e := range errs {
msgs[idx] = e.Error()
}
b.PutValue("error.message", msgs)

Check failure on line 276 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Error return value of `b.PutValue` is not checked (errcheck)
}
return b
}
2 changes: 2 additions & 0 deletions x-pack/filebeat/module/o365/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

== Office 365 module

WARNING: This module is not available in FIPS-capable Filebeat.

beta[]

include::{libbeat-dir}/shared/integration-link.asciidoc[]
Expand Down
Loading