Commit Graph

2269 Commits

Author SHA1 Message Date
Ken Tsang
c94b4f1b46 Removed unused import 2017-03-29 11:05:31 +01:00
Ken Tsang
af78efd137 Fix get_detailed_services BST 2017-03-29 11:03:28 +01:00
kentsanggds
79025e54b0 Merge pull request #865 from alphagov/add-v2-template-preview
Add v2 template preview endpoint and schema
2017-03-28 18:40:32 +01:00
Leo Hemsted
3b24d6d9be Merge pull request #871 from alphagov/fix-api-keys
ensure we're passing through api keys and key types from notifications
2017-03-28 14:16:39 +01:00
Leo Hemsted
d639aa22df skip failing timezone test
TODO fixme
2017-03-28 14:02:47 +01:00
Leo Hemsted
11919d9810 update notification rest tests 2017-03-28 13:51:42 +01:00
Andras Ferencz-Szabo
ecfe81cb17 Merge pull request #870 from alphagov/paas_final_routes
Add final routes to the Paas app
2017-03-28 13:28:11 +01:00
Leo Hemsted
25d1777937 ensure we're passing through api keys and key types from notifications
when we made the change to async persist notifications, we forgot to
pass through api_key_id and key_type. in send_sms/email, for legacy
reasons, they default to None/KEY_TYPE_NORMAL, so regardless of what
your api key was set up as, we would send real messages!

TODO: Once the PaaS transition is complete and the task changes are
reverted, remove the api_key_id and key_type params from the send_*
tasks entirely, as those are only called from the csv job flow, and
don't need them
2017-03-28 13:14:46 +01:00
bandesz
eaf1e5bb72 Add final routes to the Paas app 2017-03-28 12:24:12 +01:00
Rebecca Law
d5f8b4d80b Merge pull request #869 from alphagov/utils-update
Use 500 for org id
2017-03-27 17:58:56 +01:00
Rebecca Law
31979c3272 Use 500 for org id 2017-03-27 17:49:09 +01:00
minglis
d7adfcaf87 Merge pull request #866 from alphagov/no-downtime-hosting-migration
Reinstating the 2 task model for API submitted notifications.
2017-03-27 13:54:43 +01:00
Rebecca Law
0705cf2f7c Update requirements.txt
pin version of six to resolve deployment issues
2017-03-27 11:12:39 +01:00
Rebecca Law
4d6ab0238e Merge pull request #868 from alphagov/fix-dvla-file
Update the version of notifications-utils.
2017-03-24 15:34:12 +00:00
Rebecca Law
37a5ce601a Update the version of notifications-utils.
There was a problem with the address block for the DVLATemplate.

Added a countdown to the build_dvla_file.
2017-03-24 15:25:02 +00:00
bandesz
92c95fe66a Run the db migration script without the run_app_paas.sh script, because it is not failing if the migration script fails 2017-03-23 17:45:16 +00:00
Martyn Inglis
4b60c8dada Fixed faoiling jenkins tests. Mocked the required functions 2017-03-23 15:05:56 +00:00
Ken Tsang
dfaf38269b Refactored get template 2017-03-23 15:02:21 +00:00
Martyn Inglis
1c154c4113 Reinstating the 2 task model for API submitted notifications.
This is being done for the PaaS migration to allow us to keep traffic coming in whilst we migrate the database.

uses the same tasks as the CSV uploaded notifications. Simple changes to not persist the notification, and call into a different task.
2017-03-23 14:41:00 +00:00
Ken Tsang
50db538df7 Updated schema to remove redundant 'content' 2017-03-23 11:50:15 +00:00
Ken Tsang
41f82c0aef Refactored tests to use fake_uuid 2017-03-22 14:31:16 +00:00
Ken Tsang
ecbe87a0d6 Added letter preview 2017-03-22 14:22:26 +00:00
Ken Tsang
22239deb90 Removed redundant try block 2017-03-22 14:01:04 +00:00
Ken Tsang
8e5266e89b Refactor and fix auth errors 2017-03-22 10:54:15 +00:00
Ken Tsang
b81d789307 Add preview endpoint and tests 2017-03-22 10:11:31 +00:00
Ken Tsang
fbcea9c777 Refactored test for optionals 2017-03-22 10:10:06 +00:00
Ken Tsang
8d63f8d9d3 Refactored get template test 2017-03-22 10:10:06 +00:00
Ken Tsang
fad67e1bdd Added schemas + tests & updated get template tests 2017-03-22 10:10:05 +00:00
Andras Ferencz-Szabo
5fcc80c7be Merge pull request #864 from alphagov/paas_production
Paas production
2017-03-21 15:29:28 +00:00
bandesz
bacce90ac2 PaaS run script: redirect stderr to stdout 2017-03-21 15:03:03 +00:00
bandesz
974b59a5b7 Add 'production' alias for live environment 2017-03-21 14:43:56 +00:00
Rebecca Law
a4bb1f1f33 Merge pull request #861 from alphagov/secure-endpoints
Secure endpoints
2017-03-20 14:59:52 +00:00
Rebecca Law
34412eda9e Merge pull request #863 from alphagov/create-dvla-file
Added logging for any exception thrown in build_dvla_file
2017-03-17 17:37:17 +00:00
Rebecca Law
8225a57d50 reformat execption 2017-03-17 16:57:00 +00:00
Rebecca Law
d831447329 re-raise execption 2017-03-17 16:33:51 +00:00
Rebecca Law
a0ec8af7c9 Added logging for any exception thrown in build_dvla_file 2017-03-17 16:25:27 +00:00
Rebecca Law
37293b6c7a Added a test to ensure that all blueprints have a registered before_request method.
Added a test for the status endpoint.
2017-03-17 16:21:41 +00:00
Rebecca Law
ad9effbe6e Merge pull request #862 from alphagov/create-dvla-file
Update statsd decorator so that it will log on error.
2017-03-17 14:57:59 +00:00
Rebecca Law
26576622b1 Only record the statsd timing on success. 2017-03-17 13:33:57 +00:00
Rebecca Law
f01760f6e6 Update statsd decorator so that it will log on error.
Added logging for the build_dvla_file task
2017-03-17 12:38:24 +00:00
Rebecca Law
e4e7a99f40 Merge branch 'master' into secure-endpoints
Conflicts:
	app/__init__.py
2017-03-17 10:24:12 +00:00
Rebecca Law
502191f500 Merge pull request #860 from alphagov/create-dvla-file
Create dvla file for a letter job
2017-03-17 10:21:46 +00:00
Rebecca Law
d090451dd8 Update code as per review comment. 2017-03-17 10:01:28 +00:00
Rebecca Law
78242812ef Register a before_request event for all blueprints, that defines the authentication requirement.
There are three authentication methods:
 - requires_no_auth - public endpoint that does not require an Authorisation header
 - requires_auth - public endpoints that need an API key in the Authorisation header
 - requires_admin_auth - private endpoint that requires an Authorisation header which contains the API key for the defined as the client admin user
2017-03-16 18:15:49 +00:00
bandesz
c032ea5eee PaaS rollback: check if the rollback app is in a started state 2017-03-16 12:33:10 +00:00
Rebecca Law
f880604c85 First attempt at securing the endpoints.
Started with adding a before_request event to the service_blueprint, which executes the requires_admin_auth method rather than the require_auth method.

Obviously this is not done but want to get this in front of people to get an opinion.
2017-03-16 10:42:45 +00:00
Rebecca Law
4e48676607 Remove comment 2017-03-15 17:08:27 +00:00
Rebecca Law
13d1016982 Forgot to make the id unique 2017-03-15 17:07:52 +00:00
Rebecca Law
fd00351ad2 Testing out adding a admin authentication requirement per blueprint. 2017-03-15 16:52:44 +00:00
kentsanggds
bcaed2ac73 Merge pull request #856 from alphagov/add-v2-template-get-id
Added v2 template get ID endpoint, schema & tests
2017-03-15 16:40:43 +00:00