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 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 PR that changes 10-29 lines. Very easy to review. label Oct 31, 2019
Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

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

LGTM,

only missing a respective CHANGELOG record

@Kami
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
@Kami Kami deleted the fix_api_url_none_gunicorn_issue branch October 31, 2019 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component:st2auth service: auth api size/S PR that changes 10-29 lines. Very easy to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants