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

Correctly identify as iTop in cURL requests #652

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Hipska
Copy link
Contributor

@Hipska Hipska commented Jul 10, 2024

Base information

Question Answer
Related to a SourceForge thead / Another PR / Combodo ticket? N/A
Type of change? Enhancement

Objective

Outgoing HTTP requests are identified with "spider" user agent, which can simply be blocked sometimes.

Proposed solution

Use for example iTop/3.2.0 as user agent when doing HTTP requests to other services..

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested all changes I made on an iTop instance
  • I have added a unit test, otherwise I have explained why I couldn't
  • Is the PR clear and detailed enough so anyone can understand digging in the code?

@Molkobain
Copy link
Contributor

Good idea. I don't know if it can have any side effects though?

@Molkobain Molkobain added the enhancement New feature or request label Jul 10, 2024
@Molkobain Molkobain self-assigned this Jul 10, 2024
@Hipska
Copy link
Contributor Author

Hipska commented Jul 10, 2024

Well, the adverse. So, if an external API refuses to connect anything else than spider 😉

@jbostoen
Copy link
Contributor

Just wondering if there should be a config setting as well to override this, and set a custom user agent string? (Or we can simply wait for the first real use case where it's necessary and would need to imitate a regular browser string for some reason).

@Molkobain
Copy link
Contributor

I'll raise the question during functional review :)

@Molkobain Molkobain removed their assignment Aug 19, 2024
Copy link
Contributor

@Molkobain Molkobain left a comment

Choose a reason for hiding this comment

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

Technical review:

  • Ok for the principle
  • But use a conf. param.
    • Name : http.request.user_agent (another name might be proposed)
    • Default value : ITOP_APPLICATION.'/'.ITOP_VERSION

The conf. param. will allow to change it to something specific when needed and to revert it to "spider" for cases where people would have used that information.

@jf-cbd
Copy link
Contributor

jf-cbd commented Oct 11, 2024

Accepted during functional review. Will be in next iTop version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Planned
Development

Successfully merging this pull request may close these issues.

4 participants