Commit graph

825 commits

Author SHA1 Message Date
Erik Boasson
ea91e17a62 Rename nn_keyhash to ddsi_keyhash
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-03-05 16:25:36 +01:00
Dennis Potman
0a9d391c64 Fixed logging in find_own_ip
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-05 15:25:16 +01:00
Marcel Jordense
8ca1780538 Correct problem with cleanup of security handshake
Signed-off-by: Marcel Jordense <marcel.jordense@adlinktech.com>
2020-03-05 15:25:16 +01:00
Dennis Potman
b8537c0d09 Add test in secure_communication suite to validate that payload/submsg/rtps-msg does not contain secret when using encryption protection kind
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-05 15:25:16 +01:00
Dennis Potman
9cc128c295 Remove setting the tracing verbosity in tests and make configs in security core tests more consistent
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-05 15:25:16 +01:00
Dennis Potman
e7f5ae354c Fix security handshake test
Isolate domains by using unique tags when running tests that are using security handshake.
And updated coding style and some minor refactoring in fsm and timed_cb tests.

Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-05 15:25:16 +01:00
Dennis Potman
ea10dbd8e1 Fixes in security core tests: add check that all provided vars are used in variable expansion for test configs, add note on concurrency in authentication wrapper, replace assert by cunit assert in crypto wrapper
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-05 15:25:16 +01:00
Dennis Potman
8f464e0c99 Fix writer-reader sync in secure_communication tests
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-05 15:25:16 +01:00
Dennis Potman
28aa06915e Fixed bug in handshake happy-day test
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-05 15:25:16 +01:00
Dennis Potman
6c9e50cf3a Fix for empty trusted CA dir
Trusted CA dir in security configuration is optional, but participant
creation currently fails if no or empty dir is provided. This commit
fixes this issue and adds some tests for various trusted_ca_dir values.

Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-05 15:25:16 +01:00
Dennis Potman
1cf472ea06 Refactored tests for security core: introduced generic wrappers for security plugins and
updated plugin loading tests to use these instead of specific wrappers per test. Added
test for securing communication ad handshake fail (using different identity CAs)

Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-05 15:25:16 +01:00
Dennis Potman
323de40cba Moved add_definitions in cmake files to /src/ so that all components and tests use the same definitions when compiling sources
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-05 15:25:16 +01:00
Dennis Potman
b3c5a8d4fc Refactored expand_vars so that a custom lookup function can be used, which makes it usable for replacing tags by values other than environment variables
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-05 15:25:16 +01:00
eboasson
24e42fd658 Fix a few typos in security documentation
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-03-03 16:51:16 +01:00
Dennis Potman
7049469289 Update security documentation
An update for the security documentation that is part of the CycloneDDS
manual:
- added openssl commands for creating a set of CA and identity certificates
- code fragment for setting security by qos and example of xml security config
- commands for signing governance and permissions documents using openssl

Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-03 16:51:16 +01:00
Erik Boasson
a0b4245600 Fix FSM timeout test race
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-03-03 13:32:38 +01:00
Marcel Jordense
1dad535bc0 Correct misplaced lock
Signed-off-by: Marcel Jordense <marcel.jordense@adlinktech.com>
2020-03-03 13:32:38 +01:00
Marcel Jordense
4960fbf94c Add security authentication handshake and encoding and decoding
Signed-off-by: Marcel Jordense <marcel.jordense@adlinktech.com>
2020-03-03 13:32:38 +01:00
Erik Boasson
1c77aad39c Fix Clang static analyzer warnings
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-24 15:59:00 +01:00
Erik Boasson
0d5a8bf461 Remove built-in crypto plugin unused variables
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-24 15:59:00 +01:00
Erik Boasson
e0a9beb3cb Fix condition for validating topic access rules
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-24 15:59:00 +01:00
eboasson
b03195ec72
Merge pull request #395 from eboasson/security
Merge "master" into "security"
2020-02-13 13:36:55 +01:00
Erik Boasson
54fad0d601 Merge remote-tracking branch 'upstream/master' into security 2020-02-13 13:13:54 +01:00
Erik Boasson
4ed0128578 Rework security code in proxy participant creation
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-13 13:12:25 +01:00
Erik Boasson
62a6004e8a Remove "CM" topic related flags reintroduced by merge
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-13 12:00:13 +01:00
Erik Boasson
9b43303d82 Remove unused "kernel sequence numbers" notion
The flag originates in OpenSplice but is meaningless in Cyclone.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-13 12:00:07 +01:00
Thijs Sassen
2cd8909beb Fixed build error on FreeRTOS
Signed-off-by: Thijs Sassen <thijs.sassen@adlinktech.com>
2020-02-13 10:59:33 +01:00
Jeroen Koekkoek
bf3d1bc270 Fix getifaddrs for non-English interface names on Windows
ddsrt_asprintf did not copy non-English interface names. To fix this memory is
allocated with ddsrt_malloc and UTF-16 encoded interface names are converted to
UTF-8.

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2020-02-13 08:43:59 +01:00
Erik Boasson
0d3ca448ff Liveliness monitoring fixes for security FSM
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-12 20:15:49 +01:00
Erik Boasson
ad58db0721 Merge branch 'master' into security
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-12 17:30:38 +01:00
Erik Boasson
80ed351efd Add declaration prototype line for ddsrt_atomic_ function to fix armhf build warning
Thanks to @emersonknapp

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-12 17:20:04 +01:00
Erik Boasson
8d6b308199 Add more checks to ddsperf and run on Travis
This adds options to check for "unreasonable" RSS growth, receipt of a
minimum number of samples and having run a minimum number of roundtrips.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-12 17:19:48 +01:00
Erik Boasson
701c6f5a5c Retain less data in keep-last WHC in absence of ACKs
A keep-last volatile WHC retained data already overwritten by the writer
in the absence of ACKs, introduced by 231cb8c9.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-12 17:19:48 +01:00
Erik Boasson
6ed190ce2a Fix leak in converting hostname to IP address
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-12 17:19:48 +01:00
Erik Boasson
01f9c0599c Set transport in locator of TCP server sockets
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-12 17:19:48 +01:00
Erik Boasson
b84eee5abb Fix detecting remote ping/pong writers in ddsperf
The status mask on some readers got reduced to just "data available"
when used in conjunction with a waitset, but the consequence is that the
"subscription matched" listener would be suppressed.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-11 23:26:01 +01:00
Erik Boasson
ab7c95e02f Clean up sertopic_default definition
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-11 23:26:01 +01:00
Erik Boasson
ad19f571ae Rename nn_plist, xqos to ddsi_plist, xqos
This already was leaking out in the interface, so this name change was
needed too.  The relationship between plist and xqos being so intimate,
doing the one but not the other made no sense.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-11 23:26:01 +01:00
Erik Boasson
551dae69a4 Rename q_globals to ddsi_domaingv
The name (not its definition) now leaks out in ddsi_sertopic, and the
messy old names really shouldn't pollute the interface any more than
necessary.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-11 23:26:01 +01:00
Erik Boasson
d92d491b83 Update local delivery code for multiple sertopics
This also removes the code duplication for the handling delivery from
local vs remote writers.  (And it adds a test.)

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-11 23:26:01 +01:00
Erik Boasson
27d7c72626 Relax constraints on topic entities
This commit changes the implementation of topics so that multiple topic
entities can exist in a single participant for the same topic.
Different entities may refer to different topic implementations
(sertopics, akin to a type support in the DDS specification).  All
entities (for the same participant) always have the same QoS, via the
new "ktopic" table in the participant.

Readers and writers are bound to a topic entity and inherit its
properties.  If a topic comes in two definitions, say one for C and one
for C++, one can have a single participant with a reader delivering the
data in C representation and another reader delivering it in C++
representation.

This changes the behaviour of create_topic and find_topic: these now (on
successful return) always return a new entity (and thus with a unique
handle), where previously these would simply return a existing one when
possible.

This also requires some small additions to the sertopic/serdata
interface.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-11 23:26:01 +01:00
Erik Boasson
08c9db0934 Rework plist/qos printing, diffing and logging
* Use the parameter tables to pretty-print QoS and plist, rather than a
  hard-coded function supporting only the QoS.

* Support diffing two plists: a single table-driven function can handle
  both nn_plist_t and ddsi_qos_t, and it removes the discrepancy between
  the two types.

* Log content of discovery samples in trace rather than merely printing
  "(plist)"

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-11 23:26:01 +01:00
Erik Boasson
6bd28fb4b1 Add plist diff and partial fini functions
To bring them in line with the QoS support.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-11 23:26:01 +01:00
Michel
2d252ad1f6 Description corrections.
Signed-off-by: Michel <michel.vandenhoek@adlinktech.com>
2020-02-10 14:41:31 +01:00
MarcelJordense
d24bf4d27d
Update authentication plugin with respect to the remote identity handle (#379)
* Authentication plugin determine remote identity handle on participant match

Signed-off-by: Marcel Jordense <marcel.jordense@adlinktech.com>

* Correct authentication plugin

Signed-off-by: Marcel Jordense <marcel.jordense@adlinktech.com>
2020-02-10 13:24:51 +01:00
Stefan Kimmer
aef4f0a126 Certificate trigger and directory operations
Implement trigger of certificate and permission expiries using the timed callbacks.

Implement directory operations such that trusted CA can be read.
This implements OS abstraction functions such as opendir and stat.

Signed-off-by: Stefan Kimmer <skimmer@s2e-systems.com>
2020-02-10 11:07:13 +01:00
Jeroen Koekkoek
3de040d21a Add support for musl libc
Based on patch by mauropasse (issue #383).

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2020-02-06 18:30:24 +01:00
Dennis Potman
59d4d1eb57 Processed review comments: fixed Bincrafters repo name in readme and changed suggested local name for repo
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-02-06 13:18:14 +01:00
Dennis Potman
e4069d79ca Update readme file with info on adding Bintray repository to conan remotes list
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-02-06 13:18:14 +01:00
Dennis Potman
150f20d10c Bugfix in liveliness tests
Some of the liveliness qos tests were not using unique topic names
for the tests for local and remote readers. Re-using the participant
for these 2 tests results in unexpected reader-proxywriter matches
in the latter test. Fixed by adding a sequence number in the topic name.

Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-02-04 15:54:56 +01:00