openvibers/openvibe.host Commits
account-data: pin openvibe-sdk 0.74.0 and guard every table with a person column (#207)
Changes
@@@ -380,7 +380,7 @@ Part of the [OpenVibe network](https://openvibe.network). Built in the open by [<!-- versions:start -->- openvibe-contracts: v0.222.0--- openvibe-sdk: v0.73.0++- openvibe-sdk: v0.74.0- openvibe-shared: v4.48.0- openvibe-publishing: v1.4.0<!-- versions:end -->@@@ -14,11 +14,11 @@"port": 4910,"domain": "openvibe.host","contracts": "openvibe-contracts v0.222.0",-- "sdk": "openvibe-sdk v0.73.0",++ "sdk": "openvibe-sdk v0.74.0","shared": "openvibe-shared v4.48.0","packages": ["openvibe-contracts v0.222.0",-- "openvibe-sdk v0.73.0",++ "openvibe-sdk v0.74.0","openvibe-shared v4.48.0"],"capabilities": [@@@ -17,7 +17,7 @@"iovalkey": "^0.4.0","openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0","openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.4.0",-- "openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.73.0",++ "openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.74.0","openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.48.0","pg": "^8.23.0"},@@@ -1568,9 +1568,9 @@}},"node_modules/openvibe-sdk": {-- "version": "0.73.0",-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.73.0",-- "integrity": "sha512-XClxoVm9M6RA8eXlGgYZ0u6q9n5h79mCXqAAEg9fX21KgcqP69RmG+cX+6wrOf7TaEj7eSBWMxHjiIeIa9N7Dg==",++ "version": "0.74.0",++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.74.0",++ "integrity": "sha512-DO9KVPnUriY/I4lX6ZEJtXaUvRDbJyqnqJxvlpl+zkNGFILpmuBXVJogNOCfK071Qci1gg7C4Iw1Xrseklcajg==","license": "MIT","bin": {"openvibe-download": "bin/openvibe-download.js"@@@ -33,7 +33,7 @@"iovalkey": "^0.4.0","openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0","openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.4.0",-- "openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.73.0",++ "openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.74.0","openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.48.0","pg": "^8.23.0"},@@@ -7,10 +7,11 @@* tokens are gone from OpenVibe.Host.* benchmarks the results they submitted (migration 0012) and their one-time links (never the link's token).* Deletion removes the links and detaches the results, which stay as anonymous measurements.-- * catalog rows providers, plans and promotions a staff member entered: shared rows, so deletion keeps them and-- * erases only who entered them.++ * catalog rows providers, plans, promotions and the prices of a TLD a staff member entered: shared rows, so++ * deletion keeps them and erases only who entered them.*-- * Discussion lives on OpenVibe.Community. A table a held migration has not created yet is skipped.++ * Discussion lives on OpenVibe.Community. A table a held migration has not created yet is skipped. The hosting tables++ * (sites, domains, deploys) were dropped in migration 0008: static hosting is OpenVibe.Space's now.*/const { createAccountData, TOPICS } = require('openvibe-sdk/account-data');@@@ -22,6 +23,9 @@ const TABLES = [{ table: 'catalog_providers', subject: 'created_by', file: 'catalog-providers.json', erase: { anonymize: {} } },{ table: 'catalog_plans', subject: 'created_by', file: 'catalog-plans.json', erase: { anonymize: {} } },{ table: 'catalog_promos', subject: 'created_by', file: 'catalog-promos.json', erase: { anonymize: {} } },++ // A price a staff member entered is a public observation of what a registrar charges: the row stays, the person who++ // entered it is erased from it, as with the other catalog rows.++ { table: 'catalog_tld_prices', subject: 'created_by', file: 'catalog-tld-prices.json', columns: ['id', 'provider_id', 'tld', 'currency', 'register', 'renew', 'transfer', 'origin', 'source_url', 'checked_at', 'status', 'created_at'], erase: { anonymize: {} } },];function create({ db, log = console } = {}) {nnew file mode 100644@@@ -0,0 +1,25 @@++'use strict';++/**++ * ADR-033: every table in this service with a person column is either in the account-data map, keyed under the++ * row that owns it, or exempted with a reason. A new table with one fails here until it is answered for.++ */++const assert = require('assert');++const { uncovered } = require('openvibe-sdk/account-data');++const { TABLES } = require('../server//account-data');++const { testDb } = require('./helpers/db');++++(async () => {++ const d = await testDb();++ try {++ const missing = await uncovered(d.db, {++ tables: TABLES,++++ exempt: {++ account_data_events: 'the ledger of requests itself: which export and deletion host applied',++ host_index_revisions: "owner is the search-index document's owner (type/id), not a person; the row holds a revision and hash",++ },++ });++ assert.deepStrictEqual(missing, [], `a table with a person column is neither covered nor exempted: ${missing.join(', ')}`);++ console.log(' ✓ every table that names a person is covered or exempted with a reason');++ } finally { await d.close(); }++})();
@@ -380,7 +380,7 @@ Part of the [OpenVibe network](https://openvibe.network). Built in the open by [
@@ -380,7 +380,7 @@ Part of the [OpenVibe network](https://openvibe.network). Built in the open by [
<!-- versions:start -->
<!-- versions:start -->
- openvibe-contracts: v0.222.0
- openvibe-contracts: v0.222.0
-- openvibe-sdk: v0.73.0
+- openvibe-sdk: v0.74.0
- openvibe-shared: v4.48.0
- openvibe-shared: v4.48.0
- openvibe-publishing: v1.4.0
- openvibe-publishing: v1.4.0
<!-- versions:end -->
<!-- versions:end -->
@@ -14,11 +14,11 @@
@@ -14,11 +14,11 @@
"port": 4910,
"port": 4910,
"domain": "openvibe.host",
"domain": "openvibe.host",
"contracts": "openvibe-contracts v0.222.0",
"contracts": "openvibe-contracts v0.222.0",
- "sdk": "openvibe-sdk v0.73.0",
+ "sdk": "openvibe-sdk v0.74.0",
"shared": "openvibe-shared v4.48.0",
"shared": "openvibe-shared v4.48.0",
"packages": [
"packages": [
"openvibe-contracts v0.222.0",
"openvibe-contracts v0.222.0",
- "openvibe-sdk v0.73.0",
+ "openvibe-sdk v0.74.0",
"openvibe-shared v4.48.0"
"openvibe-shared v4.48.0"
],
],
"capabilities": [
"capabilities": [
@@ -17,7 +17,7 @@
@@ -17,7 +17,7 @@
"iovalkey": "^0.4.0",
"iovalkey": "^0.4.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.4.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.4.0",
- "openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.73.0",
+ "openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.74.0",
"openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.48.0",
"openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.48.0",
"pg": "^8.23.0"
"pg": "^8.23.0"
},
},
@@ -1568,9 +1568,9 @@
@@ -1568,9 +1568,9 @@
}
}
},
},
"node_modules/openvibe-sdk": {
"node_modules/openvibe-sdk": {
- "version": "0.73.0",
- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.73.0",
- "integrity": "sha512-XClxoVm9M6RA8eXlGgYZ0u6q9n5h79mCXqAAEg9fX21KgcqP69RmG+cX+6wrOf7TaEj7eSBWMxHjiIeIa9N7Dg==",
+ "version": "0.74.0",
+ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.74.0",
+ "integrity": "sha512-DO9KVPnUriY/I4lX6ZEJtXaUvRDbJyqnqJxvlpl+zkNGFILpmuBXVJogNOCfK071Qci1gg7C4Iw1Xrseklcajg==",
"license": "MIT",
"license": "MIT",
"bin": {
"bin": {
"openvibe-download": "bin/openvibe-download.js"
"openvibe-download": "bin/openvibe-download.js"
@@ -33,7 +33,7 @@
@@ -33,7 +33,7 @@
"iovalkey": "^0.4.0",
"iovalkey": "^0.4.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.4.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.4.0",
- "openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.73.0",
+ "openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.74.0",
"openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.48.0",
"openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.48.0",
"pg": "^8.23.0"
"pg": "^8.23.0"
},
},
@@ -7,10 +7,11 @@
@@ -7,10 +7,11 @@
* tokens are gone from OpenVibe.Host.
* tokens are gone from OpenVibe.Host.
* benchmarks the results they submitted (migration 0012) and their one-time links (never the link's token).
* benchmarks the results they submitted (migration 0012) and their one-time links (never the link's token).
* Deletion removes the links and detaches the results, which stay as anonymous measurements.
* Deletion removes the links and detaches the results, which stay as anonymous measurements.
- * catalog rows providers, plans and promotions a staff member entered: shared rows, so deletion keeps them and
- * erases only who entered them.
+ * catalog rows providers, plans, promotions and the prices of a TLD a staff member entered: shared rows, so
+ * deletion keeps them and erases only who entered them.
*
*
- * Discussion lives on OpenVibe.Community. A table a held migration has not created yet is skipped.
+ * Discussion lives on OpenVibe.Community. A table a held migration has not created yet is skipped. The hosting tables
+ * (sites, domains, deploys) were dropped in migration 0008: static hosting is OpenVibe.Space's now.
*/
*/
const { createAccountData, TOPICS } = require('openvibe-sdk/account-data');
const { createAccountData, TOPICS } = require('openvibe-sdk/account-data');
@@ -22,6 +23,9 @@ const TABLES = [
@@ -22,6 +23,9 @@ const TABLES = [
{ table: 'catalog_providers', subject: 'created_by', file: 'catalog-providers.json', erase: { anonymize: {} } },
{ table: 'catalog_providers', subject: 'created_by', file: 'catalog-providers.json', erase: { anonymize: {} } },
{ table: 'catalog_plans', subject: 'created_by', file: 'catalog-plans.json', erase: { anonymize: {} } },
{ table: 'catalog_plans', subject: 'created_by', file: 'catalog-plans.json', erase: { anonymize: {} } },
{ table: 'catalog_promos', subject: 'created_by', file: 'catalog-promos.json', erase: { anonymize: {} } },
{ table: 'catalog_promos', subject: 'created_by', file: 'catalog-promos.json', erase: { anonymize: {} } },
+ // A price a staff member entered is a public observation of what a registrar charges: the row stays, the person who
+ // entered it is erased from it, as with the other catalog rows.
+ { table: 'catalog_tld_prices', subject: 'created_by', file: 'catalog-tld-prices.json', columns: ['id', 'provider_id', 'tld', 'currency', 'register', 'renew', 'transfer', 'origin', 'source_url', 'checked_at', 'status', 'created_at'], erase: { anonymize: {} } },
];
];
function create({ db, log = console } = {}) {
function create({ db, log = console } = {}) {
new file mode 100644
new file mode 100644
@@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
+'use strict';
+/**
+ * ADR-033: every table in this service with a person column is either in the account-data map, keyed under the
+ * row that owns it, or exempted with a reason. A new table with one fails here until it is answered for.
+ */
+const assert = require('assert');
+const { uncovered } = require('openvibe-sdk/account-data');
+const { TABLES } = require('../server//account-data');
+const { testDb } = require('./helpers/db');
+
+(async () => {
+ const d = await testDb();
+ try {
+ const missing = await uncovered(d.db, {
+ tables: TABLES,
+
+ exempt: {
+ account_data_events: 'the ledger of requests itself: which export and deletion host applied',
+ host_index_revisions: "owner is the search-index document's owner (type/id), not a person; the row holds a revision and hash",
+ },
+ });
+ assert.deepStrictEqual(missing, [], `a table with a person column is neither covered nor exempted: ${missing.join(', ')}`);
+ console.log(' ✓ every table that names a person is covered or exempted with a reason');
+ } finally { await d.close(); }
+})();