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 a bug with authentication API endpoint returning internal server error under gunicorn if auth.api_url config option was not set #4809

Merged
merged 2 commits into from Oct 31, 2019

Conversation

@Kami
Copy link
Member

Kami commented Oct 31, 2019

This pull request fixes a bug with POST /auth/v1/tokensAPI endpoint returning internal server error when running under gunicorn without auth.api_url config option being set.

NOTE: First I couldn't reproduce the issue, but it turns out it only happens when using gunicorn deployment.

When running st2auh directly, the WSGI implementation simply casts all the "None" header values to empty strings, but that's not the case for gunicorn.

Originally reported here - https://forum.stackstorm.com/t/ldap-error-handling-api-call-failed-expected-string-or-buffer/893.

gunicorn if auth.api_url config option was not set.

NOTE: This issue would only affect deployments using gunicorn which
don't have auth.api_url config option set.
@Kami Kami added this to the 3.2.0 milestone Oct 31, 2019
@pull-request-size pull-request-size bot added the size/S label Oct 31, 2019
@armab
armab approved these changes Oct 31, 2019
Copy link
Member

armab left a comment

LGTM,

only missing a respective CHANGELOG record

@Kami

This comment has been minimized.

Copy link
Member Author

Kami commented Oct 31, 2019

@armab oops, done - b8b874f.

I already had it ready locally, I was just waiting to open a PR first so I get a PR number which I can reference in the changelog :)

@Kami Kami merged commit 3ce8ef9 into master Oct 31, 2019
7 checks passed
7 checks passed
Milestone Check Great, the milestone is set.
ci/circleci: packages Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
st2/e2e/centos7 E2E tests have finished successfully
Details
st2/e2e/ubuntu16 E2E tests have finished successfully
Details
st2/e2e/ubuntu18 E2E tests have finished successfully
Details
@Kami Kami deleted the fix_api_url_none_gunicorn_issue branch Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.