Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically mask passwords #257

Closed
sorantis opened this issue Aug 27, 2020 · 5 comments · Fixed by elastic/beats#21022
Closed

Automatically mask passwords #257

sorantis opened this issue Aug 27, 2020 · 5 comments · Fixed by elastic/beats#21022
Assignees

Comments

@sorantis
Copy link

Provide an automatic way to identify and mask sensitive information such as a password when used with the SQL based database integrations, such as Oracle module.

@elasticmachine
Copy link

Pinging @elastic/integrations-services (Team:Services)

@mtojek
Copy link
Contributor

mtojek commented Aug 27, 2020

There is password field which masks the phrase with **** in Kibana. Do you think about something more sophisticated? If so, then it might affect Kibana too /cc @ruflin .

@sorantis
Copy link
Author

Oracle events contain sensitive information that customers consider as a risk

    "service": {
        "address": "oracle://sys:passwordlocalhost/ORCLPDB1.localdomain",
        "type": "oracle"
    }

@mtojek
Copy link
Contributor

mtojek commented Aug 27, 2020

Elastic Agent uses Metricbeat and Filebeat to generate such data, so it's not the Integrations issue, but rather Metricbeat/Filebeat.

Field definitions stored in Integrations are used mostly to generate Kibana UI and config files. I suppose this should be fixed on the events collector level to strip it and do not leak passwords anywhere.

@andrewkroh
Copy link
Member

In Metricbeat it looks like event.host is copied into service.address. And event.host is not using the sanitized URI. This would probably fix Metricbeat, but needs tested. Could @elastic/integrations-platforms please look into the issue.

diff --git a/metricbeat/mb/module/wrapper.go b/metricbeat/mb/module/wrapper.go
index 2ea0d2b60..f0d1552c8 100644
--- a/metricbeat/mb/module/wrapper.go
+++ b/metricbeat/mb/module/wrapper.go
@@ -392,7 +392,7 @@ func (r reporterV2) Event(event mb.Event) bool {
        }
 
        if event.Host == "" {
-               event.Host = r.msw.Host()
+               event.Host = r.msw.HostData().SanitizedURI
        }
 
        if event.Error == nil {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants