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

[LLT-5563] Add TLS and domain names to core-api and mqtt #866

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

olekoliinyk
Copy link
Contributor

@olekoliinyk olekoliinyk commented Oct 11, 2024

Problem

In context of esp32-meshnet nat-lab integration tests, device emulator is going to send requests to https://api.nordvpn.com. So far, nat-lab core-api was not supporting tls connection and core-api domain.

Solution

  • Add self-signed certificate with CN=*.nordvpn.com" record. Certificate is used for core-api as well as for mqtt broker.
  • Add core-api and mqtt broker DNS records
  • Refractor core-api and notification center tests to use self-signed certificate when sending API requests to core-api
  • Add core-api extra-hosts record to cone-client-01 in docker-compose.yml. This is only for core-api and notification center tests. esp32 emulator is going to use nat-lab DNS server to resolve requested domains.
  • For test_notification_center.py self-singed certificate is not used for connection to mqtt broker due to the fact that test is executed on the host and there is no mqtt.nordvpn.com DNS records. In context of this test, it might be not so relevant as the purpose of the test is to verify mqtt messages. If there is any issue with tls connection to the mqtt-broker, it will be failing then either on docker compose level or core-api tests.

☑️ Definition of Done checklist

  • Commit history is clean (requirements)
  • README.md is updated
  • Functionality is covered by unit or integration tests

@olekoliinyk olekoliinyk force-pushed the LLT-5563_add_core_api_dns_record branch 8 times, most recently from 6c49e59 to 9643480 Compare October 15, 2024 11:23
@olekoliinyk olekoliinyk changed the title [LLT-5563] Add DNS record for core API [LLT-5563] Add domain name to core-api Oct 15, 2024
@olekoliinyk olekoliinyk force-pushed the LLT-5563_add_core_api_dns_record branch from 9643480 to 1f8a21b Compare October 15, 2024 13:34
@olekoliinyk olekoliinyk force-pushed the LLT-5563_add_core_api_dns_record branch 13 times, most recently from 730efd3 to eba49fb Compare October 18, 2024 13:42
@olekoliinyk olekoliinyk marked this pull request as ready for review October 21, 2024 08:19
@olekoliinyk olekoliinyk requested a review from a team as a code owner October 21, 2024 08:19
@olekoliinyk olekoliinyk changed the title [LLT-5563] Add domain name to core-api [LLT-5563] Add TLS and domain names to core-api and mqtt Oct 21, 2024
@ThrasherLT
Copy link
Contributor

lgtm, but I'm not an expert on python and https, so +0.5

gytsto
gytsto previously approved these changes Oct 21, 2024
Copy link
Contributor

@gytsto gytsto left a comment

Choose a reason for hiding this comment

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

+1

tomaszklak
tomaszklak previously approved these changes Oct 22, 2024
Copy link
Contributor

@tomaszklak tomaszklak left a comment

Choose a reason for hiding this comment

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

+1, nice :)

@olekoliinyk olekoliinyk dismissed stale reviews from tomaszklak and gytsto via ce6b054 October 22, 2024 15:03
@olekoliinyk olekoliinyk force-pushed the LLT-5563_add_core_api_dns_record branch from eba49fb to ce6b054 Compare October 22, 2024 15:03
@olekoliinyk olekoliinyk force-pushed the LLT-5563_add_core_api_dns_record branch from ce6b054 to 92a8b35 Compare October 22, 2024 15:11
@olekoliinyk olekoliinyk merged commit 3d75734 into main Oct 23, 2024
62 checks passed
@olekoliinyk olekoliinyk deleted the LLT-5563_add_core_api_dns_record branch October 23, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants