Database builds for the STARTTLS Everywhere web backend
2.7K
starttls-backend is the JSON backend for starttls-everywhere.org. It provides endpoints to run security checks against email domains and manage the status of those domain's on EFF's STARTTLS Everywhere policy list.
go and postgres.go get github.com/EFForg/starttls-backend
cd $GOPATH/github.com/EFForg/starttls-backend
cp .env.example .env
cp .env.test.example .env.test
.env and .env.test with your postgres credentials and any other changes.postgres is running, then run db/scripts/init_tables.sql in the appropriate postgres DBs in order to initialize your development and test databases.go build
./starttls-backend
cp .env.example .env
cp .env.test.example .env.test
docker-compose build
docker-compose up
To automatically on container start, set DB_MIGRATE=true in the .env file.
Test all packages in this repo with
go test -v ./...
The main and db packages contain integration tests that require a successful connection to the Postgres database. The remaining packages do not require the database to pass tests.
In case of complaints or abuse, we may not want to continually scan some domains. You can set the environment variable DOMAIN_BLACKLIST to point to a file with a list of newline-separated domains. Attempting to scan those domains from the public-facing website will result in error codes.
To request a scan:
POST /api/scan
{
"domain": "example.com"
}
Content type
Image
Digest
Size
79.8 MB
Last updated
over 7 years ago
docker pull electronicfrontierfoundation/starttls-db