Skip to content

Initial commit for CrowdStrike source crawler#5619

Merged
san81 merged 4 commits into
opensearch-project:mainfrom
nsgupta1:main
Apr 18, 2025
Merged

Initial commit for CrowdStrike source crawler#5619
san81 merged 4 commits into
opensearch-project:mainfrom
nsgupta1:main

Conversation

@nsgupta1
Copy link
Copy Markdown
Contributor

Description

[Introducing new saas crawler for CrowdStrike Falcon API]

Issues Resolved

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • [Y] New functionality includes testing.
  • [N] New functionality has a documentation issue. Please link to it in this PR.
    • [Y] New functionality has javadoc added
  • [Y] Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

/**
* Batch size for fetching Threat Intel Feeds
*/
private static final int DEFAULT_BATCH_SIZE = 10000;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: DEFAULT_IOC_FETCH_BATCH_SIZE

Signed-off-by: ngsupta1 <guptaneha.e@gmail.com>
Signed-off-by: ngsupta1 <guptaneha.e@gmail.com>
Signed-off-by: ngsupta1 <guptaneha.e@gmail.com>
public void start(Buffer<Record<Event>> buffer) {
log.info("Starting CrowdStrike Source Plugin...");
authClient.initCredentials();
// super.start(buffer);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll uncomment this code in follow up PR when CrowdStrikeService and Client classes are implemented. cc: @san81 @engechas

Signed-off-by: nsgupta1 <nsgupta1@users.noreply.github.com>
* @throws RuntimeException if the token cannot be retrieved.
*/
private void getAuthToken() {
log.info(NOISY, "You are trying to access token");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

When token expired, you probably don't want every worker to renew it. Think about handling that when you wire this method into the renewal flow

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ack !! I will include refresh mechanism in next PR.

this.expireTime = Instant.now().plusSeconds((Integer) tokenData.get(EXPIRE_IN));
log.info("Access token acquired successfully");
} catch (HttpClientErrorException ex) {
this.expireTime = Instant.ofEpochMilli(0);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Think about the retry strategy here in your next pr

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ack !! I will include retry mechanism in next PR.

@san81 san81 merged commit 33adb5c into opensearch-project:main Apr 18, 2025
67 of 74 checks passed
Davidding4718 pushed a commit to Davidding4718/data-prepper that referenced this pull request Apr 25, 2025
* Initial commit for CrowdStrike source crawler

Signed-off-by: nsgupta1 <nsgupta1@users.noreply.github.com>

---------

Signed-off-by: ngsupta1 <guptaneha.e@gmail.com>
Signed-off-by: nsgupta1 <nsgupta1@users.noreply.github.com>
Co-authored-by: nsgupta1 <nsgupta1@users.noreply.github.com>
Davidding4718 pushed a commit to Davidding4718/data-prepper that referenced this pull request Apr 25, 2025
* Initial commit for CrowdStrike source crawler

Signed-off-by: nsgupta1 <nsgupta1@users.noreply.github.com>

---------

Signed-off-by: ngsupta1 <guptaneha.e@gmail.com>
Signed-off-by: nsgupta1 <nsgupta1@users.noreply.github.com>
Co-authored-by: nsgupta1 <nsgupta1@users.noreply.github.com>
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 this pull request may close these issues.

5 participants