FailedChanges

Summary

  1. Minor fixes to the auth code, mostly around logging (commit: 0aa20bf6e1a04dbe4cab50319b93b788e5349624) (details)
  2. Print the token and the token_list (commit: 9ed772008d85a89c1ff3b81c35ed69a849901ea2) (details)
  3. Rename the webserver.conf to a sample file (commit: 48e5a60cea216e9c03d75b8beea41a177c47cc6c) (details)
  4. Remove unnecessary imports (commit: 26137b56579d8ca31ccba387fdc8ac3aa2ffa027) (details)
  5. Add support for skipping as a mode of authorization (commit: 89a2dfdc8ea21efa5be9551e42983783c17c299b) (details)
  6. Move the keys.json file into a sample file (commit: 996bd1a37af50882d4fa96abc43e4caf5f481b0d) (details)
  7. Restructure keys.json by pulling out specific auth configs into (commit: c0d5329ae8e037e3ee9501102ca781540b121813) (details)
  8. Add support for open id authentication (commit: 83daf587ad7afb686329cb376bfbce62f9f9572c) (details)
  9. Initial version of the code to switch the google client library (commit: 9c87ff53d349800140f2f2c08c72d64bcde443e2) (details)
  10. Minor fixes to the refactored google auth code (commit: 384028a2801c0a0a592d1c826532e68aa1c40f1b) (details)
  11. Minor fixes to deal with the lack of a default keys.json (commit: 1f329d42fff5d25a370d99d4cd11a695ca6e90ec) (details)
  12. Initial version of the switch from ionic to firebase for the push (commit: 3f80d8623cb4acf2d89bd7a6bc55fd5c49baddae) (details)
  13. Restructure the notification code to support multiple push providers (commit: da5749de83a7162a9a9f08dda015f3533e0f2ddf) (details)
  14. Use the new interface + minor fixes (commit: 5959cc33a05d9c1a3bdb381d6719b8913974c810) (details)
  15. Add a simple unit test for the auth code (commit: 0cce77d70ec99e0c454cde7968537122b4c05b0b) (details)
  16. Fix import to get tests to pass (commit: ea3872af21dba2b759eb18e5c867f2b3bd0d85a4) (details)
  17. Fix import as well (commit: 698b8912854c510fa05a636e7e5b56917bb1ffcd) (details)
  18. Switch the google client library (commit: c417b830de60e74c60a423d6baeb2f8006786ab6) (details)
  19. Remove the google auth stuff as well until the new packages are (commit: 6aa00e93092d5963b1f92b32c677b3e43ecde1cf) (details)
  20. Add a three more tests that test the complete authentication workflow (commit: c5cc3b9fa636126642436b610c102b6176671eb9) (details)
  21. Added one more test for the __getEmail__ method (commit: 7b9d327b5f59fdccd6b3d4b3dc1834e25eaca462) (details)
  22. Use single _ instead of two __ since _getEmail is used outside the (commit: fee1317a85926636887deb9f799d8dc356b0a828) (details)
  23. Add the provider tag to the push notification sample as well (commit: bf635d2da1749eca39783bf886ce805aa5020005) (details)
  24. Store the token mappings so that we don't have to look them up (commit: dbd8aa2b20f08324e56a577d4f12d4da90e970f7) (details)
  25. Minor formatting change (commit: 4c69a909613066a59a83d176ed65c25cf9a3d6df) (details)
  26. Add tests for the push code + fixes found while running the test (commit: 7e97ee1ecf55de1e308bcb0bca8bc37fe8349c72) (details)
  27. Disable firebase tests until the new modules from requirements.txt are (commit: 6dd1ddb7f758fdb764a2def03c8909092b07d67e) (details)
  28. Fix some more test errors (commit: 9e6fc981082046b845bbe493de9b80cd7163fd0b) (details)
  29. Check in additional logging to see why the configuration is not loaded (commit: 7138bc563c0cf09d396b3ab1376b9782d41cca6e) (details)
  30. Remove code in the queries that reads the config (commit: 75674f546260d50cdb9eb5e088b4296c837dab62) (details)
  31. Add a script that will run a single test (commit: 363739efdf313ca9e2b8505a9ef3ee5281ff208f) (details)
  32. Convert all logging to warning so that it is visible in the test (commit: 63d5d40a3ccfe4c92a4d3fe068bf673b058f799b) (details)
  33. Write a script to setup push before running the tests (commit: 34303007a53b13c345290bf6aa38c766149fd9bc) (details)
  34. Convert logging back to debug (commit: 6758a06574b324f0930adaa890f481450985a405) (details)
  35. Remove erroneously committed print statements (commit: 0186e622d56929227f8cbdf6c77b6a604b6d3823) (details)
Commit 0aa20bf6e1a04dbe4cab50319b93b788e5349624 by shankari
Minor fixes to the auth code, mostly around logging
(commit: 0aa20bf6e1a04dbe4cab50319b93b788e5349624)
The file was modifiedemission/net/auth/token_list.py (diff)
The file was modifiedemission/net/auth/auth.py (diff)
Commit 9ed772008d85a89c1ff3b81c35ed69a849901ea2 by shankari
Print the token and the token_list
This helps us verify that the they are both read correctly. In
practice, on the first use, the token_list was formatted incorrectly
and this log statement helped debug the issue.
(commit: 9ed772008d85a89c1ff3b81c35ed69a849901ea2)
The file was modifiedemission/net/auth/token_list.py (diff)
Commit 48e5a60cea216e9c03d75b8beea41a177c47cc6c by shankari
Rename the webserver.conf to a sample file
This makes it consistent with the other configuration files, and
ensures that other installs don't get merge conflicts if they have made
changes to the file and we add new options
(commit: 48e5a60cea216e9c03d75b8beea41a177c47cc6c)
The file was removedconf/net/api/webserver.conf
The file was addedconf/net/api/webserver.conf.sample
The file was modifiedemission/net/auth/token_list.py (diff)
Commit 89a2dfdc8ea21efa5be9551e42983783c17c299b by shankari
Add support for skipping as a mode of authorization
remove the skipAuth flag forever and substitute it with a `skip` auth
method
(commit: 89a2dfdc8ea21efa5be9551e42983783c17c299b)
The file was modifiedemission/net/api/cfc_webapp.py (diff)
The file was modifiedemission/net/auth/auth.py (diff)
The file was addedemission/net/auth/skip.py
Commit 996bd1a37af50882d4fa96abc43e4caf5f481b0d by shankari
Move the keys.json file into a sample file
Similar to 48e5a60cea216e9c03d75b8beea41a177c47cc6c. Allows us to add
entries without causing merge conflicts Note that we don't add fallback
code to read from the sample file if the real one does not exist. This
is because the most auth (except for skip) will fail if not configured
properly, and we want to fail fast in that case
(commit: 996bd1a37af50882d4fa96abc43e4caf5f481b0d)
The file was addedconf/net/keys.json.sample
The file was removedconf/net/keys.json
Commit c0d5329ae8e037e3ee9501102ca781540b121813 by shankari
Restructure keys.json by pulling out specific auth configs into
separate files
This makes it much cleaner to configure each auth, and also makes it
much more plugin-able
(commit: c0d5329ae8e037e3ee9501102ca781540b121813)
The file was addedconf/net/auth/google_auth.json.sample
The file was modifiedconf/net/keys.json.sample (diff)
The file was modifiedemission/net/auth/google_auth.py (diff)
The file was modifiedemission/net/auth/token_list.py (diff)
The file was addedconf/net/auth/token_list.json.sample
Commit 83daf587ad7afb686329cb376bfbce62f9f9572c by shankari
Add support for open id authentication
Add a new auth method (open id) that retrieves the configuration from
an open source auth server. Extracted from
https://github.com/e-mission/e-mission-server/pull/524 Thanks to
@Andrew-Tan for the contribution!
(commit: 83daf587ad7afb686329cb376bfbce62f9f9572c)
The file was addedemission/net/auth/openid_auth.py
The file was addedconf/net/auth/openid_auth.json.sample
The file was modifiedemission/net/auth/auth.py (diff)
Commit 9c87ff53d349800140f2f2c08c72d64bcde443e2 by shankari
Initial version of the code to switch the google client library
used for validating tokens. Will check in any fixes after testing. This
fixes #520
(commit: 9c87ff53d349800140f2f2c08c72d64bcde443e2)
The file was modifiedemission/net/auth/google_auth.py (diff)
Commit 384028a2801c0a0a592d1c826532e68aa1c40f1b by shankari
Minor fixes to the refactored google auth code
Found in testing. Bulk of the change was in
9c87ff53d349800140f2f2c08c72d64bcde443e2
Verified that with these changes, both the library-based and the URL
based token validation worked.
> tokenFields from library = {u'aud':
u'97387382925-caup6t5g8fho7d7ctf78d8l9f4avre4p.apps.googleusercontent.com',
u'iss': u'https://accounts.google.com', u'email_verified': True,
u'at_hash': u'TZoSpy3aQrFNjEY5X1Gu5A', u'exp': 1511249263, u'azp':
u'97387382925-caup6t5g8fho7d7ctf78d8l9f4avre4p.apps.googleusercontent.com',
u'iat': 1511245663, u'email': u'e.mission.berkeley.test@gmail.com',
u'sub': u'101968188992313593058'}
Tested by adding a manual `raise ValueError` into the try block.
> 2017-11-20 22:39:39,161:DEBUG:123145559191552:OAuth failed to verify
id token, falling back to constructedURL
> 2017-11-20 22:39:39,312:DEBUG:123145559191552:tokenFields from
constructedURL= {u'issued_to':
u'97387382925-caup6t5g8fho7d7ctf78d8l9f4avre4p.apps.googleusercontent.com',
u'user_id': u'101968188992313593058', u'email_verified': True,
u'expires_in': 2883, u'audience':
u'97387382925-caup6t5g8fho7d7ctf78d8l9f4avre4p.apps.googleusercontent.com',
u'issued_at': 1511245663, u'email':
u'e.mission.berkeley.test@gmail.com', u'issuer':
u'https://accounts.google.com'}
(commit: 384028a2801c0a0a592d1c826532e68aa1c40f1b)
The file was modifiedemission/net/auth/google_auth.py (diff)
Commit 1f329d42fff5d25a370d99d4cd11a695ca6e90ec by shankari
Minor fixes to deal with the lack of a default keys.json
- comment out the moves code. this will soon be removed, but I want to
do that
in a separate plugin
- move the code that reads the SSL keys into the SSL case. So the
default (dev)
server can still startup without any configuration.
(commit: 1f329d42fff5d25a370d99d4cd11a695ca6e90ec)
The file was modifiedemission/net/api/cfc_webapp.py (diff)
Commit 3f80d8623cb4acf2d89bd7a6bc55fd5c49baddae by shankari
Initial version of the switch from ionic to firebase for the push
notifications
This is essentially the same code as the one that is running on the
server right now. It was generated by a patch from the server. The only
change is to replace the hardcoded API key on the server with the value
read from the config file, to avoid leaking that information.
(commit: 3f80d8623cb4acf2d89bd7a6bc55fd5c49baddae)
The file was modifiedemission/net/ext_service/push/notify_queries.py (diff)
The file was modifiedemission/net/ext_service/push/notify_interface.py (diff)
The file was modifiedemission/net/ext_service/push/notify_usage.py (diff)
Commit da5749de83a7162a9a9f08dda015f3533e0f2ddf by shankari
Restructure the notification code to support multiple push providers
Current examples are ionic and firebase. Can add others later if we
want. Still haven't switched the rest of the code to use this new
interface.
(commit: da5749de83a7162a9a9f08dda015f3533e0f2ddf)
The file was addedemission/net/ext_service/push/notify_interface_impl/firebase.py
The file was addedemission/net/ext_service/push/notify_interface_impl/ionic.py
The file was modifiedemission/net/ext_service/push/notify_queries.py (diff)
The file was modifiedemission/net/ext_service/push/notify_interface.py (diff)
The file was addedemission/net/ext_service/push/notify_interface_impl/__init__.py
Commit 5959cc33a05d9c1a3bdb381d6719b8913974c810 by shankari
Use the new interface + minor fixes
- use the new interface in the usage
- refactor `display_response` to be interface-specific as well
- add the `get_interface` call so that the factory actually does work
- add a `getDefaultInterface` to the method to avoid passing in the
provider every time
(commit: 5959cc33a05d9c1a3bdb381d6719b8913974c810)
The file was modifiedemission/net/ext_service/push/notify_interface_impl/ionic.py (diff)
The file was modifiedemission/net/ext_service/push/notify_interface.py (diff)
The file was modifiedemission/net/ext_service/push/notify_interface_impl/firebase.py (diff)
The file was modifiedemission/net/ext_service/push/notify_usage.py (diff)
The file was modifiedemission/net/api/cfc_webapp.py (diff)
The file was modifiedrequirements.txt (diff)
The file was modifiedemission/tests/common.py (diff)
The file was addedemission/tests/netTests/TestAuthSelection.py
The file was modifiedemission/tests/netTests/TestAuthSelection.py (diff)
The file was modifiedemission/tests/netTests/TestAuthSelection.py (diff)
Commit c417b830de60e74c60a423d6baeb2f8006786ab6 by shankari
Switch the google client library
Corresponding to 9c87ff53d349800140f2f2c08c72d64bcde443e2 and
384028a2801c0a0a592d1c826532e68aa1c40f1b, use the new google auth
library
(commit: c417b830de60e74c60a423d6baeb2f8006786ab6)
The file was modifiedrequirements.txt (diff)
Commit 6aa00e93092d5963b1f92b32c677b3e43ecde1cf by shankari
Remove the google auth stuff as well until the new packages are
installed
(commit: 6aa00e93092d5963b1f92b32c677b3e43ecde1cf)
The file was modifiedemission/tests/netTests/TestAuthSelection.py (diff)
Commit c5cc3b9fa636126642436b610c102b6176671eb9 by shankari
Add a three more tests that test the complete authentication workflow
Using the simple to use "skip" and "token_list" auth methods
(commit: c5cc3b9fa636126642436b610c102b6176671eb9)
The file was modifiedemission/tests/netTests/TestAuthSelection.py (diff)
Commit 7b9d327b5f59fdccd6b3d4b3dc1834e25eaca462 by shankari
Added one more test for the __getEmail__ method
which is really supposed to be used in only one place. Renamed
`__getEmail` to `__getEmail__`, otherwise, I can't access it from the
test. I am not quite sure why - it worked from `cfc_webapp.py`, but
don't have time to debug now, and it is not incorrect to have the
method like this.
(commit: 7b9d327b5f59fdccd6b3d4b3dc1834e25eaca462)
The file was modifiedemission/net/api/cfc_webapp.py (diff)
The file was modifiedemission/tests/netTests/TestAuthSelection.py (diff)
The file was modifiedemission/net/auth/auth.py (diff)
Commit fee1317a85926636887deb9f799d8dc356b0a828 by shankari
Use single _ instead of two __ since _getEmail is used outside the
module
+ fix code which requires google auth and new libraries
(commit: fee1317a85926636887deb9f799d8dc356b0a828)
The file was modifiedemission/tests/netTests/TestAuthSelection.py (diff)
The file was modifiedemission/net/auth/auth.py (diff)
The file was modifiedemission/net/api/cfc_webapp.py (diff)
Commit bf635d2da1749eca39783bf886ce805aa5020005 by shankari
Add the provider tag to the push notification sample as well
Since the provider choice is now pluginable
(commit: bf635d2da1749eca39783bf886ce805aa5020005)
The file was modifiedconf/net/ext_service/push.json.sample (diff)
Commit dbd8aa2b20f08324e56a577d4f12d4da90e970f7 by shankari
Store the token mappings so that we don't have to look them up
constantly
NOTE: android mappings are not currently stored - need to figure out
what response we get for them
(commit: dbd8aa2b20f08324e56a577d4f12d4da90e970f7)
The file was modifiedemission/core/get_database.py (diff)
The file was modifiedemission/net/ext_service/push/notify_interface_impl/firebase.py (diff)
The file was modifiedemission/tests/netTests/TestAuthSelection.py (diff)
Commit 7e97ee1ecf55de1e308bcb0bca8bc37fe8349c72 by shankari
Add tests for the push code + fixes found while running the test
(commit: 7e97ee1ecf55de1e308bcb0bca8bc37fe8349c72)
The file was addedemission/tests/netTests/TestPush.py
The file was modifiedemission/net/ext_service/push/notify_interface.py (diff)
The file was modifiedemission/net/ext_service/push/notify_interface_impl/ionic.py (diff)
The file was modifiedemission/net/ext_service/push/notify_usage.py (diff)
Commit 6dd1ddb7f758fdb764a2def03c8909092b07d67e by shankari
Disable firebase tests until the new modules from requirements.txt are
loaded
(commit: 6dd1ddb7f758fdb764a2def03c8909092b07d67e)
The file was modifiedemission/tests/netTests/TestPush.py (diff)
The file was modifiedrequirements.txt (diff)
The file was modifiedemission/net/ext_service/push/notify_queries.py (diff)
The file was modifiedemission/tests/netTests/TestPush.py (diff)
Commit 7138bc563c0cf09d396b3ab1376b9782d41cca6e by shankari
Check in additional logging to see why the configuration is not loaded
(commit: 7138bc563c0cf09d396b3ab1376b9782d41cca6e)
The file was modifiedemission/tests/netTests/TestPush.py (diff)
Commit 75674f546260d50cdb9eb5e088b4296c837dab62 by shankari
Remove code in the queries that reads the config
Since this code has moved over, we no longer need to use it
(commit: 75674f546260d50cdb9eb5e088b4296c837dab62)
The file was modifiedemission/net/ext_service/push/notify_queries.py (diff)
Commit 363739efdf313ca9e2b8505a9ef3ee5281ff208f by shankari
Add a script that will run a single test
Makes it easier to debug differences between versions
(commit: 363739efdf313ca9e2b8505a9ef3ee5281ff208f)
The file was addedrunSingleTestDebug.sh
Commit 63d5d40a3ccfe4c92a4d3fe068bf673b058f799b by shankari
Convert all logging to warning so that it is visible in the test
console
(commit: 63d5d40a3ccfe4c92a4d3fe068bf673b058f799b)
The file was modifiedemission/tests/netTests/TestPush.py (diff)
Commit 34303007a53b13c345290bf6aa38c766149fd9bc by shankari
Write a script to setup push before running the tests
Otherwise tests fail because the interface module is loaded before the
the test setup is run.
https://amplab.cs.berkeley.edu/jenkins/job/e-mission-server-prb/929/console
``` WARNING:root:push service not configured, push notifications not
supported WARNING:root:Finished setting up
conf/net/ext_service/push.json WARNING:root:Current values are
{u'server_auth_token': u'firebase_api_key', u'provider': u'ionic'}
EWARNING:root:Finished setting up conf/net/ext_service/push.json
WARNING:root:Current values are {u'server_auth_token':
u'firebase_api_key', u'provider': u'ionic'} EWARNING:root:Finished
setting up conf/net/ext_service/push.json WARNING:root:Current values
are {u'server_auth_token': u'firebase_api_key', u'provider': u'ionic'}
```
Note that this doesn't happen when I test locally.
```
$ ./runSingleTestDebug.sh 2017-11-27
19:46:30,071:WARNING:140737149985728:Finished setting up
conf/net/ext_service/push.json 2017-11-27
19:46:30,071:WARNING:140737149985728:Current values are
{u'server_auth_token': u'firebase_api_key', u'provider': u'ionic'}
2017-11-27 19:46:30,073:DEBUG:140737149985728:module_name =
emission.net.ext_service.push.notify_interface_impl.ionic 2017-11-27
19:46:30,073:DEBUG:140737149985728:module = <module
'emission.net.ext_service.push.notify_interface_impl.ionic' from
'/Users/shankari/e-mission/e-mission-server/emission/net/ext_service/push/notify_interface_impl/ionic.pyc'>
```
(commit: 34303007a53b13c345290bf6aa38c766149fd9bc)
The file was addedbin/deploy/push_conf.py
Commit 6758a06574b324f0930adaa890f481450985a405 by shankari
Convert logging back to debug
Now that the tests pass
https://amplab.cs.berkeley.edu/jenkins//job/e-mission-server-prb/930/
(commit: 6758a06574b324f0930adaa890f481450985a405)
The file was modifiedemission/tests/netTests/TestPush.py (diff)
The file was modifiedemission/net/api/cfc_webapp.py (diff)