Merge pull request #173 from GSA/main

Deploy to demo environment
This commit is contained in:
Ryan Ahearn
2022-11-03 14:07:58 -04:00
committed by GitHub
46 changed files with 412 additions and 307 deletions

68
.github/workflows/deploy-demo.yml vendored Normal file
View File

@@ -0,0 +1,68 @@
name: Deploy to demo environment
on:
push:
branches: [ production ]
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
environment: demo
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Check for changes to Terraform
id: changed-terraform-files
uses: tj-actions/changed-files@v1.1.2
with:
files: terraform/demo
- name: Terraform init
if: steps.changed-terraform-files.outputs.any_changed == 'true'
working-directory: terraform/demo
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }}
run: terraform init
- name: Terraform apply
if: steps.changed-terraform-files.outputs.any_changed == 'true'
working-directory: terraform/demo
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }}
TF_VAR_cf_user: ${{ secrets.CLOUDGOV_USERNAME }}
TF_VAR_cf_password: ${{ secrets.CLOUDGOV_PASSWORD }}
run: terraform apply -auto-approve -input=false
- uses: ./.github/actions/setup-project
- name: Deploy to cloud.gov
uses: 18f/cg-deploy-action@main
env:
DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }}
BASIC_AUTH_PASSWORD: ${{ secrets.BASIC_AUTH_PASSWORD }}
REDIS_ENABLED: ${{ secrets.REDIS_ENABLED }}
with:
cf_username: ${{ secrets.CLOUDGOV_USERNAME }}
cf_password: ${{ secrets.CLOUDGOV_PASSWORD }}
cf_org: gsa-tts-benefits-studio-prototyping
cf_space: notify-demo
push_arguments: >-
--vars-file deploy-config/staging.yml
--var DANGEROUS_SALT="$DANGEROUS_SALT"
--var SECRET_KEY="$SECRET_KEY"
--var AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID"
--var AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY"
--var REDIS_ENABLED="$REDIS_ENABLED"
--var ADMIN_CLIENT_USERNAME="notify-admin"
--var ADMIN_CLIENT_SECRET="$ADMIN_CLIENT_SECRET"
--var BASIC_AUTH_USERNAME="curiousabout"
--var BASIC_AUTH_PASSWORD="$BASIC_AUTH_PASSWORD"

View File

@@ -15,13 +15,8 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: staging
steps:
- name: Install container dependencies
run: |
sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
libcurl4-openssl-dev
- uses: actions/checkout@v3
with:
fetch-depth: 2
@@ -48,31 +43,25 @@ jobs:
TF_VAR_cf_password: ${{ secrets.CLOUDGOV_PASSWORD }}
run: terraform apply -auto-approve -input=false
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install application dependencies
run: make bootstrap
- uses: ./.github/actions/setup-project
- name: Deploy to cloud.gov
uses: 18f/cg-deploy-action@main
env:
DANGEROUS_SALT: ${{ secrets.PROD_DANGEROUS_SALT }}
SECRET_KEY: ${{ secrets.PROD_SECRET_KEY }}
DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ADMIN_CLIENT_SECRET: ${{ secrets.PROD_ADMIN_CLIENT_SECRET }}
ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }}
BASIC_AUTH_PASSWORD: ${{ secrets.BASIC_AUTH_PASSWORD }}
REDIS_ENABLED: ${{ secrets.REDIS_ENABLED }}
with:
cf_username: ${{ secrets.CLOUDGOV_USERNAME }}
cf_password: ${{ secrets.CLOUDGOV_PASSWORD }}
cf_org: gsa-10x-prototyping
cf_space: 10x-notifications
cf_org: gsa-tts-benefits-studio-prototyping
cf_space: notify-staging
push_arguments: >-
--var env=staging
--vars-file deploy-config/staging.yml
--var DANGEROUS_SALT="$DANGEROUS_SALT"
--var SECRET_KEY="$SECRET_KEY"
--var AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID"
@@ -87,4 +76,6 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'Checks failed, not deploying'
- uses: actions/github-script@v6
with:
script: core.setFailed('Checks failed, not deploying')

79
.github/workflows/terraform-demo.yml vendored Normal file
View File

@@ -0,0 +1,79 @@
name: Run Terraform plan in demo
on:
pull_request:
branches: [ production ]
paths: [ 'terraform/**' ]
defaults:
run:
working-directory: terraform/demo
jobs:
terraform:
name: Terraform plan
runs-on: ubuntu-latest
environment: demo
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Terraform format
id: format
run: terraform fmt -check
- name: Terraform init
id: init
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }}
run: terraform init
- name: Terraform validate
id: validation
run: terraform validate -no-color
- name: Terraform plan
id: plan
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }}
TF_VAR_cf_user: ${{ secrets.CLOUDGOV_USERNAME }}
TF_VAR_cf_password: ${{ secrets.CLOUDGOV_PASSWORD }}
run: terraform plan -no-color -input=false 2>&1 | tee plan_output.txt
- name: Read Terraform plan output file
id: terraform_output
uses: juliangruber/read-file-action@v1
if: ${{ always() }}
with:
path: ./terraform/demo/plan_output.txt
# inspiration: https://learn.hashicorp.com/tutorials/terraform/github-actions#review-actions-workflow
- name: Update PR
uses: actions/github-script@v6
# we would like to update the PR even when a prior step failed
if: ${{ always() }}
with:
script: |
const output = `Terraform Format and Style: ${{ steps.format.outcome }}
Terraform Initialization: ${{ steps.init.outcome }}
Terraform Validation: ${{ steps.validation.outcome }}
Terraform Plan: ${{ steps.plan.outcome }}
<details><summary>Show Plan</summary>
\`\`\`\n
${{ steps.terraform_output.outputs.content }}
\`\`\`
</details>
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})

View File

@@ -2,7 +2,7 @@ name: Run Terraform plan in production
on:
pull_request:
branches: [ production ]
branches: [ production-disabled-for-now ]
paths: [ 'terraform/**' ]
defaults:
@@ -38,8 +38,8 @@ jobs:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }}
TF_VAR_cf_user: ${{ secrets.CF_USERNAME }}
TF_VAR_cf_password: ${{ secrets.CF_PASSWORD }}
TF_VAR_cf_user: ${{ secrets.CLOUDGOV_USERNAME }}
TF_VAR_cf_password: ${{ secrets.CLOUDGOV_PASSWORD }}
run: terraform plan -no-color -input=false 2>&1 | tee plan_output.txt
- name: Read Terraform plan output file
@@ -51,7 +51,7 @@ jobs:
# inspiration: https://learn.hashicorp.com/tutorials/terraform/github-actions#review-actions-workflow
- name: Update PR
uses: actions/github-script@v4
uses: actions/github-script@v6
# we would like to update the PR even when a prior step failed
if: ${{ always() }}
with:
@@ -71,7 +71,7 @@ jobs:
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`;
github.issues.createComment({
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,

View File

@@ -13,6 +13,7 @@ jobs:
terraform:
name: Terraform plan
runs-on: ubuntu-latest
environment: staging
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -50,7 +51,7 @@ jobs:
# inspiration: https://learn.hashicorp.com/tutorials/terraform/github-actions#review-actions-workflow
- name: Update PR
uses: actions/github-script@v4
uses: actions/github-script@v6
# we would like to update the PR even when a prior step failed
if: ${{ always() }}
with:
@@ -70,7 +71,7 @@ jobs:
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`;
github.issues.createComment({
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,

View File

@@ -148,6 +148,10 @@ class Staging(Production):
HEADER_COLOUR = '#6F72AF' # $mauve
class Demo(Staging):
pass
class Scanning(Production):
BASIC_AUTH_FORCE = False
HTTP_PROTOCOL = 'http'
@@ -162,5 +166,6 @@ configs = {
'test': Test,
'scanning': Scanning,
'staging': Staging,
'demo': Demo,
'production': Production
}

View File

@@ -47,7 +47,7 @@ class ValidGovEmail:
message = '''
Enter a public sector email address or
<a class="govuk-link govuk-link--no-visited-state" href="{}">find out who can use Notify</a>
'''.format(url_for('main.who_can_use_notify'))
'''.format(url_for('main.features'))
if not is_gov_user(field.data.lower()):
raise ValidationError(message)

View File

@@ -293,15 +293,7 @@ def get_started():
@main.route('/using-notify/who-its-for')
def who_its_for():
return redirect(url_for('.who_can_use_notify'), 301)
@main.route('/using-notify/who-can-use-notify')
def who_can_use_notify():
return render_template(
'views/guidance/who-can-use-notify.html',
navigation_links=features_nav(),
)
return redirect(url_for('.features'), 301)
@main.route('/trial-mode')

View File

@@ -6,7 +6,7 @@ from notifications_utils.international_billing_rates import (
from app.main import main
from app.main.forms import SearchByNameForm
from app.main.views.sub_navigation_dictionaries import pricing_nav
from app.main.views.sub_navigation_dictionaries import using_notify_nav
CURRENT_SMS_RATE = '1.72'
@@ -21,7 +21,7 @@ def pricing():
for cc, country in INTERNATIONAL_BILLING_RATES.items()
], key=lambda x: x[0]),
search_form=SearchByNameForm(),
navigation_links=pricing_nav(),
navigation_links=using_notify_nav(),
)
@@ -29,7 +29,7 @@ def pricing():
def how_to_pay():
return render_template(
'views/pricing/how-to-pay.html',
navigation_links=pricing_nav(),
navigation_links=using_notify_nav(),
)
@@ -39,9 +39,9 @@ def billing_details():
return render_template(
'views/pricing/billing-details.html',
billing_details=current_app.config['NOTIFY_BILLING_DETAILS'],
navigation_links=pricing_nav(),
navigation_links=using_notify_nav(),
)
return render_template(
'views/pricing/billing-details-signed-out.html',
navigation_links=pricing_nav(),
navigation_links=using_notify_nav(),
)

View File

@@ -22,10 +22,6 @@ def features_nav():
"name": "Roadmap",
"link": "main.roadmap",
},
{
"name": "Who can use Notify",
"link": "main.who_can_use_notify",
},
{
"name": "Security",
"link": "main.security",
@@ -37,29 +33,16 @@ def features_nav():
]
def pricing_nav():
return [
{
"name": "Pricing",
"link": "main.pricing",
},
{
"name": "How to pay",
"link": "main.how_to_pay",
},
{
"name": "Billing details",
"link": "main.billing_details",
},
]
def using_notify_nav():
return [
{
"name": "Get started",
"link": "main.get_started",
},
{
"name": "Pricing",
"link": "main.pricing",
},
{
"name": "Trial mode",
"link": "main.trial_mode_new",

View File

@@ -138,20 +138,7 @@
{% endblock %}
{% block footer %}
{% set meta_items = [
{
"href": url_for("main.privacy"),
"text": "Privacy"
},
{
"href": url_for("main.cookies"),
"text": "Cookies"
},
{
"href": url_for("main.accessibility_statement"),
"text": "Accessibility statement"
}
] %}
{% if current_service and current_service.research_mode %}
{% set meta_suffix = 'Built by the <a href="https://www.gsa.gov/about-us/organization/federal-acquisition-service/technology-transformation-services/tts-solutions" class="govuk-footer__link">Technology Transformation Service</a><span id="research-mode" class="research-mode">research mode</span>' %}
@@ -162,28 +149,6 @@
{{ govukFooter({
"classes": "js-footer",
"navigation": [
{
"title": "Support",
"columns": 1,
"items": [
{
"href": url_for('main.support'),
"text": "Contact support"
},
{
"href": "https://status.notifications.service.gov.uk",
"text": "System status"
},
{
"href": url_for('main.performance'),
"text": "Performance data"
},
{
"href": "https://ukgovernmentdigital.slack.com/messages/C0E1ADVPC",
"text": "Chat to us on Slack"
}
]
},
{
"title": "About Notify",
"columns": 1,
@@ -196,10 +161,6 @@
"href": url_for("main.roadmap"),
"text": "Roadmap"
},
{
"href": url_for("main.who_can_use_notify"),
"text": "Who can use Notify",
},
{
"href": url_for("main.security"),
"text": "Security"
@@ -208,28 +169,6 @@
"href": url_for("main.terms"),
"text": "Terms of use"
},
{
"href": "https://gds.blog.gov.uk/category/gov-uk-notify/",
"text": "Blog"
}
]
},
{
"title": "Pricing and payment",
"columns": 1,
"items": [
{
"href": url_for("main.pricing"),
"text": "Pricing"
},
{
"href": url_for("main.how_to_pay"),
"text": "How to pay"
},
{
"href": url_for("main.billing_details"),
"text": "Billing details"
}
]
},
{
@@ -240,6 +179,10 @@
"href": url_for("main.get_started"),
"text": "Get started"
},
{
"href": url_for("main.pricing"),
"text": "Pricing"
},
{
"href": url_for("main.trial_mode_new"),
"text": "Trial mode"
@@ -257,7 +200,17 @@
"text": "API documentation"
}
]
}
},
{
"title": "Support",
"columns": 1,
"items": [
{
"href": url_for('main.support'),
"text": "Contact us"
},
]
},
],
"meta": {
"items": meta_items,

View File

@@ -9,11 +9,11 @@
<p class="govuk-body">
Try again later.
</p>
<p class="govuk-body">
<!-- <p class="govuk-body">
You can check our <a class="govuk-link govuk-link--no-visited-state" href="https://status.notifications.service.gov.uk">system status</a> page to see if there are any known issues.
</p>
</p> -->
<p class="govuk-body">
To report a problem, email <a class="govuk-link govuk-link--no-visited-state" href="mailto:gov-uk-notify-support@digital.cabinet-office.gov.uk">gov-uk-notify-support@digital.cabinet-office.gov.uk</a>
To report a problem, please email <a class="govuk-link govuk-link--no-visited-state" href="mailto:tts-benefits-studio@gsa.gov">tts-benefits-studio@gsa.gov</a>.
</p>
</div>
</div>

View File

@@ -50,37 +50,6 @@
</div>
{% endif %}
{% endif %}
{#- The SVG needs `focusable="false"` so that Internet Explorer does not
treat it as an interactive element - without this it will be
'focusable' when using the keyboard to navigate. #}
<svg
role="presentation"
focusable="false"
class="govuk-footer__licence-logo"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 483.2 195.7"
height="17"
width="41"
>
<path
fill="currentColor"
d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"
/>
</svg>
<span class="govuk-footer__licence-description">
All content is available under the
<a
class="govuk-footer__link"
href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
rel="license"
>Open Government Licence v3.0</a>, except where otherwise stated
</span>
</div>
<div class="govuk-footer__meta-item">
<a
class="govuk-footer__link govuk-footer__copyright-logo"
href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/"
>© Crown copyright</a>
</div>
</div>
</div>

View File

@@ -9,8 +9,8 @@
{% block content_column_content %}
<h1 class="heading-large">Features</h1>
<p class="govuk-body">If you work for central government, a local authority or the NHS, you can use US Notify to keep your users updated.</p>
<p class="govuk-body">Notify makes it easy to create, customise and send:</p>
<p class="govuk-body">If you work for the federal government, you can use US Notify to keep your users updated.</p>
<p class="govuk-body">Notify makes it easy to create, customize and send:</p>
<ul class="list list-bullet">
<li><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.features_email') }}">emails</a></li>
<li><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.features_sms') }}">text messages</a></li>
@@ -70,8 +70,8 @@
<p class="govuk-body">Notify uses two-factor authentication (2FA) to keep your account secure. When you sign in, well send a unique one-time code to your phone and ask you to enter it before we let you use your account.</p>
<p class="govuk-body">Read more about <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.security') }}">security</a>.
<h2 class="heading-medium" id="support">Support</h2>
<!-- <h2 class="heading-medium" id="support">Support</h2>
<p class="govuk-body">Notify provides 24-hour online support. If you have an emergency outside office hours, well reply within 30 minutes.</p>
<p class="govuk-body">Find out more about <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.support') }}">support</a>.</p>
<p class="govuk-body">Find out more about <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.support') }}">support</a>.</p> -->
{% endblock %}

View File

@@ -15,9 +15,6 @@
<li class="get-started-list__item">
<h2 class="get-started-list__heading">Check if US Notify is right for you</h2>
<p class="govuk-body">Read about our <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.features') }}">features</a>, <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.pricing') }}">pricing</a> and <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.roadmap') }}">roadmap</a>.</p>
<p class="govuk-body">
Check <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.who_can_use_notify') }}">whether your organisation can use Notify</a>.
</p>
</li>
<li class="get-started-list__item">

View File

@@ -23,7 +23,7 @@
<h2 class="heading-medium">More information</h2>
<p class="govuk-body">The US Notify Service Manual has advice on:</p>
<p class="govuk-body">The UK Notify Service Manual has additional advice on:</p>
<ul class="list list-bullet">
<li><a class="govuk-link govuk-link--no-visited-state" href="https://www.gov.uk/service-manual/design/sending-emails-and-text-messages">planning and writing text messages and emails</a></li>

View File

@@ -1,51 +0,0 @@
{% extends "content_template.html" %}
{% from "components/page-header.html" import page_header %}
{% block per_page_title %}
Who can use Notify
{% endblock %}
{% block content_column_content %}
{{ page_header(
'Who can use Notify'
) }}
<p class="govuk-body">
US Notify is available to:
</p>
<ul class="list list-bullet">
<li>central government departments</li>
<li>emergency services</li>
<li>local authorities</li>
<li>the armed forces</li>
<li>the NHS and GP practices</li>
<li>state-funded schools</li>
</ul>
<p class="govuk-body">
If you work for one of these organisations but get an error when you try to create an account, <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.support') }}">contact support</a>.
</p>
<h2 class="govuk-heading-m" id="suppliers">Suppliers</h2>
<p class="govuk-body">
If youre doing work for a public sector organisation you can use US&nbsp;Notify.
</p>
<p class="govuk-body">
Someone from the public sector organisation youre working with needs to set up the account. Then they can invite you as a team member.
</p>
<h2 class="govuk-heading-m" id="charities">Charities</h2>
<p class="govuk-body">
Notify is not currently available to charities.
</p>
<h2 class="govuk-heading-m" id="public">Members of the public</h2>
<p class="govuk-body">
The US Notify service is only for people who work in the government
or other public sector organisations.
</p>
<p class="govuk-body">
<a class="govuk-link govuk-link--no-visited-state" href="https://www.gov.uk">Find government services and information on usa.gov</a>.
</p>
{% endblock %}

View File

@@ -67,7 +67,7 @@
{% endcall %}
</div>
<h2 id="letter-statuses" class="heading-medium">Letters</h2>
<!-- <h2 id="letter-statuses" class="heading-medium">Letters</h2>
<div class="bottom-gutter-3-2">
{% call mapping_table(
caption='Message statuses letters',
@@ -94,6 +94,6 @@
<p class="govuk-body">Every letter we send includes our printers address on the back of the envelope. Its not possible to customise the return address.</p>
<p class="govuk-body">Returned mail is destroyed by our printer.</p>
<p class="govuk-body">Each letter has a unique ID. Our printer sends us the ID of every letter they destroy. Well contact you if the IDs match any of your letters. This is a partly manual process, so it can take a few weeks.</p>
<p class="govuk-body">Each letter has a unique ID. Our printer sends us the ID of every letter they destroy. Well contact you if the IDs match any of your letters. This is a partly manual process, so it can take a few weeks.</p> -->
{% endblock %}

View File

@@ -9,7 +9,7 @@
{{ page_header('How to pay') }}
<p class="govuk-body">
<!-- <p class="govuk-body">
If you use US Notify to send text messages or letters, you may need to send us a <a class="govuk-link govuk-link--no-visited-state" href="#purchase-orders">purchase order</a>.
</p>
@@ -60,6 +60,6 @@
<p class="govuk-body">
Your organisation may need to <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.billing_details') }}">add the Cabinet Office as a supplier</a> before you can raise a <abbr title="purchase order">PO</abbr>.
</p>
</p> -->
{% endblock %}

View File

@@ -12,61 +12,87 @@
{{ content_metadata(
data={
"Last updated": "27 April 2022",
"Next review due": "12 July 2022"
"Last updated": "1 November 2022",
"Next review due on": "15 December 2022"
}
) }}
<p class="govuk-body">The US Notify roadmap shows what were working on and some of the <a class="govuk-link govuk-link--no-visited-state" href="#things-we-have-done">things weve done</a>.</p>
<p class="govuk-body">The roadmap is only a guide. It does not cover everything we do, and some things may change.</p>
<p class="govuk-body">The Notify roadmap shows what were working on and what we're planning to do next.</p>
<p class="govuk-body">This roadmap is only a guide. It does not cover everything we do, and some things may change.</p>
<p class="govuk-body">You can <a class="govuk-link govuk-link--no-visited-state" href="{{url_for('.support')}}">contact us</a> if you have any questions about the roadmap or suggestions for new features.</p>
<h2 class="heading-medium" id="things-we-are-working-on">Things were working on</h2>
<h2 class="heading-medium" id="things-we-are-working-on">What were working on</h2>
<h3 class="heading-small" id="now">Now</h3>
<p class="govuk-body">We are investigating the Notify concept, building on the notifications tool pioneered by the UK.</p>
<p class="govuk-body">To do this, we are convening a pilot with a small set of partners.</p>
<p class="govuk-body">Goals during this stage:</p>
<ul class="list list-bullet">
<li>Make it easier for services to pick their own <a class="govuk-link govuk-link--no-visited-state" href="{{url_for('main.branding_and_customisation')}}">email branding</a></li>
<li>Help services to get better value for money</li>
<li>Improve the time it takes some of our webpages to load</li>
<li>Achieve compliance to begin piloting, such as ATO and privacy standards</li>
<li>Demonstrate that a government-run notifications tool provides a unique value</li>
<li>Gather data from the pilot to improve the product</li>
</ul>
<p class="govuk-body">Features prioritized during this stage:</p>
<ul class="list list-bullet">
<li>Bulk, individually customizable one-way SMS sending via web UI</li>
<li>Organization permissions settings for various team members to edit/send</li>
<li>Reusable message templates</li>
<li>7-day records deletion</li>
<li>Message send/failure analytics</li>
</ul>
<h3 class="heading-small" id="next">Next</h3>
<p class="govuk-body">If the pilot is successful, we hope to recruit additional high-impact partners to improve outcomes for low-income individuals and families.</p>
<p class="govuk-body">Goals during this stage:</p>
<ul class="list list-bullet">
<li>Explore ways to share common content patterns</li>
<li>Make it easier for organisations to find the usage data they need</li>
<li>Complement Notify with practical guidance and support services</li>
<li>Iterate on existing features and implement new features based on what we've learned so far</li>
<li>Hone our measurement approaches to better quantify impact</li>
</ul>
<p class="govuk-body">Features prioritized during this stage:</p>
<ul class="list list-bullet">
<li>SMS sending via API integration</li>
<li>Single-level decision two-way messaging (e.g. reply “YES” if, or “NO” if…)</li>
<li>Self-service account creation</li>
<li>Application status page</li>
<li>Scheduled send option</li>
</ul>
<h3 class="heading-small" id="later">Later</h3>
<p class="govuk-body">In the future, we may decide to expand beyond SMS, or to offer the service government-wide</p>
<p class="govuk-body">Features to be considered during this stage:</p>
<ul class="list list-bullet">
<li>Let services preview their email branding</li>
<li>Let services upload their own logo for emails and letters</li>
<li>Meet our targets for <a class="govuk-link govuk-link--no-visited-state" href="{{url_for('main.accessibility_statement')}}">accessibility</a></li>
<li>Email sending via UI and API</li>
<li>Multiple-level decision two-way messaging (greater than one layer decision-tree)</li>
<li>Open-text reply two-way messaging (rather than reply yes or no, 1 or 2, etc.)</li>
<li>Multilingual interface and content library options</li>
<li>Recurring scheduled send (e.g. “Send each Monday for 3 weeks”)</li>
</ul>
<h2 class="heading-medium" id="things-we-have-done">Things weve done</h2>
<!-- <h2 class="heading-medium" id="things-we-have-done">Things weve done</h2>
<p class="govuk-body">Recently we have:</p>
<ul class="list list-bullet">
<li>upgraded some of our software dependencies</li>
<li>completed our annual IT health check</li>
<li>tested new ways for services to upload their own brand logo</li>
<li>improved our performance by <a class="govuk-link govuk-link--no-visited-state" href="https://technology.blog.gov.uk/2022/02/01/upgrading-celery-on-gov-uk-notify/">upgrading the software we use</a></li>
<li>made our website work better in Windows high contrast mode</li>
<li>increased our capacity at short notice during a busy period</li>
<li>added quarterly billing reports that organisations can download</li>
<li></li>
<li></li>
</ul>
<p class="govuk-body">Between April 2021 and March 2022 we sent a total of 2.7 billion notifications. Half of those were for services set up in response to the coronavirus (COVID-19) pandemic.</p>
</ul> -->
{% endblock %}

View File

@@ -23,22 +23,22 @@
</ul>
<p class="govuk-body">Any recipient data you upload is only held for 7 days.</p>
<p class="govuk-body">If you <a class="govuk-link govuk-link--no-visited-state" href="/features/email#send-files">send a file by email</a>, the file will be available for the recipient to download for 18 months.</p>
<p class="govuk-body">The Cabinet Office acts as data processor for Notify. Your organisation is the data controller.</p>
<h3 class="heading-small">Data Protection Act</h3>
<!-- <p class="govuk-body">The Cabinet Office acts as data processor for Notify. Your organisation is the data controller.</p> -->
<!-- <h3 class="heading-small">Data Protection Act</h3>
<p class="govuk-body">Notify complies with data protection law. To make sure it stays compliant, there are regular legal reviews of the services:</p>
<ul class="list list-bullet">
<li>privacy policy</li>
<li>terms of use</li>
<li>approach to data sharing</li>
</ul>
</ul> -->
<h2 class="heading-medium" id="technical-security">Technical security</h2>
<p class="govuk-body">Other technical security controls on Notify include:</p>
<!-- <p class="govuk-body">Other technical security controls on Notify include:</p>
<ul class="list list-bullet">
<li>compliance with National Cyber Security Centre (NCSC) Cloud Security Principles</li>
<li>protective monitoring to record activity, and raise alerts about any suspicious activity</li>
<li>using JSON Web Tokens, to avoid sending API keys when your service talks to Notify</li>
</ul>
</ul> -->
<h3 class="heading-small">Protect sensitive information</h3>
<p class="govuk-body">Some messages include sensitive information like security codes or password reset links.</p>
@@ -54,16 +54,16 @@
</ul>
<p class="govuk-body">If signing in with a text message is a problem for your team, <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.support') }}">contact us</a> to find out about using an email link instead.</p>
<h2 class="heading-medium" id="information-risk-management">Information risk management</h2>
<!-- <h2 class="heading-medium" id="information-risk-management">Information risk management</h2>
<p class="govuk-body">Our approach to information risk management follows NCSC guidance. It assesses:</p>
<ul class="list list-bullet">
<li>how Notify is built</li>
<li>the infrastructure Notify is built upon</li>
<li>support for the Notify service</li>
</ul>
<p class="govuk-body">This approach also applies to the service providers Notify uses to send messages.</p>
<p class="govuk-body">This approach also applies to the service providers Notify uses to send messages.</p> -->
<h2 class="heading-medium" id="how-we-manage-risk">How we manage risks on Notify</h2>
<!-- <h2 class="heading-medium" id="how-we-manage-risk">How we manage risks on Notify</h2>
<p class="govuk-body">Things we do to manage risks on Notify include:</p>
<ul class="list list-bullet">
<li>formal risk assessments based on <a class="govuk-link govuk-link--no-visited-state" href="http://www.iso.org/iso/catalogue_detail?csnumber=56742">ISO 27005:2011</a> and National Cyber Security Centre guidance</li>
@@ -71,15 +71,15 @@
<li>residual risk statement preparation and active management of the risk treatment plan</li>
<li>regular updates to the Privacy Impact Assessment</li>
<li>security impact assessments</li>
</ul>
</ul> -->
<h2 class="heading-medium" id="cabinet-office-approval">Cabinet Office approval</h2>
<!-- <h2 class="heading-medium" id="cabinet-office-approval">Cabinet Office approval</h2>
<p class="govuk-body">Notify has been assessed and approved by the Cabinet Office Senior Information Risk Officer (SIRO). The SIRO checks this approval once a year.</p>
<p class="govuk-body">Notify also has approval from the Office of the Governments SIRO to host data within the EEA.</p>
<h2 class="heading-medium" id="classifications-and-security-vetting">Classifications and security vetting</h2>
<p class="govuk-body">You can use Notify to send messages classified as OFFICIAL or OFFICIAL-SENSITIVE under the <a class="govuk-link govuk-link--no-visited-state" href="https://www.gov.uk/government/publications/government-security-classifications">Government Security Classifications</a> policy.</p>
<p class="govuk-body">Notify does not process data classified as SECRET or TOP SECRET.</p>
<p class="govuk-body">The Notify team has Security Check (SC) level clearance from <a class="govuk-link govuk-link--no-visited-state" href="https://www.gov.uk/government/organisations/united-kingdom-security-vetting">United Kingdom Security Vetting</a> (UKSV).</p>
<p class="govuk-body">The Notify team has Security Check (SC) level clearance from <a class="govuk-link govuk-link--no-visited-state" href="https://www.gov.uk/government/organisations/united-kingdom-security-vetting">United Kingdom Security Vetting</a> (UKSV).</p> -->
{% endblock %}

View File

@@ -3,15 +3,20 @@
{% from "components/form.html" import form_wrapper %}
{% block per_page_title %}
Support
Contact us
{% endblock %}
{% block maincolumn_content %}
<h1 class="heading-large">Support</h1>
<p class="govuk-body">US Notify provides 24-hour online support.</p>
<h1 class="heading-large">Contact us</h1>
<p class="govuk-body">We are available at <a class="govuk-link govuk-link--no-visited-state"" href="mailto:tts-benefits-studio@gsa.gov">tts-benefits-studio@gsa.gov</a>.</p>
{% call form_wrapper() %}
<p class="govuk-body">You can expect a response within 1 business day.</p>
<!-- <p class="govuk-body">US Notify provides 24-hour online support.</p> -->
<!-- {% call form_wrapper() %}
{% if current_user.is_authenticated %}
{{ form.support_type }}
{% else %}
@@ -23,8 +28,6 @@
{{ page_footer('Continue') }}
{% endcall %}
<p class="govuk-body">You can also <a class="govuk-link govuk-link--no-visited-state" href="https://ukgovernmentdigital.slack.com/messages/C0E1ADVPC">contact us on Slack</a>.</p>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h2 class="heading-medium">Office hours</h2>
@@ -42,6 +45,6 @@
<li>a 500 response code appears when you try to send messages using the API</li>
</ul>
</div>
</div>
</div> -->
{% endblock %}

4
deploy-config/demo.yml Normal file
View File

@@ -0,0 +1,4 @@
env: demo
instances: 1
memory: 1G
public_admin_route: notify-demo.app.cloud.gov

View File

@@ -0,0 +1,4 @@
env: production
instances: 2
memory: 1G
public_admin_route: notify.app.cloud.gov

View File

@@ -0,0 +1,4 @@
env: staging
instances: 1
memory: 1G
public_admin_route: notify-staging.app.cloud.gov

View File

@@ -1,45 +1,44 @@
---
applications:
- name: notifications-admin-((env))
- name: notify-admin-((env))
buildpack: python_buildpack
memory: 1G
instances: ((instances))
memory: ((memory))
health-check-type: http
health-check-http-endpoint: '/_status?simple=true'
health-check-invocation-timeout: 10
routes:
- route: notifications-admin.app.cloud.gov
- route: ((public_admin_route))
services:
- notifications-admin-redis-((env))
- notifications-api-csv-upload-bucket-((env))
- notifications-api-contact-list-bucket-((env))
- notifications-admin-logo-upload-bucket-((env))
- notify-admin-redis-((env))
- notify-api-csv-upload-bucket-((env))
- notify-api-contact-list-bucket-((env))
- notify-admin-logo-upload-bucket-((env))
env:
NOTIFY_ENVIRONMENT: ((env))
NOTIFY_APP_NAME: admin
NOTIFY_LOG_PATH: /home/vcap/logs/app.log
NOTIFY_LOG_LEVEL: INFO
FLASK_APP: application.py
FLASK_ENV: production
DEPLOY_ENV: ((env))
REDIS_ENABLED: ((REDIS_ENABLED))
NOTIFY_ENVIRONMENT: ((env))
ADMIN_BASE_URL: https://((public_admin_route))
API_HOST_NAME: https://notify-api-((env)).apps.internal:61443
# Credentials variables
ADMIN_CLIENT_SECRET: ((ADMIN_CLIENT_SECRET))
ADMIN_CLIENT_USERNAME: ((ADMIN_CLIENT_USERNAME))
ADMIN_BASE_URL: https://notifications-admin.app.cloud.gov
API_HOST_NAME: https://notifications-api-((env)).apps.internal:61443
DANGEROUS_SALT: ((DANGEROUS_SALT))
SECRET_KEY: ((SECRET_KEY))
BASIC_AUTH_USERNAME: ((BASIC_AUTH_USERNAME))
BASIC_AUTH_PASSWORD: ((BASIC_AUTH_PASSWORD))
AWS_REGION: us-west-2
AWS_ACCESS_KEY_ID: ((AWS_ACCESS_KEY_ID))
AWS_SECRET_ACCESS_KEY: ((AWS_SECRET_ACCESS_KEY))
BASIC_AUTH_USERNAME: ((BASIC_AUTH_USERNAME))
BASIC_AUTH_PASSWORD: ((BASIC_AUTH_PASSWORD))
NOTIFY_BILLING_DETAILS: []
NOTIFY_BILLING_DETAILS: '[]'
REQUESTS_CA_BUNDLE: "/etc/ssl/certs/ca-certificates.crt"

View File

@@ -41,7 +41,7 @@ click==8.1.3
# via flask
colorama==0.4.4
# via awscli
cryptography==37.0.2
cryptography==38.0.3
# via fido2
deprecated==1.2.13
# via redis

View File

@@ -4,8 +4,8 @@ read -p "Are you sure you want to import terraform state (y/n)? " verify
if [[ $verify == "y" ]]; then
echo "Importing bootstrap state"
./run.sh import module.s3.cloudfoundry_service_instance.bucket 31204bcc-aae3-4cd3-8b59-5055a338d44f
./run.sh import cloudfoundry_service_key.bucket_creds 483a6ac5-4ba0-48ad-9850-ef87b51aaa08
./run.sh import module.s3.cloudfoundry_service_instance.bucket 6b759c13-6253-4a64-9bda-dd1f620185b0
./run.sh import cloudfoundry_service_key.bucket_creds a8e40295-68b7-42ba-8955-d82ba262e948
./run.sh plan
else
echo "Not importing bootstrap state"

View File

@@ -9,8 +9,8 @@ module "s3" {
cf_api_url = local.cf_api_url
cf_user = var.cf_user
cf_password = var.cf_password
cf_org_name = "gsa-10x-prototyping"
cf_space_name = "10x-notifications"
cf_org_name = "gsa-tts-benefits-studio-prototyping"
cf_space_name = "notify-management"
s3_service_name = local.s3_service_name
}

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
if [[ ! -f "secrets.auto.tfvars" ]]; then
../create_service_account.sh -s 10x-notifications -u config-bootstrap-deployer > secrets.auto.tfvars
../create_service_account.sh -s notify-management -u config-bootstrap-deployer > secrets.auto.tfvars
fi
if [[ $# -gt 0 ]]; then

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
../destroy_service_account.sh -s 10x-notifications -u config-bootstrap-deployer
../destroy_service_account.sh -s notify-management -u config-bootstrap-deployer
rm secrets.auto.tfvars

View File

@@ -1,2 +1,4 @@
variable "cf_password" {}
variable "cf_password" {
sensitive = true
}
variable "cf_user" {}

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
org="gsa-10x-prototyping"
org="gsa-tts-benefits-studio-prototyping"
usage="
$0: Create a Service User Account for a given space

48
terraform/demo/main.tf Normal file
View File

@@ -0,0 +1,48 @@
locals {
cf_org_name = "gsa-tts-benefits-studio-prototyping"
cf_space_name = "notify-demo"
env = "demo"
app_name = "notify-admin"
recursive_delete = false
}
module "redis" {
source = "github.com/18f/terraform-cloudgov//redis"
cf_user = var.cf_user
cf_password = var.cf_password
cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
env = local.env
app_name = local.app_name
recursive_delete = local.recursive_delete
redis_plan_name = "redis-dev"
}
module "logo_upload_bucket" {
source = "github.com/18f/terraform-cloudgov//s3"
cf_user = var.cf_user
cf_password = var.cf_password
cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
recursive_delete = local.recursive_delete
s3_service_name = "${local.app_name}-logo-upload-bucket-${local.env}"
}
# ##########################################################################
# The following lines need to be commented out for the initial `terraform apply`
# It can be re-enabled after:
# 1) the api app has first been deployed
# 2) the admin app has first been deployed
###########################################################################
# module "api_network_route" {
# source = "../shared/container_networking"
# cf_user = var.cf_user
# cf_password = var.cf_password
# cf_org_name = local.cf_org_name
# cf_space_name = local.cf_space_name
# source_app_name = "${local.app_name}-${local.env}"
# destination_app_name = "notify-api-${local.env}"
# }

View File

@@ -0,0 +1,17 @@
terraform {
required_version = "~> 1.0"
required_providers {
cloudfoundry = {
source = "cloudfoundry-community/cloudfoundry"
version = "0.15.5"
}
}
backend "s3" {
bucket = "cg-6b759c13-6253-4a64-9bda-dd1f620185b0"
key = "admin.tfstate.demo"
encrypt = "true"
region = "us-gov-west-1"
profile = "notify-terraform-backend"
}
}

View File

@@ -0,0 +1,5 @@
variable "cf_password" {
type = string
sensitive = true
}
variable "cf_user" {}

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
org="gsa-10x-prototyping"
org="gsa-tts-benefits-studio-prototyping"
usage="
$0: Destroy a Service User Account in a given space

View File

@@ -1,8 +1,8 @@
locals {
cf_org_name = "TKTK"
cf_space_name = "TKTK"
cf_org_name = "gsa-tts-benefits-studio-prototyping"
cf_space_name = "notify-prod"
env = "production"
app_name = "notifications-admin"
app_name = "notify-admin"
recursive_delete = false
}
@@ -44,7 +44,7 @@ module "logo_upload_bucket" {
# cf_org_name = local.cf_org_name
# cf_space_name = local.cf_space_name
# source_app_name = "${local.app_name}-${local.env}"
# destination_app_name = "notifications-api-${local.env}"
# destination_app_name = "notify-api-${local.env}"
# }
# ##########################################################################

View File

@@ -8,7 +8,7 @@ terraform {
}
backend "s3" {
bucket = "cg-31204bcc-aae3-4cd3-8b59-5055a338d44f"
bucket = "cg-6b759c13-6253-4a64-9bda-dd1f620185b0"
key = "admin.tfstate.prod"
encrypt = "true"
region = "us-gov-west-1"

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
org="gsa-10x-prototyping"
org="gsa-tts-benefits-studio-prototyping"
usage="
$0: Set egress rules for given space

View File

@@ -1,8 +1,8 @@
locals {
cf_org_name = "gsa-10x-prototyping"
cf_space_name = "10x-notifications"
cf_org_name = "gsa-tts-benefits-studio-prototyping"
cf_space_name = "notify-staging"
env = "staging"
app_name = "notifications-admin"
app_name = "notify-admin"
recursive_delete = true
}
@@ -30,6 +30,12 @@ module "logo_upload_bucket" {
s3_service_name = "${local.app_name}-logo-upload-bucket-${local.env}"
}
# ##########################################################################
# The following lines need to be commented out for the initial `terraform apply`
# It can be re-enabled after:
# 1) the api app has first been deployed
# 2) the admin app has first been deployed
###########################################################################
module "api_network_route" {
source = "../shared/container_networking"
@@ -38,5 +44,5 @@ module "api_network_route" {
cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
source_app_name = "${local.app_name}-${local.env}"
destination_app_name = "notifications-api-${local.env}"
destination_app_name = "notify-api-${local.env}"
}

View File

@@ -8,7 +8,7 @@ terraform {
}
backend "s3" {
bucket = "cg-31204bcc-aae3-4cd3-8b59-5055a338d44f"
bucket = "cg-6b759c13-6253-4a64-9bda-dd1f620185b0"
key = "admin.tfstate.stage"
encrypt = "true"
region = "us-gov-west-1"

View File

@@ -21,6 +21,7 @@ def no_redirect():
return lambda: None
@pytest.mark.skip(reason="Not currently using Zendesk")
def test_get_support_index_page(
client_request,
):
@@ -41,6 +42,7 @@ def test_get_support_index_page(
) == 'Continue'
@pytest.mark.skip(reason="Not currently using Zendesk")
def test_get_support_index_page_when_signed_out(
client_request,
):

View File

@@ -98,7 +98,7 @@ def test_hiding_pages_from_search_engines(
'features_letters', 'how_to_pay', 'get_started',
'guidance_index', 'branding_and_customisation',
'create_and_send_messages', 'edit_and_format_messages',
'send_files_by_email', 'upload_a_letter', 'who_can_use_notify',
'send_files_by_email', 'upload_a_letter',
'billing_details',
])
def test_static_pages(
@@ -163,7 +163,6 @@ def test_guidance_pages_link_to_service_pages_when_signed_in(
('old_using_notify', 'using_notify'),
('delivery_and_failure', 'message_status'),
('callbacks', 'documentation'),
('who_its_for', 'who_can_use_notify'),
])
def test_old_static_pages_redirect(
client_request,

View File

@@ -125,7 +125,7 @@ def test_should_return_200_when_email_is_not_gov_uk(
page.select_one('.govuk-error-message').text
)
assert page.select_one('.govuk-error-message a')['href'] == url_for(
'main.who_can_use_notify'
'main.features'
)

View File

@@ -332,7 +332,6 @@ EXCLUDED_ENDPOINTS = tuple(map(Navigation.get_endpoint_with_blueprint, {
'webauthn_complete_register',
'webauthn_begin_authentication',
'webauthn_complete_authentication',
'who_can_use_notify',
'who_its_for',
}))