Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[22280] New property to select preferred key agreement algorithm (backport #5413) (backport #5442) #5443

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 29, 2024

Description

DDS security specifies the possibility of selecting the key agreement algorithm used to generate the shared secret at the end of the authentication phase.

The Fast DDS documentation indicates that Elliptic Curve Diffie-Hellman (ECDH) is used, but this is only the case if a participant from other vendor starts the authentication and proposes that method.

This pull request:

  1. Changes the default key agreement algorithm to the one indicated in the documentation
  2. Adds a new dds.sec.auth.builtin.PKI-DH.preferred_key_agreement property that allows choosing the preferred algorithm to use.

@Mergifyio backport 3.1.x

We will backport to 3.1.x, but leaving the default value of the new property to the old behavior.
We will then backport from there into 3.0.x 2.14.x 2.10.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A Any new/modified methods have been properly documented using Doxygen.
  • Any new configuration API has an equivalent XML API (with the corresponding XSD extension)
  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • Changes are API compatible.
  • New feature has been added to the versions.md file (if applicable).
  • New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

This is an automatic backport of pull request #5413 done by [Mergify](https://mergify.com).
This is an automatic backport of pull request #5442 done by [Mergify](https://mergify.com).

* New property to select preferred key agreement algorithm (#5413)

* Refs #19921. Implement selection of key agreement.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #19921. Change default to ECDH.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #19921. Add unit test.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #19921. Factor out duplicated publisher code on BB test.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #19921. Factor out duplicated subscriber code on BB test.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #19921. Add new parameter to BB test.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #19921. Apply new parameter on publisher properties.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #19921. Apply new parameter on subscriber properties.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #19921. Improve emplace_back calls.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #19921. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22280. Use `DH` alias instead of `RSA`.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22280. Add new property to communication tests XML profiles.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22280. Fix unit test.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22280. Configure key agreement on BB test depending on process id.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #19921. Add `AUTO` value to new option.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #19921. Add `AUTO` value to blackbox test.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22280. Remove unused lambda capture.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22280. Fix failing blackbox tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Update versions.md

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 8a99a07)

# Conflicts:
#	versions.md

* Fix conflicts.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Change default value to `DH`.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 4d793f0)
@MiguelCompany MiguelCompany added this to the v3.0.2 milestone Nov 29, 2024
@Mario-DL Mario-DL requested review from Mario-DL and removed request for Mario-DL December 2, 2024 09:00
@github-actions github-actions bot added the ci-pending PR which CI is running label Dec 2, 2024
Copy link
Member

@Mario-DL Mario-DL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, failed test is unrelated with the changes

@Mario-DL Mario-DL added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed ci-pending PR which CI is running labels Dec 3, 2024
@MiguelCompany MiguelCompany merged commit b0ddc5e into 3.0.x Dec 3, 2024
15 of 17 checks passed
@MiguelCompany MiguelCompany deleted the mergify/bp/3.0.x/pr-5442 branch December 3, 2024 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants