2023-04-03 20:28:31 -07:00
|
|
|
/**
|
2026-01-28 17:09:06 -08:00
|
|
|
* Copyright IBM Corp. 2021, 2026
|
2024-05-31 11:29:24 -07:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-04-03 20:28:31 -07:00
|
|
|
*/
|
|
|
|
|
|
2023-03-21 15:41:27 -07:00
|
|
|
const EDITION = process.env.EDITION || 'oss'; // Default edition is OSS
|
|
|
|
|
|
2023-04-03 20:28:31 -07:00
|
|
|
const defaultEdition = EDITION;
|
2023-03-21 15:41:27 -07:00
|
|
|
|
2023-04-03 20:28:31 -07:00
|
|
|
const devFeatures = {
|
|
|
|
|
'dev-edition-toggle': false,
|
|
|
|
|
};
|
|
|
|
|
const licensedFeatures = {
|
|
|
|
|
'multi-hop-sessions': false,
|
|
|
|
|
'ssh-target': false,
|
2023-05-22 08:49:30 -07:00
|
|
|
'ssh-session-recording': false,
|
2025-06-13 14:42:37 -07:00
|
|
|
'rdp-target': false,
|
2023-04-03 20:28:31 -07:00
|
|
|
};
|
2023-03-21 15:41:27 -07:00
|
|
|
// Base edition declares available features, disabled by default.
|
|
|
|
|
const baseEdition = {
|
2023-04-03 20:28:31 -07:00
|
|
|
...devFeatures,
|
|
|
|
|
...licensedFeatures,
|
2023-03-21 15:41:27 -07:00
|
|
|
byow: false,
|
|
|
|
|
'byow-pki-hcp-cluster-id': false,
|
|
|
|
|
'static-credentials': false,
|
|
|
|
|
'target-network-address': false,
|
2023-05-16 16:10:38 -07:00
|
|
|
'ldap-auth-methods': false,
|
2025-03-13 15:12:36 -07:00
|
|
|
'worker-filter': false,
|
|
|
|
|
'worker-filter-hcp': false,
|
2023-03-21 15:41:27 -07:00
|
|
|
};
|
2025-11-06 14:44:53 -08:00
|
|
|
// Editions maps edition keys to their associated feature sets.
|
2023-03-21 15:41:27 -07:00
|
|
|
const featureEditions = {};
|
|
|
|
|
featureEditions.oss = {
|
|
|
|
|
...baseEdition,
|
|
|
|
|
byow: true,
|
|
|
|
|
'static-credentials': true,
|
|
|
|
|
'target-network-address': true,
|
2023-09-26 10:04:49 -07:00
|
|
|
'ldap-auth-methods': true,
|
2023-03-21 15:41:27 -07:00
|
|
|
};
|
|
|
|
|
featureEditions.enterprise = {
|
|
|
|
|
...featureEditions.oss,
|
2025-03-13 15:12:36 -07:00
|
|
|
'worker-filter': true,
|
2023-03-21 15:41:27 -07:00
|
|
|
};
|
|
|
|
|
featureEditions.hcp = {
|
|
|
|
|
...featureEditions.enterprise,
|
|
|
|
|
'byow-pki-hcp-cluster-id': true,
|
2025-03-13 15:12:36 -07:00
|
|
|
'worker-filter-hcp': true,
|
2023-03-21 15:41:27 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
featureEditions,
|
2023-04-03 20:28:31 -07:00
|
|
|
defaultEdition,
|
|
|
|
|
licensedFeatures,
|
2023-03-21 15:41:27 -07:00
|
|
|
};
|