From 75eeb481e94ebd04fd8930578a24f2ed986f1786 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Fri, 9 Sep 2022 13:35:21 -0400 Subject: [PATCH] account request infrastructure (#50, #51) --- controller/config.go | 11 ++++++----- controller/store/sql/000_base.sql | 14 ++++++++++++++ etc/ctrl.yml | 22 ++++++++++++++++++++++ 3 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 etc/ctrl.yml diff --git a/controller/config.go b/controller/config.go index 4f1ed875..5d3d51d6 100644 --- a/controller/config.go +++ b/controller/config.go @@ -7,11 +7,12 @@ import ( ) type Config struct { - Endpoint *EndpointConfig - Proxy *ProxyConfig - Email *EmailConfig - Store *store.Config - Ziti *ZitiConfig + Endpoint *EndpointConfig + Proxy *ProxyConfig + Email *EmailConfig + Registration *RegistrationConfig + Store *store.Config + Ziti *ZitiConfig } type EndpointConfig struct { diff --git a/controller/store/sql/000_base.sql b/controller/store/sql/000_base.sql index 9278ca42..bcaabee7 100644 --- a/controller/store/sql/000_base.sql +++ b/controller/store/sql/000_base.sql @@ -16,6 +16,20 @@ create table accounts ( constraint chk_token check(token <> '') ); +-- +-- account_requests +-- +create table account_requests ( + id integer primary key, + token string not null unique, + email string not null unique, + verified boolean not null default(false), + source_address string not null, + created_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')), + updated_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')) +); + + -- -- environments -- diff --git a/etc/ctrl.yml b/etc/ctrl.yml new file mode 100644 index 00000000..e5a144da --- /dev/null +++ b/etc/ctrl.yml @@ -0,0 +1,22 @@ +# _____ __ ___ | | __ +# |_ / '__/ _ \| |/ / +# / /| | | (_) | < +# /___|_| \___/|_|\_\ +# controller configuration + +endpoint: + host: 0.0.0.0 + port: 18080 + +proxy: + url_template: "https://{svcName}.zrok.quigley.com:8080/" + identities: + - "" + +store: + path: zrok.db + +ziti: + api_endpoint: "https://127.0.0.1:1280" + username: admin + password: admin