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

[Filebeat][Salesforce] Add Salesforce filebeat module #2

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
127 changes: 127 additions & 0 deletions x-pack/filebeat/module/salesforce/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
- module: salesforce

apex-rest:
enabled: false

# Oauth Client ID
# var.client_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Oauth Client Secret
# var.client_secret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marc-gr Do you know if there is an option to set secrets in one place instead of per-config?


# Oauth Token URL
# var.token_url: "https://login.salesforce.com/services/oauth2/token"

# Oauth User, should include the User mail
# var.user: "[email protected]"

# Oauth password, should include the User password
# var.password: "P@$$W0₹D"

# URL, should include the instance_url
# var.url: "https://instance_id.my.salesforce.com"

login-rest:
enabled: false

# Oauth Client ID
# var.client_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Oauth Client Secret
# var.client_secret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Oauth Token URL
# var.token_url: "https://login.salesforce.com/services/oauth2/token"

# Oauth User, should include the User mail
# var.user: "[email protected]"

# Oauth password, should include the User password
# var.password: "P@$$W0₹D"

# URL, should include the instance_url
# var.url: "https://instance_id.my.salesforce.com"

login-stream:
enabled: false
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think that any of these filesets should be enabled by default? I mean, whenever user enables the filebeat module.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, I thought of the same and tried that out earlier. But I faced the following, and hence decided to go with false.
salesforce module dataset login must be explicitly disabled (needs enabled: false)


# Oauth Client ID
# var.client_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Oauth Client Secret
# var.client_secret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Oauth Token URL
# var.token_url: "https://login.salesforce.com/services/oauth2/token"

# Oauth User, should include the User mail
# var.user: "[email protected]"

# Oauth password, should include the User password
# var.password: "P@$$W0₹D"

# URL, should include the instance_url
# var.url: "https://instance_id.my.salesforce.com"

logout-rest:
enabled: false

# Oauth Client ID
# var.client_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Oauth Client Secret
# var.client_secret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Oauth Token URL
# var.token_url: "https://login.salesforce.com/services/oauth2/token"

# Oauth User, should include the User mail
# var.user: "[email protected]"

# Oauth password, should include the User password
# var.password: "P@$$W0₹D"

# URL, should include the instance_url
# var.url: "https://instance_id.my.salesforce.com"

logout-stream:
enabled: false

# Oauth Client ID
# var.client_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Oauth Client Secret
# var.client_secret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Oauth Token URL
# var.token_url: "https://login.salesforce.com/services/oauth2/token"

# Oauth User, should include the User mail
# var.user: "[email protected]"

# Oauth password, should include the User password
# var.password: "P@$$W0₹D"

# URL, should include the instance_url
# var.url: "https://instance_id.my.salesforce.com"

setupaudittrail-rest:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we should name it: setup-audit-trail. @yug-crest Did you face any problems with dashes there? I'm just considering which form fits better: setupaudittrail vs setup-audit-trail.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid point, I thought of using setupaudittrail as we are using the convention of -rest and -stream suffix in all the filesets so as to avoid hyphen inconsistencies. To answer your question, I did not face any issues with the dashes, we can definitely go with setup-audit-trail-rest. Another option would be setup_audit_trail-rest.
Please let me know if you think I should make any changes. Thanks!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could please ping @akshay-saraswat about the preference?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a preference. setup-audit-trail-rest is certainly more readable. My suggestion would be to align ourselves with how Salesforce handles it (i.e. setupaudittrail) because customers would be familiar with that. Please let me know your thoughts.

https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_setupaudittrail.htm

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, setupaudittrail might be easier to grep for :) Let's stick to that.

enabled: false

# Oauth Client ID
# var.client_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Oauth Client Secret
# var.client_secret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Oauth Token URL
# var.token_url: "https://login.salesforce.com/services/oauth2/token"

# Oauth User, should include the User mail
# var.user: "[email protected]"

# Oauth password, should include the User password
# var.password: "P@$$W0₹D"

# URL, should include the instance_url
# var.url: "https://instance_id.my.salesforce.com"
Loading