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

Fix token auth to /run and add login for other endpoints #5

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

sblaisot
Copy link
Contributor

@sblaisot sblaisot commented Mar 17, 2023

According to salt API documentation the /run endpoint bypasses normal authentication and so doesn't take into account the X-Auth-Token header with a session token.

This is confirmed by this comment in a GH issue

It only handles an eauth token generated by mk_token

So currently token auth cannot work with the saltstack terraform provider

This PR fixes that behaviour by sending configured eauth token in request data when calling /run endpoint and add handling of login through /login endpoint and session tokens for other endpoints for later use (only working when authenticating with username & password as you cannot login with an eauth token)

@sizgiyaev sizgiyaev merged commit 6e09e7e into imperva:master Apr 19, 2023
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.

None yet

2 participants