Table of contents

data.gov.uk

Data.gov.uk Contracts Archive

Contracts archive finder application

Visit the contracts archive finder

Credentials for the AWS account are in the govuk-secrets repository under 2ndline/datagovuk/contracts-finder-archive-aws-console-pass.

Once logged in to the AWS console, you’ll be able to list the EC2 instances and find the IP of the contracts archive finder. Currently the assigned elastic IP is 34.249.103.20.

If you need to ssh on to the machine, you can do so by grabbing the private key from govuk-secrets under 2ndline/datagovuk/contracts-finder-archive-cert.

You will need to put the private key into a file and change the permissions so it is not publically viewable before you can use it.

You can do this as follows:

$ cd ~/govuk/govuk-secrets
$ PASSWORD_STORE_DIR=~/govuk/govuk-secrets/pass/2ndline pass datagovuk/contracts-finder-archive-cert > govuk-contracts-archive.pem
$ chmod 400 govuk-contracts-archive.pem

You will then be able to ssh onto the machine in aws by using the .pem file:

ssh -i "govuk-contracts-archive.pem" ubuntu@ec2-34-249-103-20.eu-west-1.compute.amazonaws.com

Remember this is an elastic IP and might change - log into the AWS web console to find the current IP address assigned.

Contracts archive finder snapshot

There is a point in time snapshot of the contracts archive finder, should you need to access older log files.

This is setup on the same AWS account as an EC2 instance called 2019-contracts-archive. To access this machine, use the same certificate as above and ssh in as follows:

ssh -i "govuk-contracts-archive.pem" ubuntu@ec2-34-248-129-191.eu-west-1.compute.amazonaws.com

Again note that this is an elastic IP and might change.

This machine includes nginx logs from two periods:

  • June 9 to June 26 2018 - available at /mount-old-arch/var/log/nginx$
  • March 9 to March 19 2019 - available at /var/log/nginx

The machine was created from two snapshots that are sitting in the AWS account. These have the following descriptions:

  • contract-finder (started June 26 2018)
  • snapshot_contracts_20190319 (started March 19 2019)

On data.gov.uk

A database of the contracts archive is also accessible in a sqlite database on data.gov.uk

Contract takedown requests

To take down a contract, ssh onto the contracts archive machine and then move the relevant contract attachements to the redacted folder.

Contracts are located on the machine at ~/src/contracts-archive/instance/documents. Find the directory for the contract you are trying to redact. It will be ~/src/contracts-archive/instance/documents/<contract_id>.

For example if the contract id is 12345 then you will find all the files under the directory ~/src/contracts-archive/instance/documents/12345.

Create a new directory in ~/src/contracts-archive/instance/redacted. Name the directory the same as the contract id.

Move all the attachments from the documents/<contract_id> into the redacted/<contract_id> folder.

Note that this method will remove the downloadable attachments, but leave the contract page available to view on the website. This is fine. You can confirm that you’ve redacted the documents by navigating to the contract in the contracts archive finder application and clicking on the download links for each attachment. It should return a 404 Not Found.

You should also remove it from Google cache (this will only work once we’ve reinstated the contracts archive url and validated with google) using this page:

https://www.google.com/webmasters/tools/url-removal?hl=en&siteUrl=https://data.gov.uk

Click “Temporarily Hide” and provide the URL and then Submit.

This page was last reviewed on 5 April 2019. It needs to be reviewed again on 5 October 2019 by the page owner #govuk-platform-health .
This page was set to be reviewed before 5 October 2019 by the page owner #govuk-platform-health. This might mean the content is out of date.