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

Use POST method when requesting the API login endpoint #4103

Merged
merged 5 commits into from
Jul 11, 2022

Conversation

mcarmona99
Copy link
Contributor

This PR closes #3906.

In this pull request, I have changed the method used when requesting the API login endpoint from GET to POST because as it was said in the related issue, the actual login endpoint (GET) is going to be deprecated.

New generate-api-4.0-info.js output (it works with the new changes):

# node generate-api-4.0-info.js https://localhost:55000
--------------- Configuration ---------------
Wazuh API url: https://localhost:55000
Output directory: /output
Output endpoints mode: Simple
----------------------------------------------
[SUCCESS] File was created! Path: /output/endpoints.json
[SUCCESS] File was created! Path: /output/security-actions.json

@mcarmona99 mcarmona99 self-assigned this Apr 26, 2022
@Desvelao Desvelao changed the base branch from master to 4.4-7.10 June 24, 2022 08:50
Copy link
Member

@Desvelao Desvelao left a comment

Choose a reason for hiding this comment

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

review
code ✔️
test ✔️

Copy link
Member

@yenienserrano yenienserrano left a comment

Choose a reason for hiding this comment

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

CR: ✔️
Test: ✔️

@AlexRuiz7 AlexRuiz7 merged commit 3977e45 into 4.4-7.10 Jul 11, 2022
@AlexRuiz7 AlexRuiz7 deleted the feature/3906-post-login-endpoint branch July 11, 2022 11:27
github-actions bot pushed a commit that referenced this pull request Jul 11, 2022
* Use POST method when requesting the API login endpoint

* changelog: add PR entry

Co-authored-by: Matias Ezequiel Moreno <matiasmoreno876@gmail.com>
Co-authored-by: Álex <alex-r-b@hotmail.com>
Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
(cherry picked from commit 3977e45)
@github-actions
Copy link
Contributor

The backport to 4.4-1.2-wzd failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.4-1.2-wzd 4.4-1.2-wzd
# Navigate to the new working tree
cd .worktrees/backport-4.4-1.2-wzd
# Create a new branch
git switch --create backport-4103-to-4.4-1.2-wzd
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 3977e45c6ffdc06926edfd12355f0f20dd2f9d84
# Push it to GitHub
git push --set-upstream origin backport-4103-to-4.4-1.2-wzd
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.4-1.2-wzd

Then, create a pull request where the base branch is 4.4-1.2-wzd and the compare/head branch is backport-4103-to-4.4-1.2-wzd.

AlexRuiz7 pushed a commit that referenced this pull request Jul 11, 2022
* Use POST method when requesting the API login endpoint

* changelog: add PR entry

Co-authored-by: Matias Ezequiel Moreno <matiasmoreno876@gmail.com>
Co-authored-by: Álex <alex-r-b@hotmail.com>
Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
(cherry picked from commit 3977e45)
AlexRuiz7 added a commit that referenced this pull request Jul 11, 2022
* Use POST method when requesting the API login endpoint

* changelog: add PR entry

Co-authored-by: Matias Ezequiel Moreno <matiasmoreno876@gmail.com>
Co-authored-by: Álex <alex-r-b@hotmail.com>
Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
(cherry picked from commit 3977e45)

Co-authored-by: Manuel Carmona Pérez <manuelvillarcarmona@gmail.com>
AlexRuiz7 pushed a commit that referenced this pull request Jul 11, 2022
…point (#4319)

Use POST method when requesting the API login endpoint (#4103)

* Use POST method when requesting the API login endpoint

* changelog: add PR entry

Co-authored-by: Matias Ezequiel Moreno <matiasmoreno876@gmail.com>
Co-authored-by: Álex <alex-r-b@hotmail.com>
Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
(cherry picked from commit 3977e45)

Co-authored-by: Manuel Carmona Pérez <manuelvillarcarmona@gmail.com>
yenienserrano pushed a commit that referenced this pull request Sep 2, 2022
* Use POST method when requesting the API login endpoint

* changelog: add PR entry

Co-authored-by: Matias Ezequiel Moreno <matiasmoreno876@gmail.com>
Co-authored-by: Álex <alex-r-b@hotmail.com>
Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
(cherry picked from commit 3977e45)

Co-authored-by: Manuel Carmona Pérez <manuelvillarcarmona@gmail.com>
yenienserrano pushed a commit that referenced this pull request Sep 6, 2022
* Use POST method when requesting the API login endpoint

* changelog: add PR entry

Co-authored-by: Matias Ezequiel Moreno <matiasmoreno876@gmail.com>
Co-authored-by: Álex <alex-r-b@hotmail.com>
Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
(cherry picked from commit 3977e45)

Co-authored-by: Manuel Carmona Pérez <manuelvillarcarmona@gmail.com>
@Desvelao Desvelao mentioned this pull request Jan 13, 2023
8 tasks
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.

Change HTTP method to POST when using the API login endpoint
5 participants