engage-engine 1.234.90740002 → 1.238.90780004
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/include/ConfigurationObjects.h +437 -10
- package/include/EngageConstants.h +5 -2
- package/lib/darwin.x64/libengage-shared.dylib +0 -0
- package/lib/linux.x64/libengage-shared.so +0 -0
- package/lib/win32.ia32/engage-shared.dll +0 -0
- package/lib/win32.x64/engage-shared.dll +0 -0
- package/package.json +1 -1
|
@@ -53,6 +53,8 @@ namespace ConfigurationObjects
|
|
|
53
53
|
namespace AppConfigurationObjects
|
|
54
54
|
#endif
|
|
55
55
|
{
|
|
56
|
+
static const char *ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT = "_attached";
|
|
57
|
+
|
|
56
58
|
//-----------------------------------------------------------
|
|
57
59
|
#pragma pack(push, 1)
|
|
58
60
|
typedef struct _DataSeriesHeader_t
|
|
@@ -298,6 +300,12 @@ namespace AppConfigurationObjects
|
|
|
298
300
|
#define FROMJSON_IMPL(__var, __type, __default) \
|
|
299
301
|
getOptional<__type>(#__var, p.__var, j, __default)
|
|
300
302
|
|
|
303
|
+
#define TOJSON_BASE_IMPL() \
|
|
304
|
+
to_json(j, (ConfigurationObjectBase&)p)
|
|
305
|
+
|
|
306
|
+
#define FROMJSON_BASE_IMPL() \
|
|
307
|
+
from_json(j, (ConfigurationObjectBase&)p);
|
|
308
|
+
|
|
301
309
|
|
|
302
310
|
//-----------------------------------------------------------
|
|
303
311
|
static std::string EMPTY_STRING;
|
|
@@ -408,10 +416,40 @@ namespace AppConfigurationObjects
|
|
|
408
416
|
return _documenting;
|
|
409
417
|
}
|
|
410
418
|
|
|
419
|
+
nlohmann::json _attached;
|
|
420
|
+
|
|
411
421
|
protected:
|
|
412
|
-
bool
|
|
422
|
+
bool _documenting;
|
|
413
423
|
};
|
|
414
424
|
|
|
425
|
+
static void to_json(nlohmann::json& j, const ConfigurationObjectBase& p)
|
|
426
|
+
{
|
|
427
|
+
try
|
|
428
|
+
{
|
|
429
|
+
if(p._attached != nullptr)
|
|
430
|
+
{
|
|
431
|
+
j[ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT] = p._attached;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
catch(...)
|
|
435
|
+
{
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
static void from_json(const nlohmann::json& j, ConfigurationObjectBase& p)
|
|
439
|
+
{
|
|
440
|
+
try
|
|
441
|
+
{
|
|
442
|
+
if(j.contains(ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT))
|
|
443
|
+
{
|
|
444
|
+
p._attached = j.at(ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
catch(...)
|
|
448
|
+
{
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
|
|
415
453
|
//-----------------------------------------------------------
|
|
416
454
|
JSON_SERIALIZED_CLASS(FipsCryptoSettings)
|
|
417
455
|
class FipsCryptoSettings : public ConfigurationObjectBase
|
|
@@ -2067,6 +2105,22 @@ namespace AppConfigurationObjects
|
|
|
2067
2105
|
getOptional<NetworkAddress>("tx", p.tx, j);
|
|
2068
2106
|
}
|
|
2069
2107
|
|
|
2108
|
+
/** @brief Enum describing restriction types. */
|
|
2109
|
+
typedef enum
|
|
2110
|
+
{
|
|
2111
|
+
/** @brief Registration for groups is allowed by default */
|
|
2112
|
+
graptPermissive = 0,
|
|
2113
|
+
|
|
2114
|
+
/** @brief Registration for groups is NOT allowed by default - requires definitive access through something like a whitelist*/
|
|
2115
|
+
graptStrict = 1
|
|
2116
|
+
} GroupRestrictionAccessPolicyType_t;
|
|
2117
|
+
|
|
2118
|
+
static bool isValidGroupRestrictionAccessPolicyType(GroupRestrictionAccessPolicyType_t t)
|
|
2119
|
+
{
|
|
2120
|
+
return (t == GroupRestrictionAccessPolicyType_t::graptPermissive ||
|
|
2121
|
+
t == GroupRestrictionAccessPolicyType_t::graptStrict );
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2070
2124
|
/** @brief Enum describing restriction types. */
|
|
2071
2125
|
typedef enum
|
|
2072
2126
|
{
|
|
@@ -2087,6 +2141,43 @@ namespace AppConfigurationObjects
|
|
|
2087
2141
|
t == RestrictionType_t::rtBlacklist );
|
|
2088
2142
|
}
|
|
2089
2143
|
|
|
2144
|
+
/** @brief Enum describing restriction element types. */
|
|
2145
|
+
typedef enum
|
|
2146
|
+
{
|
|
2147
|
+
/** @brief A literal group ID */
|
|
2148
|
+
retGroupId = 0,
|
|
2149
|
+
|
|
2150
|
+
/** @brief Elements are group ID regex patterns */
|
|
2151
|
+
retGroupIdPattern = 1,
|
|
2152
|
+
|
|
2153
|
+
/** @brief Elements are generic access tags regex patterns */
|
|
2154
|
+
retGenericAccessTagPattern = 2,
|
|
2155
|
+
|
|
2156
|
+
/** @brief Elements are X.509 certificate serial number regex patterns */
|
|
2157
|
+
retCertificateSerialNumberPattern = 3,
|
|
2158
|
+
|
|
2159
|
+
/** @brief Elements are X.509 certificate fingerprint regex patterns */
|
|
2160
|
+
retCertificateFingerprintPattern = 4,
|
|
2161
|
+
|
|
2162
|
+
/** @brief Elements are X.509 certificate subject regex patterns */
|
|
2163
|
+
retCertificateSubjectPattern = 5,
|
|
2164
|
+
|
|
2165
|
+
/** @brief Elements are X.509 certificate issuer regex patterns */
|
|
2166
|
+
retCertificateIssuerPattern = 6
|
|
2167
|
+
} RestrictionElementType_t;
|
|
2168
|
+
|
|
2169
|
+
static bool isValidRestrictionElementType(RestrictionElementType_t t)
|
|
2170
|
+
{
|
|
2171
|
+
return (t == RestrictionElementType_t::retGroupId ||
|
|
2172
|
+
t == RestrictionElementType_t::retGroupIdPattern ||
|
|
2173
|
+
t == RestrictionElementType_t::retGenericAccessTagPattern ||
|
|
2174
|
+
t == RestrictionElementType_t::retCertificateSerialNumberPattern ||
|
|
2175
|
+
t == RestrictionElementType_t::retCertificateFingerprintPattern ||
|
|
2176
|
+
t == RestrictionElementType_t::retCertificateSubjectPattern ||
|
|
2177
|
+
t == RestrictionElementType_t::retCertificateIssuerPattern);
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
|
|
2090
2181
|
//-----------------------------------------------------------
|
|
2091
2182
|
JSON_SERIALIZED_CLASS(NetworkAddressRestrictionList)
|
|
2092
2183
|
/**
|
|
@@ -2158,12 +2249,16 @@ namespace AppConfigurationObjects
|
|
|
2158
2249
|
/** @brief Type indicating how the elements are to be treated **/
|
|
2159
2250
|
RestrictionType_t type;
|
|
2160
2251
|
|
|
2252
|
+
/** @brief Type indicating what kind of data each element contains **/
|
|
2253
|
+
RestrictionElementType_t elementsType;
|
|
2254
|
+
|
|
2161
2255
|
/** @brief List of elements */
|
|
2162
|
-
std::vector<std::string>
|
|
2256
|
+
std::vector<std::string> elements;
|
|
2163
2257
|
|
|
2164
2258
|
StringRestrictionList()
|
|
2165
2259
|
{
|
|
2166
2260
|
type = RestrictionType_t::rtUndefined;
|
|
2261
|
+
elementsType = RestrictionElementType_t::retGroupId;
|
|
2167
2262
|
clear();
|
|
2168
2263
|
}
|
|
2169
2264
|
|
|
@@ -2177,6 +2272,7 @@ namespace AppConfigurationObjects
|
|
|
2177
2272
|
{
|
|
2178
2273
|
j = nlohmann::json{
|
|
2179
2274
|
TOJSON_IMPL(type),
|
|
2275
|
+
TOJSON_IMPL(elementsType),
|
|
2180
2276
|
TOJSON_IMPL(elements)
|
|
2181
2277
|
};
|
|
2182
2278
|
}
|
|
@@ -2184,10 +2280,61 @@ namespace AppConfigurationObjects
|
|
|
2184
2280
|
{
|
|
2185
2281
|
p.clear();
|
|
2186
2282
|
getOptional<RestrictionType_t>("type", p.type, j, RestrictionType_t::rtUndefined);
|
|
2283
|
+
getOptional<RestrictionElementType_t>("elementsType", p.elementsType, j, RestrictionElementType_t::retGroupId);
|
|
2187
2284
|
getOptional<std::vector<std::string>>("elements", p.elements, j);
|
|
2188
2285
|
}
|
|
2189
2286
|
|
|
2190
2287
|
|
|
2288
|
+
//-----------------------------------------------------------
|
|
2289
|
+
JSON_SERIALIZED_CLASS(PacketCapturer)
|
|
2290
|
+
/**
|
|
2291
|
+
* @brief Description of a packet capturer
|
|
2292
|
+
*
|
|
2293
|
+
* Helper C++ class to serialize and de-serialize PacketCapturer JSON.
|
|
2294
|
+
*
|
|
2295
|
+
* Example: @include[doc] examples/PacketCapturer.json
|
|
2296
|
+
*
|
|
2297
|
+
*/
|
|
2298
|
+
class PacketCapturer : public ConfigurationObjectBase
|
|
2299
|
+
{
|
|
2300
|
+
IMPLEMENT_JSON_SERIALIZATION()
|
|
2301
|
+
IMPLEMENT_JSON_DOCUMENTATION(PacketCapturer)
|
|
2302
|
+
|
|
2303
|
+
public:
|
|
2304
|
+
bool enabled;
|
|
2305
|
+
uint32_t maxMb;
|
|
2306
|
+
std::string filePrefix;
|
|
2307
|
+
|
|
2308
|
+
PacketCapturer()
|
|
2309
|
+
{
|
|
2310
|
+
clear();
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
void clear()
|
|
2314
|
+
{
|
|
2315
|
+
enabled = false;
|
|
2316
|
+
maxMb = 10;
|
|
2317
|
+
filePrefix.clear();
|
|
2318
|
+
}
|
|
2319
|
+
};
|
|
2320
|
+
|
|
2321
|
+
static void to_json(nlohmann::json& j, const PacketCapturer& p)
|
|
2322
|
+
{
|
|
2323
|
+
j = nlohmann::json{
|
|
2324
|
+
TOJSON_IMPL(enabled),
|
|
2325
|
+
TOJSON_IMPL(maxMb),
|
|
2326
|
+
TOJSON_IMPL(filePrefix)
|
|
2327
|
+
};
|
|
2328
|
+
}
|
|
2329
|
+
static void from_json(const nlohmann::json& j, PacketCapturer& p)
|
|
2330
|
+
{
|
|
2331
|
+
p.clear();
|
|
2332
|
+
getOptional<bool>("enabled", p.enabled, j, false);
|
|
2333
|
+
getOptional<uint32_t>("maxMb", p.maxMb, j, 10);
|
|
2334
|
+
getOptional<std::string>("filePrefix", p.filePrefix, j, EMPTY_STRING);
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
|
|
2191
2338
|
//-----------------------------------------------------------
|
|
2192
2339
|
JSON_SERIALIZED_CLASS(TransportImpairment)
|
|
2193
2340
|
/**
|
|
@@ -2806,7 +2953,7 @@ namespace AppConfigurationObjects
|
|
|
2806
2953
|
|
|
2807
2954
|
|
|
2808
2955
|
/* PCM */
|
|
2809
|
-
/** @brief PCM
|
|
2956
|
+
/** @brief PCM */
|
|
2810
2957
|
ctPcm = 5,
|
|
2811
2958
|
|
|
2812
2959
|
// AMR Narrowband */
|
|
@@ -3791,6 +3938,44 @@ namespace AppConfigurationObjects
|
|
|
3791
3938
|
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_SECURITY_CLASSIFICATION_LEVEL_TOO_HIGH = "SecurityClassificationLevelTooHigh";
|
|
3792
3939
|
/** @brief The Rallypoint has denied the registration for no specific reason **/
|
|
3793
3940
|
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_GENERAL_DENIAL = "GeneralDenial";
|
|
3941
|
+
|
|
3942
|
+
/** @brief The Rallypoint denied the registration request because the far-end's certificate does not have an access tag for the group **/
|
|
3943
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_NO_ACCESS_TAG = "NoAccessTag";
|
|
3944
|
+
/** @brief The Rallypoint denied the registration request because the far-end's certificate does not have an access tag for the group **/
|
|
3945
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_EXCLUDED_ACCESS_TAG = "ExcludedAccessTag";
|
|
3946
|
+
/** @brief The Rallypoint denied the registration request because the far-end's certificate does not have an an approved serial number **/
|
|
3947
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_NO_SERIAL = "NoSerial";
|
|
3948
|
+
/** @brief The Rallypoint denied the registration request because the far-end's certificate serial number has been excluded **/
|
|
3949
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_EXCLUDED_SERIAL = "ExcludedSerial";
|
|
3950
|
+
/** @brief The Rallypoint denied the registration request because the far-end's certificate does not have an an approved fingerprint **/
|
|
3951
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_NO_FINGERPRINT = "NoFingerprint";
|
|
3952
|
+
/** @brief The Rallypoint denied the registration request because the far-end's certificate fingerprint has been excluded **/
|
|
3953
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_EXCLUDED_FINGERPRINT = "ExcludedFingerprint";
|
|
3954
|
+
/** @brief The Rallypoint denied the registration request because the far-end's certificate does not have an an approved subject **/
|
|
3955
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_NO_SUBJECT = "NoSubject";
|
|
3956
|
+
/** @brief The Rallypoint denied the registration request because the far-end's certificate subject has been excluded **/
|
|
3957
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_EXCLUDED_SUBJECT = "ExcludedSubject";
|
|
3958
|
+
/** @brief The Rallypoint denied the registration request because the far-end's certificate does not have an an approved issuer **/
|
|
3959
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_NO_ISSUER = "NoIssuer";
|
|
3960
|
+
/** @brief The Rallypoint denied the registration request because the far-end's certificate issuer has been excluded **/
|
|
3961
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_EXCLUDED_ISSUER = "ExcludedIssuer";
|
|
3962
|
+
/** @brief The Rallypoint denied the registration request because the far-end does not appear in any whitelist criteria **/
|
|
3963
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_NOT_ON_WHITELIST = "NotOnWhitelist";
|
|
3964
|
+
/** @brief The Rallypoint denied the registration request because the far-end does appears in blackist criteria **/
|
|
3965
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_DISCONNECTED_REASON_ON_BLACKLIST = "OnBlacklist";
|
|
3966
|
+
|
|
3967
|
+
/** @} */
|
|
3968
|
+
|
|
3969
|
+
/** @addtogroup OID IANA-type object identifiers
|
|
3970
|
+
*
|
|
3971
|
+
* Object Identifiers we commonly use
|
|
3972
|
+
*
|
|
3973
|
+
* @{
|
|
3974
|
+
*/
|
|
3975
|
+
/** @brief Rally Tactical Systems' PEN as assigned by IANA */
|
|
3976
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *OID_RTS_PEM = "58217";
|
|
3977
|
+
/** @brief The link to the Rallypoint is down */
|
|
3978
|
+
ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *OID_RTS_CERT_SUBJ_ACCESS_TAGS = "1.3.6.1.4.1.58217.1";
|
|
3794
3979
|
/** @} */
|
|
3795
3980
|
|
|
3796
3981
|
|
|
@@ -4448,9 +4633,17 @@ namespace AppConfigurationObjects
|
|
|
4448
4633
|
/** @brief [Optional] List of sources to ignore for this group */
|
|
4449
4634
|
std::vector<Source> ignoreSources;
|
|
4450
4635
|
|
|
4451
|
-
/** @brief ISO 639-2
|
|
4636
|
+
/** @brief ISO 639-2 language code for the group */
|
|
4452
4637
|
std::string languageCode;
|
|
4453
4638
|
|
|
4639
|
+
/** @brief Name of the synthesis voice to use for the group */
|
|
4640
|
+
std::string synVoice;
|
|
4641
|
+
|
|
4642
|
+
/** @brief Details for capture of received packets */
|
|
4643
|
+
PacketCapturer rxCapture;
|
|
4644
|
+
|
|
4645
|
+
/** @brief Details for capture of transmitted packets */
|
|
4646
|
+
PacketCapturer txCapture;
|
|
4454
4647
|
|
|
4455
4648
|
Group()
|
|
4456
4649
|
{
|
|
@@ -4524,6 +4717,10 @@ namespace AppConfigurationObjects
|
|
|
4524
4717
|
ignoreSources.clear();
|
|
4525
4718
|
|
|
4526
4719
|
languageCode.clear();
|
|
4720
|
+
synVoice.clear();
|
|
4721
|
+
|
|
4722
|
+
rxCapture.clear();
|
|
4723
|
+
txCapture.clear();
|
|
4527
4724
|
}
|
|
4528
4725
|
};
|
|
4529
4726
|
|
|
@@ -4581,9 +4778,15 @@ namespace AppConfigurationObjects
|
|
|
4581
4778
|
|
|
4582
4779
|
TOJSON_IMPL(ignoreSources),
|
|
4583
4780
|
|
|
4584
|
-
TOJSON_IMPL(languageCode)
|
|
4781
|
+
TOJSON_IMPL(languageCode),
|
|
4782
|
+
TOJSON_IMPL(synVoice),
|
|
4783
|
+
|
|
4784
|
+
TOJSON_IMPL(rxCapture),
|
|
4785
|
+
TOJSON_IMPL(txCapture)
|
|
4585
4786
|
};
|
|
4586
4787
|
|
|
4788
|
+
TOJSON_BASE_IMPL();
|
|
4789
|
+
|
|
4587
4790
|
// TODO: need a better way to indicate whether rtpProfile is present
|
|
4588
4791
|
if(p._wasDeserialized_rtpProfile || p.isDocumenting())
|
|
4589
4792
|
{
|
|
@@ -4655,6 +4858,12 @@ namespace AppConfigurationObjects
|
|
|
4655
4858
|
getOptional<uint32_t>("securityLevel", p.securityLevel, j, 0);
|
|
4656
4859
|
getOptional<std::vector<Source>>("ignoreSources", p.ignoreSources, j);
|
|
4657
4860
|
getOptional<std::string>("languageCode", p.languageCode, j);
|
|
4861
|
+
getOptional<std::string>("synVoice", p.synVoice, j);
|
|
4862
|
+
|
|
4863
|
+
getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
|
|
4864
|
+
getOptional<PacketCapturer>("txCapture", p.txCapture, j);
|
|
4865
|
+
|
|
4866
|
+
FROMJSON_BASE_IMPL();
|
|
4658
4867
|
}
|
|
4659
4868
|
|
|
4660
4869
|
|
|
@@ -4841,7 +5050,8 @@ namespace AppConfigurationObjects
|
|
|
4841
5050
|
static void to_json(nlohmann::json& j, const LicenseDescriptor& p)
|
|
4842
5051
|
{
|
|
4843
5052
|
j = nlohmann::json{
|
|
4844
|
-
TOJSON_IMPL(entitlement),
|
|
5053
|
+
//TOJSON_IMPL(entitlement),
|
|
5054
|
+
{"entitlement", "*entitlement*"},
|
|
4845
5055
|
TOJSON_IMPL(key),
|
|
4846
5056
|
TOJSON_IMPL(activationCode),
|
|
4847
5057
|
TOJSON_IMPL(type),
|
|
@@ -4850,7 +5060,8 @@ namespace AppConfigurationObjects
|
|
|
4850
5060
|
TOJSON_IMPL(flags),
|
|
4851
5061
|
TOJSON_IMPL(deviceId),
|
|
4852
5062
|
TOJSON_IMPL(status),
|
|
4853
|
-
TOJSON_IMPL(manufacturerId),
|
|
5063
|
+
//TOJSON_IMPL(manufacturerId),
|
|
5064
|
+
{"manufacturerId", "*manufacturerId*"},
|
|
4854
5065
|
TOJSON_IMPL(cargo),
|
|
4855
5066
|
TOJSON_IMPL(cargoFlags)
|
|
4856
5067
|
};
|
|
@@ -7706,9 +7917,15 @@ namespace AppConfigurationObjects
|
|
|
7706
7917
|
IMPLEMENT_JSON_DOCUMENTATION(RallypointWebsocketSettings)
|
|
7707
7918
|
|
|
7708
7919
|
public:
|
|
7920
|
+
/** @brief [Default: false] Websocket is enabled */
|
|
7921
|
+
bool enabled;
|
|
7922
|
+
|
|
7709
7923
|
/** @brief Listen port (TCP). Default is 8443 */
|
|
7710
7924
|
int listenPort;
|
|
7711
7925
|
|
|
7926
|
+
/** @brief Certificate to be used for WebSockets */
|
|
7927
|
+
SecurityCertificate certificate;
|
|
7928
|
+
|
|
7712
7929
|
RallypointWebsocketSettings()
|
|
7713
7930
|
{
|
|
7714
7931
|
clear();
|
|
@@ -7716,20 +7933,159 @@ namespace AppConfigurationObjects
|
|
|
7716
7933
|
|
|
7717
7934
|
void clear()
|
|
7718
7935
|
{
|
|
7936
|
+
enabled = false;
|
|
7719
7937
|
listenPort = 8443;
|
|
7938
|
+
certificate.clear();
|
|
7720
7939
|
}
|
|
7721
7940
|
};
|
|
7722
7941
|
|
|
7723
7942
|
static void to_json(nlohmann::json& j, const RallypointWebsocketSettings& p)
|
|
7724
7943
|
{
|
|
7725
7944
|
j = nlohmann::json{
|
|
7726
|
-
TOJSON_IMPL(
|
|
7945
|
+
TOJSON_IMPL(enabled),
|
|
7946
|
+
TOJSON_IMPL(listenPort),
|
|
7947
|
+
TOJSON_IMPL(certificate)
|
|
7727
7948
|
};
|
|
7728
7949
|
}
|
|
7729
7950
|
static void from_json(const nlohmann::json& j, RallypointWebsocketSettings& p)
|
|
7730
7951
|
{
|
|
7731
7952
|
p.clear();
|
|
7953
|
+
getOptional<bool>("enabled", p.enabled, j, false);
|
|
7732
7954
|
getOptional<int>("listenPort", p.listenPort, j, 8443);
|
|
7955
|
+
getOptional<SecurityCertificate>("certificate", p.certificate, j);
|
|
7956
|
+
}
|
|
7957
|
+
|
|
7958
|
+
|
|
7959
|
+
|
|
7960
|
+
//-----------------------------------------------------------
|
|
7961
|
+
JSON_SERIALIZED_CLASS(RallypointAdvertisingSettings)
|
|
7962
|
+
/**
|
|
7963
|
+
* @brief Defines settings for Rallypoint advertising
|
|
7964
|
+
*
|
|
7965
|
+
* Example: @include[doc] examples/RallypointAdvertisingSettings.json
|
|
7966
|
+
*
|
|
7967
|
+
*/
|
|
7968
|
+
class RallypointAdvertisingSettings : public ConfigurationObjectBase
|
|
7969
|
+
{
|
|
7970
|
+
IMPLEMENT_JSON_SERIALIZATION()
|
|
7971
|
+
IMPLEMENT_JSON_DOCUMENTATION(RallypointAdvertisingSettings)
|
|
7972
|
+
|
|
7973
|
+
public:
|
|
7974
|
+
/** @brief [Default: false] Advertising is enabled */
|
|
7975
|
+
bool enabled;
|
|
7976
|
+
|
|
7977
|
+
/** @brief [Optional] This Rallypoint's mesh name */
|
|
7978
|
+
std::string meshName;
|
|
7979
|
+
|
|
7980
|
+
/** @brief [Optional] This Rallypoint's DNS-SD host name */
|
|
7981
|
+
std::string hostName;
|
|
7982
|
+
|
|
7983
|
+
/** @brief [Optional, Default "_rallypoint._tcp.local."] The service name */
|
|
7984
|
+
std::string serviceName;
|
|
7985
|
+
|
|
7986
|
+
/** @brief The multicast network interface for mDNS */
|
|
7987
|
+
std::string interfaceName;
|
|
7988
|
+
|
|
7989
|
+
/** @brief [Default: RP port] The multicast network interface for mDNS */
|
|
7990
|
+
int port;
|
|
7991
|
+
|
|
7992
|
+
/** @brief [Default: 60] TTL for service TTL */
|
|
7993
|
+
int ttl;
|
|
7994
|
+
|
|
7995
|
+
/** @brief [Optional] List of additional meshes that can be reached via this RP */
|
|
7996
|
+
std::vector<std::string> extraMeshes;
|
|
7997
|
+
|
|
7998
|
+
|
|
7999
|
+
RallypointAdvertisingSettings()
|
|
8000
|
+
{
|
|
8001
|
+
clear();
|
|
8002
|
+
}
|
|
8003
|
+
|
|
8004
|
+
void clear()
|
|
8005
|
+
{
|
|
8006
|
+
enabled = false;
|
|
8007
|
+
meshName.clear();
|
|
8008
|
+
hostName.clear();
|
|
8009
|
+
serviceName = "_rallypoint._tcp.local.";
|
|
8010
|
+
interfaceName.clear();
|
|
8011
|
+
port = 0;
|
|
8012
|
+
ttl = 60;
|
|
8013
|
+
extraMeshes.clear();
|
|
8014
|
+
}
|
|
8015
|
+
};
|
|
8016
|
+
|
|
8017
|
+
static void to_json(nlohmann::json& j, const RallypointAdvertisingSettings& p)
|
|
8018
|
+
{
|
|
8019
|
+
j = nlohmann::json{
|
|
8020
|
+
TOJSON_IMPL(enabled),
|
|
8021
|
+
TOJSON_IMPL(meshName),
|
|
8022
|
+
TOJSON_IMPL(hostName),
|
|
8023
|
+
TOJSON_IMPL(serviceName),
|
|
8024
|
+
TOJSON_IMPL(interfaceName),
|
|
8025
|
+
TOJSON_IMPL(port),
|
|
8026
|
+
TOJSON_IMPL(ttl),
|
|
8027
|
+
TOJSON_IMPL(extraMeshes)
|
|
8028
|
+
};
|
|
8029
|
+
}
|
|
8030
|
+
static void from_json(const nlohmann::json& j, RallypointAdvertisingSettings& p)
|
|
8031
|
+
{
|
|
8032
|
+
p.clear();
|
|
8033
|
+
getOptional<bool>("enabled", p.enabled, j, false);
|
|
8034
|
+
getOptional<std::string>("meshName", p.meshName, j);
|
|
8035
|
+
getOptional<std::string>("hostName", p.hostName, j);
|
|
8036
|
+
getOptional<std::string>("serviceName", p.serviceName, j, "_rallypoint._tcp.local.");
|
|
8037
|
+
getOptional<std::string>("interfaceName", p.interfaceName, j);
|
|
8038
|
+
|
|
8039
|
+
getOptional<int>("port", p.port, j, 0);
|
|
8040
|
+
getOptional<int>("ttl", p.ttl, j, 60);
|
|
8041
|
+
getOptional<std::vector<std::string>>("extraMeshes", p.extraMeshes, j);
|
|
8042
|
+
}
|
|
8043
|
+
|
|
8044
|
+
|
|
8045
|
+
//-----------------------------------------------------------
|
|
8046
|
+
JSON_SERIALIZED_CLASS(RallypointExtendedGroupRestriction)
|
|
8047
|
+
/**
|
|
8048
|
+
* @brief Defines settings for Rallypoint extended group restrictions
|
|
8049
|
+
*
|
|
8050
|
+
* Example: @include[doc] examples/RallypointExtendedGroupRestriction.json
|
|
8051
|
+
*
|
|
8052
|
+
*/
|
|
8053
|
+
class RallypointExtendedGroupRestriction : public ConfigurationObjectBase
|
|
8054
|
+
{
|
|
8055
|
+
IMPLEMENT_JSON_SERIALIZATION()
|
|
8056
|
+
IMPLEMENT_JSON_DOCUMENTATION(RallypointExtendedGroupRestriction)
|
|
8057
|
+
|
|
8058
|
+
public:
|
|
8059
|
+
/** @brief Group ID */
|
|
8060
|
+
std::string id;
|
|
8061
|
+
|
|
8062
|
+
/** @brief Restrictions */
|
|
8063
|
+
std::vector<StringRestrictionList> restrictions;
|
|
8064
|
+
|
|
8065
|
+
RallypointExtendedGroupRestriction()
|
|
8066
|
+
{
|
|
8067
|
+
clear();
|
|
8068
|
+
}
|
|
8069
|
+
|
|
8070
|
+
void clear()
|
|
8071
|
+
{
|
|
8072
|
+
id.clear();
|
|
8073
|
+
restrictions.clear();
|
|
8074
|
+
}
|
|
8075
|
+
};
|
|
8076
|
+
|
|
8077
|
+
static void to_json(nlohmann::json& j, const RallypointExtendedGroupRestriction& p)
|
|
8078
|
+
{
|
|
8079
|
+
j = nlohmann::json{
|
|
8080
|
+
TOJSON_IMPL(id),
|
|
8081
|
+
TOJSON_IMPL(restrictions)
|
|
8082
|
+
};
|
|
8083
|
+
}
|
|
8084
|
+
static void from_json(const nlohmann::json& j, RallypointExtendedGroupRestriction& p)
|
|
8085
|
+
{
|
|
8086
|
+
p.clear();
|
|
8087
|
+
getOptional<std::string>("id", p.id, j);
|
|
8088
|
+
getOptional<std::vector<StringRestrictionList>>("restrictions", p.restrictions, j);
|
|
7733
8089
|
}
|
|
7734
8090
|
|
|
7735
8091
|
|
|
@@ -7845,6 +8201,12 @@ namespace AppConfigurationObjects
|
|
|
7845
8201
|
/** @brief Group IDs to be restricted (inclusive or exclusive) */
|
|
7846
8202
|
StringRestrictionList groupRestrictions;
|
|
7847
8203
|
|
|
8204
|
+
/** @brief The policy employed to allow group registration */
|
|
8205
|
+
GroupRestrictionAccessPolicyType_t groupRestrictionAccessPolicyType;
|
|
8206
|
+
|
|
8207
|
+
/** @brief Extended group restrictions */
|
|
8208
|
+
std::vector<RallypointExtendedGroupRestriction> extendedGroupRestrictions;
|
|
8209
|
+
|
|
7848
8210
|
/** @brief Name to use for signalling a configuration check */
|
|
7849
8211
|
std::string configurationCheckSignalName;
|
|
7850
8212
|
|
|
@@ -7890,6 +8252,9 @@ namespace AppConfigurationObjects
|
|
|
7890
8252
|
/** @brief [Optional] Settings for NSM. */
|
|
7891
8253
|
NsmConfiguration nsm;
|
|
7892
8254
|
|
|
8255
|
+
/** @brief [Optional] Settings for advertising. */
|
|
8256
|
+
RallypointAdvertisingSettings advertising;
|
|
8257
|
+
|
|
7893
8258
|
RallypointServer()
|
|
7894
8259
|
{
|
|
7895
8260
|
clear();
|
|
@@ -7944,6 +8309,9 @@ namespace AppConfigurationObjects
|
|
|
7944
8309
|
peerRtBehaviors.clear();
|
|
7945
8310
|
websocket.clear();
|
|
7946
8311
|
nsm.clear();
|
|
8312
|
+
advertising.clear();
|
|
8313
|
+
extendedGroupRestrictions.clear();
|
|
8314
|
+
groupRestrictionAccessPolicyType = GroupRestrictionAccessPolicyType_t::graptPermissive;
|
|
7947
8315
|
}
|
|
7948
8316
|
};
|
|
7949
8317
|
|
|
@@ -7996,7 +8364,10 @@ namespace AppConfigurationObjects
|
|
|
7996
8364
|
TOJSON_IMPL(peerRtTestIntervalMs),
|
|
7997
8365
|
TOJSON_IMPL(peerRtBehaviors),
|
|
7998
8366
|
TOJSON_IMPL(websocket),
|
|
7999
|
-
TOJSON_IMPL(nsm)
|
|
8367
|
+
TOJSON_IMPL(nsm),
|
|
8368
|
+
TOJSON_IMPL(advertising),
|
|
8369
|
+
TOJSON_IMPL(extendedGroupRestrictions),
|
|
8370
|
+
TOJSON_IMPL(groupRestrictionAccessPolicyType)
|
|
8000
8371
|
};
|
|
8001
8372
|
}
|
|
8002
8373
|
static void from_json(const nlohmann::json& j, RallypointServer& p)
|
|
@@ -8049,6 +8420,9 @@ namespace AppConfigurationObjects
|
|
|
8049
8420
|
getOptional<std::vector<RallypointRpRtTimingBehavior>>("peerRtBehaviors", p.peerRtBehaviors, j);
|
|
8050
8421
|
getOptional<RallypointWebsocketSettings>("websocket", p.websocket, j);
|
|
8051
8422
|
getOptional<NsmConfiguration>("nsm", p.nsm, j);
|
|
8423
|
+
getOptional<RallypointAdvertisingSettings>("advertising", p.advertising, j);
|
|
8424
|
+
getOptional<std::vector<RallypointExtendedGroupRestriction>>("extendedGroupRestrictions", p.extendedGroupRestrictions, j);
|
|
8425
|
+
getOptional<GroupRestrictionAccessPolicyType_t>("groupRestrictionAccessPolicyType", p.groupRestrictionAccessPolicyType, j, GroupRestrictionAccessPolicyType_t::graptPermissive);
|
|
8052
8426
|
}
|
|
8053
8427
|
|
|
8054
8428
|
//-----------------------------------------------------------
|
|
@@ -8486,6 +8860,53 @@ namespace AppConfigurationObjects
|
|
|
8486
8860
|
getOptional<std::vector<CertStoreCertificateElement>>("certificates", p.certificates, j);
|
|
8487
8861
|
}
|
|
8488
8862
|
|
|
8863
|
+
//-----------------------------------------------------------
|
|
8864
|
+
JSON_SERIALIZED_CLASS(CertificateSubjectElement)
|
|
8865
|
+
/**
|
|
8866
|
+
* @brief Description of a certificate subject element
|
|
8867
|
+
*
|
|
8868
|
+
* Helper C++ class to serialize and de-serialize CertificateSubjectElement JSON
|
|
8869
|
+
*
|
|
8870
|
+
*/
|
|
8871
|
+
class CertificateSubjectElement : public ConfigurationObjectBase
|
|
8872
|
+
{
|
|
8873
|
+
IMPLEMENT_JSON_SERIALIZATION()
|
|
8874
|
+
IMPLEMENT_JSON_DOCUMENTATION(CertificateSubjectElement)
|
|
8875
|
+
|
|
8876
|
+
public:
|
|
8877
|
+
/** @brief Name */
|
|
8878
|
+
std::string name;
|
|
8879
|
+
|
|
8880
|
+
/** @brief Value */
|
|
8881
|
+
std::string value;
|
|
8882
|
+
|
|
8883
|
+
CertificateSubjectElement()
|
|
8884
|
+
{
|
|
8885
|
+
clear();
|
|
8886
|
+
}
|
|
8887
|
+
|
|
8888
|
+
void clear()
|
|
8889
|
+
{
|
|
8890
|
+
name.clear();
|
|
8891
|
+
value.clear();
|
|
8892
|
+
}
|
|
8893
|
+
};
|
|
8894
|
+
|
|
8895
|
+
static void to_json(nlohmann::json& j, const CertificateSubjectElement& p)
|
|
8896
|
+
{
|
|
8897
|
+
j = nlohmann::json{
|
|
8898
|
+
TOJSON_IMPL(name),
|
|
8899
|
+
TOJSON_IMPL(value)
|
|
8900
|
+
};
|
|
8901
|
+
}
|
|
8902
|
+
static void from_json(const nlohmann::json& j, CertificateSubjectElement& p)
|
|
8903
|
+
{
|
|
8904
|
+
p.clear();
|
|
8905
|
+
getOptional<std::string>("name", p.name, j, EMPTY_STRING);
|
|
8906
|
+
getOptional<std::string>("value", p.value, j, EMPTY_STRING);
|
|
8907
|
+
}
|
|
8908
|
+
|
|
8909
|
+
|
|
8489
8910
|
//-----------------------------------------------------------
|
|
8490
8911
|
JSON_SERIALIZED_CLASS(CertificateDescriptor)
|
|
8491
8912
|
/**
|
|
@@ -8524,6 +8945,9 @@ namespace AppConfigurationObjects
|
|
|
8524
8945
|
/** @brief Fingerprint */
|
|
8525
8946
|
std::string fingerprint;
|
|
8526
8947
|
|
|
8948
|
+
/** @brief Array of subject elements */
|
|
8949
|
+
std::vector<CertificateSubjectElement> subjectElements;
|
|
8950
|
+
|
|
8527
8951
|
CertificateDescriptor()
|
|
8528
8952
|
{
|
|
8529
8953
|
clear();
|
|
@@ -8539,6 +8963,7 @@ namespace AppConfigurationObjects
|
|
|
8539
8963
|
notAfter.clear();
|
|
8540
8964
|
serial.clear();
|
|
8541
8965
|
fingerprint.clear();
|
|
8966
|
+
subjectElements.clear();
|
|
8542
8967
|
}
|
|
8543
8968
|
};
|
|
8544
8969
|
|
|
@@ -8552,7 +8977,8 @@ namespace AppConfigurationObjects
|
|
|
8552
8977
|
TOJSON_IMPL(notBefore),
|
|
8553
8978
|
TOJSON_IMPL(notAfter),
|
|
8554
8979
|
TOJSON_IMPL(serial),
|
|
8555
|
-
TOJSON_IMPL(fingerprint)
|
|
8980
|
+
TOJSON_IMPL(fingerprint),
|
|
8981
|
+
TOJSON_IMPL(subjectElements)
|
|
8556
8982
|
};
|
|
8557
8983
|
}
|
|
8558
8984
|
static void from_json(const nlohmann::json& j, CertificateDescriptor& p)
|
|
@@ -8566,6 +8992,7 @@ namespace AppConfigurationObjects
|
|
|
8566
8992
|
getOptional<std::string>("notAfter", p.notAfter, j, EMPTY_STRING);
|
|
8567
8993
|
getOptional<std::string>("serial", p.serial, j, EMPTY_STRING);
|
|
8568
8994
|
getOptional<std::string>("fingerprint", p.fingerprint, j, EMPTY_STRING);
|
|
8995
|
+
getOptional<std::vector<CertificateSubjectElement>>("subjectElements", p.subjectElements, j);
|
|
8569
8996
|
}
|
|
8570
8997
|
|
|
8571
8998
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED