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

Connect to Okta module of Filebeat via proxy #24615

Closed
adityasrivastava2790 opened this issue Mar 17, 2021 · 7 comments · Fixed by #24662
Closed

Connect to Okta module of Filebeat via proxy #24615

adityasrivastava2790 opened this issue Mar 17, 2021 · 7 comments · Fixed by #24662
Labels
enhancement Team:Elastic-Agent Label for the Agent team

Comments

@adityasrivastava2790
Copy link

adityasrivastava2790 commented Mar 17, 2021

As I want to fetch logs from Okta, I am using filebeat 7.11 to do it. In the modules.d directory of filebeat, I can see configurations for Okta available.

I have entered the URL & credentials mentioned there. But now the problem is the URL is accessible via a proxy from my environment.
Where do I configure the proxy setting like
Proxy URL, Proxy Port, Proxy username, Proxy password, etc

Now had I used logstash http_poller input to connect to Okta API, below would have been my configuration,

urls => {
                        test2 => {
                                method => get
                                url => "https://okta/api/v1/logs"
                                headers => {
                                        Accept => "application/json"
                                        Authorization => "KEY*****************"
                                }
                        }
                }
                proxy => { host => "1.2.3.4" port => 4444 scheme => "http"}
                request_timeout => 60
                schedule => { cron => "0 * * * *"}
                codec => "json"

But I dont see any such options while configuring Okta in filebeat.

Any input how to achieve this would be really helpful.

Thanks,
@elastic-data-integration

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 17, 2021
@ycombinator ycombinator added Team:Elastic-Agent Label for the Agent team Team:SIEM labels Mar 17, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Mar 17, 2021
@ycombinator
Copy link
Contributor

I'm tagging both the Agent and SIEM teams as the okta module seems to be maintained by the SIEM team but it uses the httpjson Filebeat input.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@legoguy1000
Copy link
Contributor

Looking at the httpjson docs, there doesn't appear to be any config for a proxy. The only proxy configs I could find were for outputs to elasticsearch, logstash, redis

@andrewkroh
Copy link
Member

This sounds like a feature request to add proxy support to the httpjson input. I assume based on the LS example that it's an http proxy rather than socks5 that you want to use.

You might be able to configure proxy settings globally via Go's environment variables as a workaround, but I'm not 100% sure those are taken into account. https://golang.org/pkg/net/http/#ProxyFromEnvironment

@legoguy1000
Copy link
Contributor

legoguy1000 commented Mar 20, 2021

@andrewkroh This is my first wack at Golang, master...legoguy1000:httpjson-input-proxy. It passed the integration test but IDK if there is a better way to test the changes to the httpjson input. Draft PR #24662

andrewkroh added a commit that referenced this issue Mar 24, 2021
Adds a `proxy_url` config option to the httpjson v2 input. Updates all httpjson based modules to support proxy_url.

Fixes #24615.

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
andrewkroh pushed a commit to andrewkroh/beats that referenced this issue Mar 24, 2021
Adds a `proxy_url` config option to the httpjson v2 input. Updates all httpjson based modules to support proxy_url.

Fixes elastic#24615.

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
(cherry picked from commit 9a5f5d0)
andrewkroh added a commit that referenced this issue Mar 24, 2021
Adds a `proxy_url` config option to the httpjson v2 input. Updates all httpjson based modules to support proxy_url.

Fixes #24615.

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
(cherry picked from commit 9a5f5d0)

Co-authored-by: Alex Resnick <adr8292@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants