Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3332681
D10993.id36849.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10993.id36849.diff
View Options
diff --git a/lib/utils/config.js b/lib/utils/config.js
--- a/lib/utils/config.js
+++ b/lib/utils/config.js
@@ -26,6 +26,7 @@
+setSessionIDOnRequest: boolean,
+calendarRangeInactivityLimit: ?number,
+platformDetails: PlatformDetails,
+ +authoritativeKeyserverID: string,
};
let registeredConfig: ?Config = null;
diff --git a/native/config.js b/native/config.js
--- a/native/config.js
+++ b/native/config.js
@@ -3,8 +3,10 @@
import { Platform } from 'react-native';
import { registerConfig } from 'lib/utils/config.js';
+import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
import { resolveKeyserverSessionInvalidationUsingNativeCredentials } from './account/legacy-recover-keyserver-session.js';
+import { authoritativeKeyserverID } from './facts/authoritativeKeyserverID.json';
import { persistConfig, codeVersion } from './redux/persist.js';
registerConfig({
@@ -16,4 +18,5 @@
codeVersion,
stateVersion: persistConfig.version,
},
+ authoritativeKeyserverID: authoritativeKeyserverID ?? ashoatKeyserverID,
});
diff --git a/web/app.react.js b/web/app.react.js
--- a/web/app.react.js
+++ b/web/app.react.js
@@ -34,6 +34,7 @@
import { getConfig, registerConfig } from 'lib/utils/config.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { infoFromURL } from 'lib/utils/url-utils.js';
+import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
import { AlchemyENSCacheProvider, wagmiConfig } from 'lib/utils/wagmi-utils.js';
import QrCodeLogin from './account/qr-code-login.react.js';
@@ -102,6 +103,8 @@
stateVersion: persistConfig.version,
...desktopDetails,
},
+ authoritativeKeyserverID:
+ process.env.AUTHORITATIVE_KEYSERVER_ID ?? ashoatKeyserverID,
});
const versionBroadcast = new BroadcastChannel('comm_version');
diff --git a/web/webpack.config.cjs b/web/webpack.config.cjs
--- a/web/webpack.config.cjs
+++ b/web/webpack.config.cjs
@@ -13,7 +13,7 @@
async function getConfig(configName) {
const { getCommConfig } = await import(
- '../keyserver/dist/lib/utils/comm-config.js'
+ 'keyserver/dist/lib/utils/comm-config.js'
);
return await getCommConfig(configName);
}
@@ -194,7 +194,18 @@
const identitySocketAddr = JSON.stringify(
identityServiceConfig?.identitySocketAddr,
);
- const envVars = { IDENTITY_SOCKET_ADDR: identitySocketAddr };
+ const authoritativeKeyserverIDConfig = await getConfig({
+ folder: 'facts',
+ name: 'authoritativeKeyserverID',
+ });
+ const authoritativeKeyserverID = JSON.stringify(
+ authoritativeKeyserverIDConfig?.authoritativeKeyserverID,
+ );
+
+ const envVars = {
+ IDENTITY_SOCKET_ADDR: identitySocketAddr,
+ AUTHORITATIVE_KEYSERVER_ID: authoritativeKeyserverID,
+ };
const browserConfigPromise = env.prod
? createProdBrowserConfig(baseProdBrowserConfig, babelConfig, envVars)
: createDevBrowserConfig(baseDevBrowserConfig, babelConfig, envVars);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 1:10 AM (20 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2559247
Default Alt Text
D10993.id36849.diff (2 KB)
Attached To
Mode
D10993: [lib][web][native] Add configurable authoritativeKeyserverID
Attached
Detach File
Event Timeline
Log In to Comment