Skip to content

Commit ab1631c

Browse files
mergify[bot]emiliocuestafcferreiragonz
authored
Update security tests to use governance-based encryption configuration (#6277) (#6395)
* Update security tests to use governance-based encryption configuration (#6277) * Add reliability as a param to security tests Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Prepare XMLs to generate smime files for new tests Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Adding tests with access_sign in topic name Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Add tests for SIGN access in liveliness_protection_kind/rtps_protection_kind Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Add tests for SIGN access in discovery_protection_kind Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Add tests for large data Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Modify performance tests to properly test access security Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Generate SMIME files from XML Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Remove old tests Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Relaxing requirements for best effor tests Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Uncrustify Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Fix some mistakes on the new tests and config files Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Editing performance test files, they are ok now Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Fix compilation issues Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Attempt to fix large_data tests Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Update sign permissions files Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Attempt to fix transport+best_effort test cases Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Skip SIGN tests Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Adding some comments Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Add topic for profiling tests in performance tests xml and smime Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> * Refs #24046: Delete reliability matrix in test suite Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Avoid overload for clarification Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Update name of tests Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Create common methods to configure plugins Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Make basic test methods independent of Test suite class Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Add common communication test method Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Fix only Auth security tests Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Remove DataSharing from Security tests Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Use common methods for configuration Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Run with both reliability tests with RTPS or submessage encryption or sign Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Templatize test_basic_secure_communication method Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Do not run best_effort large data tests Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Uncrustify Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Fix Windows build Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Enable othercacert in 'fill_access' Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> * Refs #24046: Reduce large data tests Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> --------- Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com> (cherry picked from commit a1d550b) * Uncrustify Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> --------- Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com> Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com> Co-authored-by: Emilio Cuesta Fernandez <emiliocuesta@eprosima.com> Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
1 parent 81332e6 commit ab1631c

49 files changed

Lines changed: 6918 additions & 2536 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

test/blackbox/common/BlackboxTestsSecurity.cpp

Lines changed: 2586 additions & 2279 deletions
Large diffs are not rendered by default.

test/certs/governance_disable_discovery_disable_access_encrypt.smime

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
MIME-Version: 1.0
2-
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="sha-256"; boundary="----AC038611B7DF85015D509E9E834F75CC"
2+
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="sha-256"; boundary="----CC2712ED51E7E5454DED621720BB3CB3"
33

44
This is an S/MIME signed message
55

6-
------AC038611B7DF85015D509E9E834F75CC
6+
------CC2712ED51E7E5454DED621720BB3CB3
77
Content-Type: text/plain
88

99
<?xml version="1.0" encoding="utf-8"?>
@@ -24,7 +24,7 @@ Content-Type: text/plain
2424
<rtps_protection_kind>ENCRYPT</rtps_protection_kind>
2525
<topic_access_rules>
2626
<topic_rule>
27-
<topic_expression>Security/Security_BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_enable_discovery_enable_access_encrypt/*</topic_expression>
27+
<topic_expression>Security/Security_SecurityPlugins_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_enable_discovery_enable_access_encrypt/*</topic_expression>
2828
<enable_discovery_protection>true</enable_discovery_protection>
2929
<enable_liveliness_protection>false</enable_liveliness_protection>
3030
<enable_read_access_control>true</enable_read_access_control>
@@ -33,7 +33,7 @@ Content-Type: text/plain
3333
<data_protection_kind>ENCRYPT</data_protection_kind>
3434
</topic_rule>
3535
<topic_rule>
36-
<topic_expression>Security/Security_BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_disable_discovery_enable_access_encrypt/*</topic_expression>
36+
<topic_expression>Security/Security_SecurityPlugins_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_disable_discovery_enable_access_encrypt/*</topic_expression>
3737
<enable_discovery_protection>false</enable_discovery_protection>
3838
<enable_liveliness_protection>false</enable_liveliness_protection>
3939
<enable_read_access_control>true</enable_read_access_control>
@@ -42,7 +42,7 @@ Content-Type: text/plain
4242
<data_protection_kind>ENCRYPT</data_protection_kind>
4343
</topic_rule>
4444
<topic_rule>
45-
<topic_expression>Security/Security_BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_disable_discovery_disable_access_encrypt/*</topic_expression>
45+
<topic_expression>Security/Security_SecurityPlugins_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_disable_discovery_disable_access_encrypt/*</topic_expression>
4646
<enable_discovery_protection>false</enable_discovery_protection>
4747
<enable_liveliness_protection>false</enable_liveliness_protection>
4848
<enable_read_access_control>false</enable_read_access_control>
@@ -51,7 +51,7 @@ Content-Type: text/plain
5151
<data_protection_kind>ENCRYPT</data_protection_kind>
5252
</topic_rule>
5353
<topic_rule>
54-
<topic_expression>Security/Security_BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_enable_discovery_disable_access_encrypt/*</topic_expression>
54+
<topic_expression>Security/Security_SecurityPlugins_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_enable_discovery_disable_access_encrypt/*</topic_expression>
5555
<enable_discovery_protection>true</enable_discovery_protection>
5656
<enable_liveliness_protection>false</enable_liveliness_protection>
5757
<enable_read_access_control>false</enable_read_access_control>
@@ -60,7 +60,7 @@ Content-Type: text/plain
6060
<data_protection_kind>ENCRYPT</data_protection_kind>
6161
</topic_rule>
6262
<topic_rule>
63-
<topic_expression>Security/Security_BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_enable_discovery_enable_access_none/*</topic_expression>
63+
<topic_expression>Security/Security_SecurityPlugins_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_enable_discovery_enable_access_none/*</topic_expression>
6464
<enable_discovery_protection>true</enable_discovery_protection>
6565
<enable_liveliness_protection>false</enable_liveliness_protection>
6666
<enable_read_access_control>true</enable_read_access_control>
@@ -69,7 +69,7 @@ Content-Type: text/plain
6969
<data_protection_kind>NONE</data_protection_kind>
7070
</topic_rule>
7171
<topic_rule>
72-
<topic_expression>Security/Security_BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_disable_discovery_enable_access_none/*</topic_expression>
72+
<topic_expression>Security/Security_SecurityPlugins_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_disable_discovery_enable_access_none/*</topic_expression>
7373
<enable_discovery_protection>false</enable_discovery_protection>
7474
<enable_liveliness_protection>false</enable_liveliness_protection>
7575
<enable_read_access_control>true</enable_read_access_control>
@@ -78,7 +78,7 @@ Content-Type: text/plain
7878
<data_protection_kind>NONE</data_protection_kind>
7979
</topic_rule>
8080
<topic_rule>
81-
<topic_expression>Security/Security_BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_disable_discovery_disable_access_none/*</topic_expression>
81+
<topic_expression>Security/Security_SecurityPlugins_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_disable_discovery_disable_access_none/*</topic_expression>
8282
<enable_discovery_protection>false</enable_discovery_protection>
8383
<enable_liveliness_protection>false</enable_liveliness_protection>
8484
<enable_read_access_control>false</enable_read_access_control>
@@ -87,25 +87,61 @@ Content-Type: text/plain
8787
<data_protection_kind>NONE</data_protection_kind>
8888
</topic_rule>
8989
<topic_rule>
90-
<topic_expression>Security/Security_BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_enable_discovery_disable_access_none/*</topic_expression>
90+
<topic_expression>Security/Security_SecurityPlugins_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_enable_discovery_disable_access_none/*</topic_expression>
9191
<enable_discovery_protection>true</enable_discovery_protection>
9292
<enable_liveliness_protection>false</enable_liveliness_protection>
9393
<enable_read_access_control>false</enable_read_access_control>
9494
<enable_write_access_control>false</enable_write_access_control>
9595
<metadata_protection_kind>NONE</metadata_protection_kind>
9696
<data_protection_kind>NONE</data_protection_kind>
9797
</topic_rule>
98+
<topic_rule>
99+
<topic_expression>Security/Security_SecurityPlugins_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_enable_discovery_enable_access_sign/*</topic_expression>
100+
<enable_discovery_protection>true</enable_discovery_protection>
101+
<enable_liveliness_protection>false</enable_liveliness_protection>
102+
<enable_read_access_control>true</enable_read_access_control>
103+
<enable_write_access_control>true</enable_write_access_control>
104+
<metadata_protection_kind>SIGN</metadata_protection_kind>
105+
<data_protection_kind>SIGN</data_protection_kind>
106+
</topic_rule>
107+
<topic_rule>
108+
<topic_expression>Security/Security_SecurityPlugins_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_disable_discovery_enable_access_sign/*</topic_expression>
109+
<enable_discovery_protection>false</enable_discovery_protection>
110+
<enable_liveliness_protection>false</enable_liveliness_protection>
111+
<enable_read_access_control>true</enable_read_access_control>
112+
<enable_write_access_control>true</enable_write_access_control>
113+
<metadata_protection_kind>SIGN</metadata_protection_kind>
114+
<data_protection_kind>SIGN</data_protection_kind>
115+
</topic_rule>
116+
<topic_rule>
117+
<topic_expression>Security/Security_SecurityPlugins_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_disable_discovery_disable_access_sign/*</topic_expression>
118+
<enable_discovery_protection>false</enable_discovery_protection>
119+
<enable_liveliness_protection>false</enable_liveliness_protection>
120+
<enable_read_access_control>false</enable_read_access_control>
121+
<enable_write_access_control>false</enable_write_access_control>
122+
<metadata_protection_kind>SIGN</metadata_protection_kind>
123+
<data_protection_kind>SIGN</data_protection_kind>
124+
</topic_rule>
125+
<topic_rule>
126+
<topic_expression>Security/Security_SecurityPlugins_PermissionsDisableDiscoveryDisableAccessEncrypt_validation_ok_enable_discovery_disable_access_sign/*</topic_expression>
127+
<enable_discovery_protection>true</enable_discovery_protection>
128+
<enable_liveliness_protection>false</enable_liveliness_protection>
129+
<enable_read_access_control>false</enable_read_access_control>
130+
<enable_write_access_control>false</enable_write_access_control>
131+
<metadata_protection_kind>SIGN</metadata_protection_kind>
132+
<data_protection_kind>SIGN</data_protection_kind>
133+
</topic_rule>
98134
</topic_access_rules>
99135
</domain_rule>
100136
</domain_access_rules>
101137
</dds>
102138

103-
------AC038611B7DF85015D509E9E834F75CC
139+
------CC2712ED51E7E5454DED621720BB3CB3
104140
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
105141
Content-Transfer-Encoding: base64
106142
Content-Disposition: attachment; filename="smime.p7s"
107143

108-
MIIEegYJKoZIhvcNAQcCoIIEazCCBGcCAQExDzANBglghkgBZQMEAgEFADALBgkq
144+
MIIEeAYJKoZIhvcNAQcCoIIEaTCCBGUCAQExDzANBglghkgBZQMEAgEFADALBgkq
109145
hkiG9w0BBwGgggJAMIICPDCCAeOgAwIBAgIJALZwpgo2sxthMAoGCCqGSM49BAMC
110146
MIGaMQswCQYDVQQGEwJFUzELMAkGA1UECAwCTUExFDASBgNVBAcMC1RyZXMgQ2Fu
111147
dG9zMREwDwYDVQQKDAhlUHJvc2ltYTERMA8GA1UECwwIZVByb3NpbWExHjAcBgNV
@@ -118,17 +154,17 @@ cm9zaW1hLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABGLlhB3WQ8l1fpUE
118154
3DfOoulA/de38Zfj7hmpKtOnxiH2q6RJbwhxvJeA7R7mkmAKaJKmzx695BjyiXVS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fbLbnf6aKX/Ky1bkY/Q==
166+
hvcNAwICASgwCgYIKoZIzj0EAwIERjBEAiASrmoIu/S+AtTr+YOHZrrqL5hvSvLr
167+
WxEB67BX//UJdAIgHnFoWlRY0f5RDE8myNqVPEb+X/m7jrJB7HTvOICeyJc=
132168

133-
------AC038611B7DF85015D509E9E834F75CC--
169+
------CC2712ED51E7E5454DED621720BB3CB3--
134170

0 commit comments

Comments
 (0)