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

Digest Authentication to 'httpjson' input #37737

Closed
getkub opened this issue Jan 25, 2024 · 5 comments
Closed

Digest Authentication to 'httpjson' input #37737

getkub opened this issue Jan 25, 2024 · 5 comments
Labels
Team:Security-Service Integrations Security Service Integrations Team

Comments

@getkub
Copy link

getkub commented Jan 25, 2024

Describe the enhancement:
First of all thanks for implementing Digest Authentication in filebeat CEL input type. As more and more SAAS solutions with API use 'digest' authentication, it would be beneficial to embed digest authentication type to 'httpjson' input type

Describe a specific use case for the enhancement or feature:
CEL is complicated for many use-cases and httpjson is much easy and sufficient in many scenarios.

CEL input has been uplifted using Digest authentication in: #36932
Please extend this to https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-httpjson.html

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 25, 2024
@ebeahan ebeahan added the Team:Security-Service Integrations Security Service Integrations Team label Jan 31, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 31, 2024
@efd6
Copy link
Contributor

efd6 commented Apr 3, 2024

@getkub I'd be interested to see a case of HTTPJSON use where you think the CEL equivalent is complicated.

@getkub
Copy link
Author

getkub commented Apr 3, 2024

@efd6 Few instances below

  • Need to get data from 'MongoDB Atlas' service. It just needs digest authentication and URL is same. So the real purpose is just for 'digest authentication'
  • Need to pull 'smarts application' with 'digest authentication' and simple URL, but we would like to leverage the response.split function
  • Basically for ALL simple http GET requests with digest auth; and the learning curve for CEL input is bit high for our team

@efd6
Copy link
Contributor

efd6 commented Apr 3, 2024

@getkub, a GET-based configuration will look at a minimum like the example in the configuration UI (the endpoint copied from there for the example)

bytes(get("https://api.ipify.org/?format=json").Body).as(body, {
    "events": [body.decode_json()],
})

plus configuration that's essentially identical to the config options in the HTTPJSON package.

If the body of the response had an array of elements that you want to split on, say called data, then it would look like

bytes(get("https://api.ipify.org/?format=json").Body).as(body, {
    "events": body.decode_json().data.map(d, d),
})

The language allows more, but in the minimum it is clearer than HTTPJSON in terms of what is actually being executed.

@getkub
Copy link
Author

getkub commented Apr 3, 2024

ok, in that case you can close the issue. thanks for the explanation

@getkub getkub closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Security-Service Integrations Security Service Integrations Team
Projects
None yet
Development

No branches or pull requests

4 participants