diff --git a/cloud/lab/wireguard/env/example.env b/cloud/lab/wireguard/env/example.env index bb91a1f81..045d17841 100644 --- a/cloud/lab/wireguard/env/example.env +++ b/cloud/lab/wireguard/env/example.env @@ -1,7 +1,7 @@ -U2FsdGVkX1/EKYD6q6uN82RaXr/dmMmnV2+kO5aBHDC2Wpc/Jp7WcHy9IwCI5UCy -a8Z1ffmDQ7mzrc4tvd9J5XhSDsHr9P3KWJgqt0ScWukZ8uEoJV9X4KNBpQc+PC/7 -0CJhKID0+zTEhj9Uq/oyjF1X4aL1ZMb5BXw+82DWYalpKBo6RGJTUFYtjbIMYHwZ -gkqkHdFzy5U6XroH0yfYB2BXdab+0Wx7FzWw3CPb1lEwgpRha/FT4oE0Fb7+rA+D -OzvNqjonT3s/sfTd4oXN6m+cYEH7O4UfwmQ9aTASciw72KbbdfxvKAPZEIQSUM75 -k/Ryo/bBSuGj/hPvYdUGPW9yMXJ9R4I11m0P4uzh6dyeddtNxCZvuYxQk+MsjmIC -GgzV87awC0CRa7XouSxzIg== +U2FsdGVkX1+5qQykfphrBmm/Md5/h4D5rSpWSB93dnMO4GNUe9gpW2/DmNuMl+dR ++W3Yce7QZjFgEoiApUMnJ37y8N98SrtgSarTGIuQGWfVetWe665WucrMCIidUkPg +c5+qmIRgiCUFOvRT589zfKrsDPHZxAR/9beYyq+SNa3qmE0TQmlBrxt/kieQr0xP +Wm3HFeCEgCeWpCHcDi+Ha68v+nIZqqvg0Tow4eghnV+YxFux2b5GYgEyeDQ9Yi4g +4xz4QLTcHQCxE+iL8LRuBrtpM/2AFlr0RYlUVQl8KUCK3P+ni3EuKB2PNPXpkFod +uq8435COxM7jN53jhnCbNZ86wVwQNRtnJ4cq0aunfwScrHpDF0391l/Y8vOaoM1y +Y0L8ky+xPtMGKKOEmQH8NA== diff --git a/services/comment/src/lib/config.ts b/services/comment/src/lib/config.ts index f5232f116..ab744d4f7 100644 --- a/services/comment/src/lib/config.ts +++ b/services/comment/src/lib/config.ts @@ -7,7 +7,7 @@ export const config = { host: process.env.HOST ?? '0.0.0.0', port: process.env.PORT != null ? +process.env.PORT : 8000, allowAllOrigin: true, - token: process.env.TOKEN ?? 'YOUR_SECRET_TOKEN', + accessToken: process.env.ACCESS_TOKEN ?? 'YOUR_SECRET_TOKEN', }, storage: { host: process.env.STORAGE_HOST ?? '127.0.0.1', diff --git a/services/comment/src/route/all.ts b/services/comment/src/route/all.ts index 5fd1f7895..f5d1ea04a 100644 --- a/services/comment/src/route/all.ts +++ b/services/comment/src/route/all.ts @@ -9,7 +9,7 @@ nanoServer.route('GET', '/all', getAllComment); async function getAllComment(connection: AlwatrConnection): Promise { logger.logMethod('getAllComment'); - const token = connection.requireToken(config.nanoServer.token); + const token = connection.requireToken(config.nanoServer.accessToken); if (token == null) return; const params = connection.requireQueryParams<{storage: string}>({storage: 'string'}); diff --git a/services/comment/src/route/patch.ts b/services/comment/src/route/patch.ts index 5943baa18..d3933e395 100644 --- a/services/comment/src/route/patch.ts +++ b/services/comment/src/route/patch.ts @@ -10,7 +10,7 @@ nanoServer.route('PATCH', '/', setComment); async function setComment(connection: AlwatrConnection): Promise { logger.logMethod('setComment'); - const token = connection.requireToken(config.nanoServer.token); + const token = connection.requireToken(config.nanoServer.accessToken); if (token == null) return; const params = connection.requireQueryParams<{storage: string}>({storage: 'string'}); diff --git a/services/storage-server/src/lib/config.ts b/services/storage-server/src/lib/config.ts index 9a1d535a5..9a250d804 100644 --- a/services/storage-server/src/lib/config.ts +++ b/services/storage-server/src/lib/config.ts @@ -6,7 +6,7 @@ export const config = { host: process.env.HOST ?? '0.0.0.0', port: process.env.PORT != null ? +process.env.PORT : 9000, storagePath: process.env.STORAGE_PATH ?? 'db', - token: process.env.TOKEN ?? 'YOUR_SECRET_TOKEN', + accessToken: process.env.ACCESS_TOKEN ?? 'YOUR_SECRET_TOKEN', }; logger.logProperty('config', {...config, token: '***'}); diff --git a/services/storage-server/src/route/all.ts b/services/storage-server/src/route/all.ts index 703f4993c..0ae6671d0 100644 --- a/services/storage-server/src/route/all.ts +++ b/services/storage-server/src/route/all.ts @@ -9,7 +9,7 @@ nanoServer.route('GET', '/all', getAllDocument); async function getAllDocument(connection: AlwatrConnection): Promise { logger.logMethod('getAllDocument'); - const token = connection.requireToken(config.token); + const token = connection.requireToken(config.accessToken); if (token == null) return; const params = connection.requireQueryParams<{storage: string}>({storage: 'string'}); diff --git a/services/storage-server/src/route/delete.ts b/services/storage-server/src/route/delete.ts index a57e0ec9d..5127cc339 100644 --- a/services/storage-server/src/route/delete.ts +++ b/services/storage-server/src/route/delete.ts @@ -9,7 +9,7 @@ nanoServer.route('DELETE', 'all', removeDocument); async function removeDocument(connection: AlwatrConnection): Promise { logger.logMethodArgs('updateDocument', {method: connection.method}); - const token = connection.requireToken(config.token); + const token = connection.requireToken(config.accessToken); if (token == null) return; const param = connection.requireQueryParams<{storage: string; id: string}>({storage: 'string', id: 'string'}); diff --git a/services/storage-server/src/route/get.ts b/services/storage-server/src/route/get.ts index b7dbba864..59b07e83d 100644 --- a/services/storage-server/src/route/get.ts +++ b/services/storage-server/src/route/get.ts @@ -19,7 +19,7 @@ function getDocument(connection: AlwatrConnection): void { }); } - const token = connection.requireToken(config.token); + const token = connection.requireToken(config.accessToken); if (token == null) return; const params = connection.requireQueryParams<{storage: string; id: string}>({storage: 'string', id: 'string'}); diff --git a/services/storage-server/src/route/has.ts b/services/storage-server/src/route/has.ts index 7fe12aa14..152526398 100644 --- a/services/storage-server/src/route/has.ts +++ b/services/storage-server/src/route/has.ts @@ -9,7 +9,7 @@ nanoServer.route('GET', '/has', has); async function has(connection: AlwatrConnection): Promise { logger.logMethod('has'); - const token = connection.requireToken(config.token); + const token = connection.requireToken(config.accessToken); if (token == null) return; const params = connection.requireQueryParams<{storage: string; id: string}>({storage: 'string', id: 'string'}); diff --git a/services/storage-server/src/route/keys.ts b/services/storage-server/src/route/keys.ts index 5143211be..f59b6cd7e 100644 --- a/services/storage-server/src/route/keys.ts +++ b/services/storage-server/src/route/keys.ts @@ -9,7 +9,7 @@ nanoServer.route('GET', '/keys', getStorageKeys); async function getStorageKeys(connection: AlwatrConnection): Promise { logger.logMethod('getStorageKeys'); - const token = connection.requireToken(config.token); + const token = connection.requireToken(config.accessToken); if (token == null) return; const params = connection.requireQueryParams<{storage: string}>({storage: 'string'}); diff --git a/services/storage-server/src/route/patch.ts b/services/storage-server/src/route/patch.ts index 6c0991c4d..94a9194d6 100644 --- a/services/storage-server/src/route/patch.ts +++ b/services/storage-server/src/route/patch.ts @@ -10,7 +10,7 @@ nanoServer.route('PATCH', 'all', updateDocument); async function updateDocument(connection: AlwatrConnection): Promise { logger.logMethod('updateDocument'); - const token = connection.requireToken(config.token); + const token = connection.requireToken(config.accessToken); if (token == null) return; const param = connection.requireQueryParams<{storage: string}>({storage: 'string'}); diff --git a/services/telegram-notifier/src/lib/config.ts b/services/telegram-notifier/src/lib/config.ts index a8387e542..51440751e 100644 --- a/services/telegram-notifier/src/lib/config.ts +++ b/services/telegram-notifier/src/lib/config.ts @@ -10,7 +10,7 @@ export const config = { nanoServer: { host: process.env.HOST ?? '0.0.0.0', port: process.env.PORT != null ? +process.env.PORT : 8001, - token: process.env.TOKEN ?? 'YOUR_SECRET_TOKEN', + accessToken: process.env.ACCESS_TOKEN ?? 'YOUR_SECRET_TOKEN', }, storage: { path: process.env.STORAGE_PATH ?? 'db', diff --git a/services/telegram-notifier/src/route/notify.ts b/services/telegram-notifier/src/route/notify.ts index 1fbc70f60..c24a09306 100644 --- a/services/telegram-notifier/src/route/notify.ts +++ b/services/telegram-notifier/src/route/notify.ts @@ -10,7 +10,7 @@ nanoServer.route('POST', '/', notify); async function notify(connection: AlwatrConnection): Promise { logger.logMethod('notify'); - if (connection.requireToken(config.nanoServer.token) == null) return; + if (connection.requireToken(config.nanoServer.accessToken) == null) return; const bodyJson = await connection.requireJsonBody<{to: string; message: string}>(); if (bodyJson == null) return; diff --git a/uniquely/flight-finder-api/src/lib/config.ts b/uniquely/flight-finder-api/src/lib/config.ts index 111d6d94d..786a0f807 100644 --- a/uniquely/flight-finder-api/src/lib/config.ts +++ b/uniquely/flight-finder-api/src/lib/config.ts @@ -10,7 +10,7 @@ export const config = { nanoServer: { host: process.env.HOST ?? '0.0.0.0', port: process.env.PORT != null ? +process.env.PORT : 8000, - token: process.env.TOKEN ?? 'YOUR_SECRET_TOKEN', + accessToken: process.env.ACCESS_TOKEN ?? 'YOUR_SECRET_TOKEN', }, }; diff --git a/uniquely/flight-finder-api/src/route/job/delete.ts b/uniquely/flight-finder-api/src/route/job/delete.ts index 538f6d1f7..a485d45a3 100644 --- a/uniquely/flight-finder-api/src/route/job/delete.ts +++ b/uniquely/flight-finder-api/src/route/job/delete.ts @@ -10,7 +10,7 @@ nanoServer.route('DELETE', '/job', deleteJob); async function deleteJob(connection: AlwatrConnection): Promise { logger.logMethod('deleteJob'); - if (connection.requireToken(config.nanoServer.token) == null) return; + if (connection.requireToken(config.nanoServer.accessToken) == null) return; const params = connection.requireQueryParams<{id: string}>({id: 'string'}); if (params === null) return; diff --git a/uniquely/flight-finder-api/src/route/job/get.ts b/uniquely/flight-finder-api/src/route/job/get.ts index bb8aedff8..c1e83db0e 100644 --- a/uniquely/flight-finder-api/src/route/job/get.ts +++ b/uniquely/flight-finder-api/src/route/job/get.ts @@ -10,7 +10,7 @@ nanoServer.route('GET', '/job', getJob); async function getJob(connection: AlwatrConnection): Promise { logger.logMethod('getJob'); - if (connection.requireToken(config.nanoServer.token) == null) return; + if (connection.requireToken(config.nanoServer.accessToken) == null) return; try { connection.reply({ diff --git a/uniquely/flight-finder-api/src/route/job/put.ts b/uniquely/flight-finder-api/src/route/job/put.ts index 55c351429..d4224a180 100644 --- a/uniquely/flight-finder-api/src/route/job/put.ts +++ b/uniquely/flight-finder-api/src/route/job/put.ts @@ -11,7 +11,7 @@ nanoServer.route('PUT', '/job', newJob); async function newJob(connection: AlwatrConnection): Promise { logger.logMethod('newJob'); - if (connection.requireToken(config.nanoServer.token) == null) return; + if (connection.requireToken(config.nanoServer.accessToken) == null) return; const job = await connection.requireJsonBody(); if (job === null) return;