Commit Graph

139 Commits

Author SHA1 Message Date
Ryan Ahearn
00e14dbaf7 Add a sandbox environment for manual testing on cloud.gov 2022-11-09 12:21:46 -05:00
Ryan Ahearn
a87494235b Replace old notifications- service prefix with notify- 2022-11-07 12:15:54 -05:00
Ryan Ahearn
3c74027a4a Add demo application environment 2022-11-02 16:05:53 -04:00
Ryan Ahearn
4fce69f0ac Merge branch 'main' into cleanup-config
* main:
  lingering merge repair
  remove alerts from env
  remove broadcast-related code
2022-10-26 13:23:01 +00:00
Ryan Ahearn
d98e25180f Use nonexistant buckets in testing to verify mocks 2022-10-26 13:19:07 +00:00
Ryan Ahearn
921c872bd1 Refactor method of retrieving credentials out of VCAP_SERVICES 2022-10-20 08:36:30 -04:00
Ryan Ahearn
d87d673b85 Consolidate and simplify environment variables and config.py 2022-10-19 20:29:45 +00:00
stvnrlly
f16b5dd1c4 remove broadcast-related code 2022-10-04 03:04:13 +00:00
Ryan Ahearn
5f1a1f083a Proactively specify aws region for s3 operations 2022-09-26 10:25:03 -04:00
Ryan Ahearn
a90dcc918b Provide s3 credentials for each individual bucket 2022-09-23 12:59:55 -04:00
Ryan Ahearn
7ce9f8cfcb Remove MOU bucket, for now 2022-09-21 23:18:15 -04:00
Ryan Ahearn
b823c2d04f Create s3 buckets that aren't shared with api 2022-09-21 23:18:15 -04:00
Ryan Ahearn
271cf7643d Connect to s3 buckets created by notifications-api 2022-09-21 23:18:10 -04:00
jimmoffet
c702104421 fix redis mocking for test runner 2022-09-12 17:38:53 -07:00
jimmoffet
68e6efdad0 remove redis debug config var 2022-09-08 09:07:54 -07:00
jimmoffet
1f7fa07a79 finally fix redis 2022-09-07 21:32:33 -07:00
Ryan Ahearn
dfea3ac848 Install pa11y-ci 2022-08-30 10:37:33 -04:00
Ryan Ahearn
3341c08245 Add owasp baseline scan with Scanning environment 2022-08-26 17:08:35 -04:00
Ryan Ahearn
a2913f8b9c Fix static-scan findings 2022-08-26 17:55:31 +00:00
jimmoffet
dad051a662 2767 passing 2022-08-05 00:25:03 -07:00
jimmoffet
9315474b75 correct local url 2022-08-03 18:23:02 -07:00
James Moffet
17e25d6f61 comments 2022-07-26 11:24:36 -07:00
James Moffet
4c25a81004 disable cache until we can fix on cloud deployment 2022-07-26 11:17:43 -07:00
James Moffet
e6b36becf1 more config 2022-07-25 15:18:39 -07:00
James Moffet
772731e73e stop using UK cdn for images 2022-07-21 18:54:21 -07:00
James Moffet
50e660a73f devcontainer config 2022-07-19 18:23:48 -07:00
James Moffet
6ad5cefe30 minor configs 2022-07-15 13:53:48 -05:00
Jim Moffet
1c5d432427 clean up and turn off auth for test env 2022-07-01 11:19:58 -07:00
Jim Moffet
1e979ad519 fix basic auth for live environment 2022-07-01 07:58:58 -07:00
Jim Moffet
509cce38f4 set up basicauth config to protect staging site 2022-06-30 17:05:42 -07:00
Christa Hartsock
6d3f67fb9b Initial config for local deployments
Not yet working properly on cloud.gov
2022-06-23 15:53:23 -07:00
Jim Moffet
e17c26d1f6 config buckets 2022-06-23 14:08:29 -07:00
Jim Moffet
2b727e13b4 local dev upgrades 2022-06-13 14:26:46 -07:00
Leo Hemsted
3bda2aa36c remove redis_enabled flag
there's no reason we need to configure this per environment. You can
still use it as before for local development
2022-04-22 12:21:27 +01:00
Katie Smith
66382c240a Delete unused config variable 2022-02-25 11:37:23 +00:00
Chris Hill-Scott
4f672cb5dc Make logo CDN domain into simple config
Having this as a function which does string parsing and manipulation
surprised me a bit when I was trying to figure out why something wasn’t
working.

It’s more in line with the way we do other config like this (for example
`ASSET_PATH`) to make it a simple config variable, rather than trying to
be clever and guess things based on other config variables.

It’s also less code, and is explicit enough that it doesn’t need tests.
2022-01-27 10:33:05 +00:00
Leo Hemsted
86c413557c move financial deets to an environment variable
lets us keep cabinet office financials safe in the credentials repo

the dict in the creds repo will either be an empty dict or a full dict,
so the env var on paas will always contain some parseable json. But
locally it might not, so if it's not set at all then default to the
string `null` so the json parsing doesn't throw a wobbly.
2021-09-08 10:19:46 +01:00
Ben Thorner
b3f48c1a84 Backup original precompiled uploads to S3
This continues the work from Template Preview [1], so that we have
a complete store of original PDFs to use for testing changes to it.

Previously we did store some originals, but these were only invalid
PDFs that had failed sanitisation; for valid PDFs, the "transient"
bucket only contains the sanitised versions, which the API deletes
/ moves when the notification is sent [2].

Since the notification is only created at a later stage [3], there's
no easy way to get the final name of the PDF we send to DVLA. Instead,
we use the "upload_id", which eventually becomes the notification ID
[4]. This should be enough to trace the file for specific debugging.

Note that we only want to store original PDFs if they're valid (and
virus free!), since there's no point testing changes with bad data.

[1]: https://github.com/alphagov/notifications-template-preview/pull/545
[2]: c44ec57c17/app/service/send_notification.py (L212)
[3]: 7930a53a58/app/main/views/uploads.py (L362)
[4]: 7930a53a58/app/main/views/uploads.py (L373)
2021-06-24 12:21:05 +01:00
Rebecca Law
b1d78ada83 Let the API handle setting the default free allowance.
The API has a method to handle setting the default SMS free allowance. This will save a call to the API and remove some code duplication between the two apps.

Needs to be merged after https://github.com/alphagov/notifications-api/pull/3197
2021-04-07 09:32:18 +01:00
Chris Hill-Scott
18a96d3243 Merge pull request #3830 from alphagov/remove-2020-allowances
Remove 2020/21 free allowance data
2021-04-01 10:40:29 +01:00
Chris Hill-Scott
6c8bfdc5b0 Refactor failed login count
We don’t vary this between different environments so it doesn’t need to
be in the config.

I was trying to look up what this value was and found it a bit confusing
that it was spread across multiple places.
2021-03-19 15:20:11 +00:00
Chris Hill-Scott
ef50649572 Remove 2020/21 free allowance data
🚨 Do not merge until after 1 April 2020 🚨

Once this date has past we no longer need to give any services the
previous allowances, so we can remove them from the codebase to avoid
confusion.

It’s possible we change the allowance structure again, but it might
change in a way that this config-based logic doesn’t account for (what
if we did a per-organisation allowance for example). Having both years’
allowances in the config was a quick fix, not a foundation to build on.
2021-03-10 14:51:40 +00:00
Chris Hill-Scott
61f605ff67 Add new rates for 2021
These are the new rates from
https://docs.google.com/document/d/1aObNQNBw3ayPMl3b_Qc5kZBdaXIAMDnBGtV-xPtFBsc/edit?ts=603f68ea#

We’re changing the free allowance so we can continue to support all the
teams that use Notify. The new allowance means over 90% of teams can
still send all the text messages they need to without paying.
2021-03-08 16:59:29 +00:00
Chris Hill-Scott
9a3f2c30ef Use underscores to notate 1000s
This is easier to read than using multiplication, or nothing.
2021-03-08 16:57:57 +00:00
Chris Hill-Scott
bac54462db Change config structure so allowances are dated
We’re going to have different allowances next financial year. This means
that when someone adds a service, we’ll need to check which year it is,
so we can give them the right allowance.

This commit changes the config structure so that the current allowances
are explicitly assigned to the 2020/21 financial year.

It freezes the tests to the 2020/21 financial year, so they won’t start
failing automatically when next financial year comes around.
2021-03-08 14:25:26 +00:00
Chris Hill-Scott
13b63e1a24 Remove reference to styleguide from config
The styleguide no longer exists, so this variable isn’t referred to from
anywhere.
2020-10-16 10:29:26 +01:00
Leo Hemsted
626b1c4211 enable broadcast org in all environments
This organisation is defined in the config file. It's hard coded to a
UUID as defined in the api db migration 0331_add_broadcast_org.
2020-09-25 13:42:13 +01:00
Leo Hemsted
c7ef7d5083 Merge pull request #3643 from alphagov/broadcast-org
move service to broadcast org when broadcasting is enabled
2020-09-24 13:13:34 +01:00
Chris Hill-Scott
6f389d044e Don’t use $yellow to indicate local environment
It clashes with the new `$govuk-focus-colour` now. This commit changes
it to half way between `govuk-colour("dark-grey")` (`#505a5f`) and
`govuk-colour("mid-grey")` (`#b1b4b6`) from the Design System. Dark was
too dark and mid was too light.

It also adds a line of JS to let us easily switch the header to blue by
clicking on it, which is useful for taking screenshots etc.
2020-09-23 11:02:21 +01:00
Leo Hemsted
93d1137474 move service to broadcast org when broadcasting is enabled
we want to keep track of all broadcast services across govt easily. As
such, when broadcasting is enabled for a service, we've decided we're
going to add the service to a special broadcasting organisation.

This organisation is defined in the config file. It's hard coded for
production, if you want to test locally, you should set
BROADCAST_ORGANISATION_ID in your local environment.
2020-09-22 18:18:00 +01:00