Files

54 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

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