Skip to content

feat(new source): okta #22968

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

sonnens
Copy link
Contributor

@sonnens sonnens commented Apr 30, 2025

Summary

Adds a new source to consume the Okta system log / audit log

Change Type

  • Bug fix
  • [ X ] New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • [ X ] No

How did you test this PR?

Tests are included in the PR, and I've run it on our own Okta instance

Does this PR include user facing changes?

  • [ X ] Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

References

@sonnens sonnens requested a review from a team as a code owner April 30, 2025 15:55
@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label Apr 30, 2025
@pront pront self-assigned this Apr 30, 2025
@sonnens
Copy link
Contributor Author

sonnens commented May 19, 2025

@pront anything needed on my end for this one?

@pront
Copy link
Member

pront commented May 19, 2025

@pront anything needed on my end for this one?

Hi @sonnens, and thank you for this PR! We want a few more docs files. You can look at other PRs for inspiration: https://github.com/vectordotdev/vector/pull/22609/files.

Note that make generate-component-docs will generate the files under base/ but the other CUE file needs to be handwritten.

@sonnens sonnens requested a review from a team as a code owner May 19, 2025 20:23
@github-actions github-actions bot added the domain: external docs Anything related to Vector's external, public documentation label May 19, 2025
@sonnens
Copy link
Contributor Author

sonnens commented May 19, 2025

@pront something like this work?

Copy link
Contributor

@hestonhoffman hestonhoffman left a comment

Choose a reason for hiding this comment

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

👋 I left a couple small docs suggestions

sonnens and others added 3 commits May 19, 2025 16:02
Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>
Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>
Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>
@sonnens
Copy link
Contributor Author

sonnens commented Jun 16, 2025

@pront any updates?

@pront
Copy link
Member

pront commented Jun 17, 2025

@pront any updates?

Hi @sonnens, I was away for a few weeks. We will take a look soon.

@pront pront requested a review from thomasqueirozb June 17, 2025 15:02

/// The timeout for each scrape request.
#[serde(default = "default_timeout")]
#[serde_as(as = "serde_with:: DurationSecondsWithFrac<f64>")]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#[serde_as(as = "serde_with:: DurationSecondsWithFrac<f64>")]
#[serde_as(as = "serde_with::DurationSecondsWithFrac<f64>")]

log_namespace.clone(),
)
.build()
.unwrap();
Copy link
Member

Choose a reason for hiding this comment

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

We have to remove all unwrap() usages. Instead return an error.

.build()
.unwrap();

let client = HttpClient::new(tls, &proxy).expect("Building HTTP client failed");
Copy link
Member

Choose a reason for hiding this comment

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

We should also return the error here.

async move {
// We update the actual URL based on the response the API returns
// so the critical section is between here & when the request finishes
let mut url_lock = url_mutex.lock().await;
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, holding a lock across multiple async operations is discouraged. Can we use a lock guard here?

let response_result = {
let mut url_guard = url_mutex.lock().await;
let url = url_guard.to_string();
// ...
}; // <-- Lock guard drops here

@pront pront added the meta: awaiting author Pull requests that are awaiting their author. label Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: external docs Anything related to Vector's external, public documentation domain: sources Anything related to the Vector's sources meta: awaiting author Pull requests that are awaiting their author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Okta system log source
3 participants