-
Notifications
You must be signed in to change notification settings - Fork 687
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
Fixes #3772, allows Authorization header to pass #3774
Fixes #3772, allows Authorization header to pass #3774
Conversation
Our best bet for getting the change to land in prod as part of the nightly update is to use the postinst script for |
Appended a commit to add a
@zenmonkeykstop, can you take this for a lap? |
If deploying to Apache using mod_wsgi, the authorization header is not passed through to a WSGI application by default, as it is assumed that authentication will be handled by Apache, rather than at an application level. See http://www.django-rest-framework.org/api-guide/authentication/#apache-mod_wsgi-specific-configuration for more details.
In order to ensure config updates during scheduled nightly upgrades for 0.9.0, we must patch the Apache config in-place. The approach uses an in-place substitution on the journalist vhost config file, checking first for the presence of the line, and skipping the substitution is it's already found.
855dd91
to
f3e81ca
Compare
Ran through upgrade scenario from 0.8.0 to locally-built 0.9.0 debs, no errors. LGTM! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch @kushaldas, thanks for the migration @conorsch and QA report @zenmonkeykstop - approving
CI failing with:
That's #3779, so I'll rebase this branch, since the fix has already been merged into develop. |
The commits here have already been cherry-picked with |
CI passed. These changes made it into rc4 earlier today as part of #3781. Merging into develop to stay in sync. |
Status
Ready for review.
Description of Changes
Fixes #3772
If deploying to Apache using mod_wsgi, the authorization header is not passed
through to a WSGI application by default, as it is assumed that
authentication will be handled by Apache, rather than at an application
level.
See http://www.django-rest-framework.org/api-guide/authentication/#apache-mod_wsgi-specific-configuration
for more details.
Testing
Make sure you have Tor service in your host and also added the hidservauth token in the torrc file to access the journalist interface. Also run the
create-dev-data.py
in the server to add some test data and the journalist account.To execute the following script, create a python3 virtualenv, and then install the following 3 packages
Then add and execute the following script, after adding the right onion address for the server.
Deployment
Any special considerations for deployment? Consider both:
1. Upgrading existing production instances.
@conorsch @redshiftzero @msheiny ^^ any tips on update of the existing instances?
2. New installs.
This should be fine.
Checklist
If you made changes to the server application code:
make ci-lint
) and tests (make -C securedrop test
) pass in the development containerIf you made changes to
securedrop-admin
:make -C admin test
) pass in the admin development containerIf you made changes to the system configuration:
If you made non-trivial code changes:
If you made changes to documentation:
make docs-lint
) passed locally