Skip to content

Commit 59c6e75

Browse files
Refactor Secure Discovery Server (#6295)
* Refactor Secure Discovery Server Signed-off-by: Raül <raulojeda@eprosima.com> * Block discovery server when using security Signed-off-by: Raül <raulojeda@eprosima.com> * Uncrustify Signed-off-by: Raül <raulojeda@eprosima.com> * Add secure discovery server disabled test Signed-off-by: Raül <raulojeda@eprosima.com> * Refactor secure discovery server system tests Signed-off-by: Raül <raulojeda@eprosima.com> * Fix secure ds bypass and refactor Signed-off-by: Raül <raulojeda@eprosima.com> * Uncrustify Signed-off-by: Raül <raulojeda@eprosima.com> * Remove unnecessary CMakeLists config Signed-off-by: Raül <raulojeda@eprosima.com> * Add new python test file Signed-off-by: Raül <raulojeda@eprosima.com> * Update versions.md Signed-off-by: Raül <raulojeda@eprosima.com> * Shorter error message in PDPClient Co-authored-by: Miguel Company <miguelcompany@eprosima.com> Signed-off-by: Raül Ojeda Gandia <raulojeda@eprosima.com> * Shorter error message in PDPServer Co-authored-by: Miguel Company <miguelcompany@eprosima.com> Signed-off-by: Raül Ojeda Gandia <raulojeda@eprosima.com> * Update keywords in test according to the new error messages Signed-off-by: Raül <raulojeda@eprosima.com> --------- Signed-off-by: Raül <raulojeda@eprosima.com> Signed-off-by: Raül Ojeda Gandia <raulojeda@eprosima.com> Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
1 parent 3d2479e commit 59c6e75

31 files changed

Lines changed: 258 additions & 2640 deletions

File tree

src/cpp/rtps/builtin/discovery/participant/DS/FakeWriter.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ class FakeWriter : public Endpoint
4040
: Endpoint(participant, { participant->getGuid().guidPrefix, entity_id }, {})
4141
{
4242
m_att.endpointKind = EndpointKind_t::WRITER;
43-
#if HAVE_SECURITY
44-
participant->set_endpoint_rtps_protection_supports(this, false);
45-
#endif // HAVE_SECURITY
4643
}
4744

4845
virtual ~FakeWriter() override = default;

src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp

Lines changed: 39 additions & 262 deletions
Large diffs are not rendered by default.

src/cpp/rtps/builtin/discovery/participant/PDPClient.h

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
#include <rtps/attributes/ServerAttributes.hpp>
2525
#include <rtps/builtin/discovery/participant/DS/DiscoveryServerPDPEndpoints.hpp>
26-
#include <rtps/builtin/discovery/participant/DS/DiscoveryServerPDPEndpointsSecure.hpp>
2726
#include <rtps/builtin/discovery/participant/PDP.h>
2827
#include <rtps/builtin/discovery/participant/timedevent/DSClientEvent.h>
2928
#include <rtps/messages/RTPSMessageGroup.hpp>
@@ -137,16 +136,6 @@ class PDPClient : public PDP
137136
const GUID_t& participant_guid,
138137
ParticipantDiscoveryStatus reason) override;
139138

140-
#if HAVE_SECURITY
141-
bool pairing_remote_writer_with_local_reader_after_security(
142-
const GUID_t& local_reader,
143-
const WriterProxyData& remote_writer_data) override;
144-
145-
bool pairing_remote_reader_with_local_writer_after_security(
146-
const GUID_t& local_reader,
147-
const ReaderProxyData& remote_reader_data) override;
148-
#endif // HAVE_SECURITY
149-
150139
/*
151140
* Update the list of remote servers
152141
*/
@@ -214,19 +203,6 @@ class PDPClient : public PDP
214203
const eprosima::fastdds::rtps::GuidPrefix_t& prefix_override,
215204
bool from_this_host);
216205

217-
#if HAVE_SECURITY
218-
/**
219-
* Returns whether discovery should be secured
220-
*/
221-
bool should_protect_discovery();
222-
223-
/**
224-
* Performs creation of secured DS PDP endpoints
225-
*/
226-
bool create_secure_ds_pdp_endpoints();
227-
228-
#endif // HAVE_SECURITY
229-
230206
/**
231207
* Performs creation of standard DS PDP endpoints
232208
*/
@@ -244,16 +220,6 @@ class PDPClient : public PDP
244220
DiscoveryServerPDPEndpoints& endpoints,
245221
bool is_discovery_protected);
246222

247-
/**
248-
* Performs creation of DS best-effort PDP reader.
249-
*
250-
* @param [in,out] endpoints Container where the created resources should be kept.
251-
*
252-
* @return whether the reader was successfully created.
253-
*/
254-
bool create_ds_pdp_best_effort_reader(
255-
DiscoveryServerPDPEndpointsSecure& endpoints);
256-
257223
/**
258224
* Provides the functionality of notifyAboveRemoteEndpoints without being an override of that method.
259225
*/

0 commit comments

Comments
 (0)