diff --git a/README.md b/README.md index d9cfd4314..894e6866a 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ provider selected by a public health authority. Our hope is by making this privacy-preserving server implementation available to health authorities, we can enable their developers to use the open source code -to get started quickly. +to get started quickly. ## Overview @@ -58,4 +58,3 @@ exposure-notifications-feedback@google.com. Contributions to this project are welcomed. For more information about contributing to this project, see the [contribution guidelines](CONTRIBUTING.md). - diff --git a/docs/deploying.md b/docs/deploying.md index 2883d255d..142b50b88 100644 --- a/docs/deploying.md +++ b/docs/deploying.md @@ -1,3 +1,22 @@ + + +- [Exposure Notification Reference Server](#exposure-notification-reference-server) + - [Building and deploying services](#building-and-deploying-services) + - [Before you begin](#before-you-begin) + - [Building and deploying](#building-and-deploying) + - [List of services](#list-of-services) + - [Provisioning infrastructure with Terraform](#provisioning-infrastructure-with-terraform) + - [Deploying services](#deploying-services) + - [Building](#building) + - [Deploying](#deploying) + - [Promoting](#promoting) + - [Running migrations](#running-migrations) + - [On Google Cloud](#on-google-cloud) + - [On a custom setup](#on-a-custom-setup) + - [Server Configuration](#server-configuration) + + + # Exposure Notification Reference Server ## Building and deploying services @@ -221,3 +240,41 @@ If you did not use the Terraform configurations to provision your server, or if -path ./migrations \ up ``` + +## Server Configuration + +This repository includes a configuration tool that runs a local webserver that +provides a browser based interface for manipulating the database backed +configuration. This admin tool **does not have authentication / authorization** +built in and should not be deployed in the internet in a public facing way. + +Currently the admin console tool only supports editing authorized apps. +Editing of Export Config and Signature Info configuration is comming soon. + +1. Ensure proper database connection parameters. + +This requires setting certain environment variables and if you are using Google +Cloud SQL, this may include booting the `cloud_sql_proxy` + +If you used the terraform setup to deploy to Google Cloud Platform, this +is how you setup the admin tool connection. + +```text +gcloud auth login && gcloud auth application-default login +export DB_CONN=$(terraform output db_conn) +export DB_USER=$(terraform output db_user) +export DB_PASSWORD="secret://$(terraform output db_pass_secret)" +export DB_PORT=5400 +export DB_NAME=$(terraform output db_name) +cloud_sql_proxy -instances=$DB_CONN=tcp:$DB_PORT & +``` + +2. Run the admin console + +```text +go run ./tools/admin-console +``` + +Open a browser to [localhost:8080](http://localhost:8080/) + +Remember, you are editing the live configuration of the database. diff --git a/docs/index.md b/docs/index.md index cc38292e2..1c518e9db 100644 --- a/docs/index.md +++ b/docs/index.md @@ -34,17 +34,17 @@ The Exposure Notification Server is responsible for the following functions: * Periodically deleting old temporary exposure keys. After 14 days, or configured time period, the exposure keys can no longer be matched to a device. - + ## Tutorials and reference documentation You can read tutorials on deploying and using the reference Exposure Notification Server here: -[Deployment guide](deploying.md) -[Contributor guide](/CONTRIBUTING.md) -[Server Functional Requirements](server_functional_requirements.md) -[Server Deployment Options](server_deployment_options.md) -[Reference documentation](https://pkg.go.dev/mod/github.com/google/exposure-notifications-server) +[Deployment guide](deploying.md) +[Contributor guide](/CONTRIBUTING.md) +[Server Functional Requirements](server_functional_requirements.md) +[Server Deployment Options](server_deployment_options.md) +[Reference documentation](https://pkg.go.dev/mod/github.com/google/exposure-notifications-server) ## Issues and Questions