Commit Graph

426 Commits (d122d26d7da5a4aa0b43e1b1ae5f222205f76eee)

Author SHA1 Message Date
tianmc1 176f1cae02 [AUTO][RELEASE]: Bump file header version to "202107.00" 4 years ago
tianmc1 40c9e37d10
Updated submodule libraries to latest release (#667)
* Updated submodule libraries to latest release

* Updated pointer for FreeRTOS-Plus-TCP

* Updated README about SNTP

* Updated link for coreSNTP on freertos.org

* Updated corePKCS11 to 'update-pkcs11submodule' branch for testing

* Update corePKCS11 version in manifest.yml

* Updated corePKCS11 pointer to v3.1.0

Co-authored-by: Oscar Michael Abrina <abrinao@amazon.com>
Co-authored-by: Archit Aggarwal <architag@amazon.com>
4 years ago
lienng_aws 01614ca997
Replace library links with the application-protocols one (#665)
* Replace library links with the application-protocols one

The ReadMe.txt refers to library link on FreeRTOS.org which will not be available until after the library is released in github. Instead, use top level page https://www.freertos.org/application-protocols.html which lists all the libraries in this directory which is also easy for user to navigate and could avoid this issue when releasing new library.

* Update FreeRTOS-Plus/Source/Application-Protocols/readme.txt

Co-authored-by: Archit Aggarwal <architag@amazon.com>

* Update FreeRTOS-Plus/Source/Application-Protocols/readme.txt

Co-authored-by: Paul Bartell <pbartell@amazon.com>

Co-authored-by: Archit Aggarwal <architag@amazon.com>
Co-authored-by: Paul Bartell <pbartell@amazon.com>
4 years ago
Archit Aggarwal 69b9155bad
Hygiene changes of old Demo folders and temporary removal of submodules (#666)
* Remove submodules of community and partner contribution repos, and stale directory of FreeRTOS+UDP

* Obselete NTP demo and rename of HTTP server demo folder

* Update manifest.yml
4 years ago
Shivangi b5ab5087db
[P3] SubModules pointer update of was libraries to latest commits (#663)
* Updating device shadow to latest commit

* updating jobs pointer

* Updating device-defender pointer
4 years ago
Oscar Michael Abrina dd80d615b5
Remove duplicate error.c in WIN32.vcxproj.filters files (#662) 4 years ago
Archit Aggarwal 1e4f79709c
Some changes for upcoming release (#657)
Update mbedTLS submodule to v2.26.0 and update History.txt
4 years ago
Shivangi 6c17a54685
CorePKCS11 Muthual Auth demo fix (#656) 4 years ago
tianmc1 aa1eed8b4e
Defender demo cleanup (#651) 4 years ago
Oscar Michael Abrina 63d38b846e
Remove redundant mbedtls error sources (#654)
Since `mbedtls_error.c` is already part of the mbedTLS submodule, the duplicate files are removed from this repository.

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
Archit Aggarwal a44df5c1b9
Fix clock drift issue in SNTP demo (#655)
Issue
The existing clock discipline algorithm in the coreSNTP demo yields an inaccurate wall-clock time (in UTC) that is always behind the astronomical UTC time by the chosen polling interval period of the demo. The issue with the clock discipline algorithm was that it was calculating the slew rate to make the system clock be gradually compensated for the previous time synchronization clock drift over the period of the subsequent polling time interval. Thereby, the clock slew rate correction calculated is always lower than it should be (because it does not incorporate possible clock drift that would occur over another period of time polling interval till the next time synchronization attempt).

Fix
This PR fixes the clock discipline algorithm to make the demo calculate its system time that matches the astronomical UTC time.
The fix involves simplifying the clock discipline algorithm to use a combination of step and slew correction approaches where:

1. Step correction is applied on EVERY time successful synchronization with a time server. This immediately corrects the system time to match server time.
2. Slew rate is calculated ONCE (on the second successful time synchronization with server) and applied henceforth, on every time polling interval period to compensate gradually for the system clock drift during the period.
4 years ago
Shivangi a9c27ccdac
[P3] Update corePKCS11 demo to read the public key (#652)
* PKCS11 fix
4 years ago
Archit Aggarwal b550e6090d
Add note in coreSNTP demo about Network Time Security (NTS) (#648)
This PR makes the following changes in the coreSNTP demo:

To suggest the most secure way of using SNTP communication, we are adding a documentation note about the Network Time Security in the SNTP demo.
Hygiene update of using the FreeRTOS/backoffAlgorithm utility library for calculating time polling period interval backoff when time requests are rejected by a time server.
4 years ago
tianmc1 096824515f
Cleaned up report_builder in defender_demo_json (#644) 4 years ago
Archit Aggarwal 5a4fe788d7
Update coreSNTP demo to avoid issues from open UDP socket (#647)
Issue
There is a possible vulnerability of Denial of Service attack by keeping the UDP socket for the SNTP client task always open in the coreSNTP demo. The Denial of Service attack can occur from receiving multiple server response (duplicated or malicious) for a single SNTP time request sent by the client, and thereby, filing the socket network buffer response packets that affect future time requests.

Solution
This PR fixes this vulnerability by updating the demo to keep a UDP socket open only for the time period of waiting for server response, closing the socket on either receiving a server response or experiencing server timeout, and re-creating a UDP socket for the next polling try. This PR also adds another security functionality using a random port for UDP socket to protect against spoofing attacks from "off-network path" attackers.
4 years ago
Shivangi 3fd635b39e
[P3] Submodule pointer update to LTS Libraries (#640)
* moved submodule to backoff v1.0.1

* move corehttp module to latest commit

* move coremqtt module to latest commit

* move coremqtt Agent module to latest commit

* move coreSNTP Agent module to latest commit

* move coreJSON Agent module to latest commit

* move corePKCS11 Agent module to latest commit

* Reverting coreHttp to previous commit

* Updating coreHttp pointer after fix
4 years ago
tianmc1 6ef5c92233
Updated device-shadow submodule to support named shadow, and updated demo to use named shadow (#636) 4 years ago
thomas-coding b8bcbf2a40
Fix data copy address error (#634) 4 years ago
Archit Aggarwal ac5bf3b934
Update coreSNTP submodule and coreSNTP demo (#631)
Update the coreSNTP submodule to the latest commit. Also, make updates to the coreSNTP demo for the new changes in the SNTP library which include the following:

1. Update to the type for packet size from size_t to uint16_t for parameters in the transport and authentication interfaces.
2. Change in the call to Sntp_SendTimeRequest API to pass the new blockTimeMs parameter added to the API.
3. Update to the clock-offfset type from int32_t to int64_t for representing information in milliseconds. To accommodate this update in the SntpSetTime_t interface, the mathematical model for representing system clock has been updated to store slew rate as milliseconds/second (instead of second/second). This change improves the accuracy of the WinSim demo time correction (because the milliseconds of time difference between server and client time is corrected over the entire polling interval which makes a significant difference!).

This PR also adds demo config macros for setting the block time values passed to the Sntp_SendTimeRequest and Sntp_ReceiveTimeResponse APIs.
4 years ago
Archit Aggarwal 5a41846f05
Add authentication support to coreSNTP demo (#625)
Update the coreSNTP demo to showcase use of symmetric key algorithm of authentication scheme for securing SNTP communication between client and server.
The demo uses the AES-128-CMAC algorithm for the generating Message Authentication Code for the client on sending the SNTP time request to server as well as validating the server response received by verifying if the payload present authentication code can be generated. Use of an authentication mechanism in SNTP communication protects against server spoofing attacks as well as man-in-the-middle attacks of server response modification.

The demo uses corePKCS11 library for the AES-CMAC operations. Also, the demo adds functionality of generating random number, using corePKCS11, for sending as a parameter to the Sntp_SendTimeRequest API.

Note: For symmetric key based security mechanism to be protective against malicious, it is IMPORTANT to securely pre-share the symmetric key between client and server.
4 years ago
Archit Aggarwal f771faef4a
Add unauthenticated mode demo for coreSNTP library for time synchronization (#621)
Add the FreeRTOS/coreSNTP library as a submodule (along with manifest.yaml file update) and add a demo project to showcase use of the coreSNTP library for having a SNTP client daemon in the system for periodically synchronizing system time with the internet to maintain Coordinated Univeral Time (UTC) in a device. This demo maintains UTC time of system in RAM, thereby, representing systems without a Real-Time Clock (RTC) module in the device.

Note: This demo shows use of coreSNTP library for SNTP communication with NTP/SNTP time servers in non-authenticated mode (i.e. without any security mechanism payload beyond the standard 48 bytes of NTP packet exchange between client-server).
4 years ago
jasonpcarroll 803016a27a
Updated demo_config.h and include paths for OTA demos (#605)
Co-authored-by: Jason Carroll <czjaso@amazon.com>
4 years ago
Archit Gupta c134a58115
Fix missed variable rename (#600) 4 years ago
Hein Tibosch db1f4542e5
Let vAssertCalled() produce some logging to stdout (#598) 4 years ago
Aniruddha Kanhere 1bc759d413
Aws only files spell check (#593)
* Added spell check

* All words

* Add a missing word

* Fix header checks

* Fix header checks v1

* Fix header check v2

* Updated freertos link in header

* Fixed afr link in the header

* Fix last of header checks

* Update the spell check script to check amazon licensed files only

* Fixed paths and added comments

* Try with modified repo

* Add inplace substitute option to sed

* Use official repo as the spell checker source

* Add vendor file to the ignored list

Co-authored-by: root <root@ip-172-31-5-28.us-west-2.compute.internal>
4 years ago
Archit Aggarwal 971a6e1d22
Merge FreeRTOS 202104.00 to main (#585) 4 years ago
Prasad Vyawahare 04f0f68f61
OTA Demos (#573)
This change adds the OTA demos and required dependencies and helper components .
* Add demos , configs and project files
* Add subscription manager
* Add HTTP utils
* Submodules the OTA LTS 3.0 Library.
* Add OTA pal
4 years ago
Archit Aggarwal 43bd42db27
Rename MQTT Agent structs and files (#576) 4 years ago
alfred gedeon 1fe418dc9f
Remove unecessary file (#495) 4 years ago
Archit Aggarwal fd9c1eb7a5
Automate doxygen ZIP creation with GitHub Action (#568)
Automate creation of doxygen ZIP output by using the custom doxygen GitHub Action, that has been updated to generate ZIP artifact in PR
4 years ago
TakayukiMatsuo 1e2f99a11b
Add feature to set credentials using buffer in MQTT_Mutual_Auth_wolfSSL demo (#522)
* Add feature to set credentials using buffer
* Change instructions for giving credential data via buffer
4 years ago
Archit Aggarwal 5ac8279c1b
Change Shadow submodule to point to LTS release tag (#567) 4 years ago
Muneeb Ahmed ef6194a7ce
Replace multithreading demo with MQTT Agent (#563)
* Update MQTT agent submodule

* Copy MQTT agent demo files

* Remove other demos from connection manager

* Update demo config and uncrustify

* Update readme files

* Fix headers
4 years ago
Archit Aggarwal 999e81e721
Bump submodules of Kernel and AWS libraries (#564) 4 years ago
Muneeb Ahmed 1f47a22b23
Add MQTT Agent submodule (#551)
* Add MQTT Agent submodule

* Add MQTT agent platform files

Co-authored-by: abhidixi11 <44424462+abhidixi11@users.noreply.github.com>
Co-authored-by: Joseph Julicher <jjulicher@mac.com>
4 years ago
Archit Gupta c8fa483b68
Add custom metrics to defender demo (#507)
Adds custom metrics to the defender demo. The metrics added are a list of the task ids and the stack high water mark.
4 years ago
Carl Lundin 5ff9863249
Update corePKCS11 submodule. (#505)
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
4 years ago
Archit Aggarwal 693212bd05
Update Jobs demo to use DescribeJobExecution instead of StartNextPendingJobExecution API (#496)
It is recommended by the AWS IoT Jobs service to use DescribeJobExecution API for scaling purposes instead of StartNextPendingJobExecution API. Thus, update the Jobs demo to replace the latter API call with the former API call.
4 years ago
Carl Lundin a78cb45d12
Minor changes to wolfSSL MQTT demo files (#493)
* Clean up demo config for wolfSSL mutual auth. 
* Add comment about picking the correct ROOT CA.
* uncrustify using_wolfSSL.c and some other code style changes.
* Apply suggestions from code review

Co-authored-by: Archit Aggarwal <architag@amazon.com>
4 years ago
TakayukiMatsuo dfdf2ddf1f
Add MQTT_Mutual_Auth_wolfSSL demo (#464)
Add a demo that shows MQTT over TLS mutual authentication connection and communication with a broken when using wolfSSL as the TLS library.
4 years ago
Marc-Antoine Lalonde 52c9756f21
Call taskYIELD after calling FreeRTOS_send in Plaintext_FreeRTOS_send (#491)
FreeRTOS_send adds the packet to be sent to the IP task's queue for
later processing. The packet is sent later by the IP task. When
FreeRTOS is used in collaborative mode (i.e. configUSE_PREEMPTION is 0),
the Plaintext_FreeRTOS_send function returns without actually sending
the packet as the IP task never gets a chance to run.

The fact that Plaintext_FreeRTOS_send returns without actually sending
the packet causes an issue in the MQTT_Connect which expects the CONNECT
packet to be actually sent and waits for CONNACK.

This commit adds a taskYIELD call after calling FreeRTOS_send to ensure
that the IP task gets a chance to run and send the packet before the
Plaintext_FreeRTOS_send function returns.
4 years ago
alfred gedeon 3a7da90c4f
Qemu Mps2 network interrupt (#487)
* Enable netwrork nterrupt handling for Qemu MPS2

* Fix interrupt priority

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
alfred gedeon 1c99d9f200
Prevent optimization in reset handler for QEMU MPS2 (#484) 4 years ago
Joseph Julicher da9b9a800d [AUTO][RELEASE]: Bump file header version to "202012.00" 4 years ago
Joseph Julicher 45ba920ad0 [AUTO][RELEASE]: Bump submodules per manifest.yml for V202012.00 4 years ago
Joseph Julicher 2e2ba99a74 [AUTO][RELEASE]: Bump file header version to "202012.00" 4 years ago
Cobus van Eeden 89c6fc6baf
Update FreeRTOS-Plus-TCP (#479) 4 years ago
Carl Lundin 4ec66eb364 Move mbedtls tag to v2.25.0 4 years ago
Carl Lundin db18ff7d59 Fix pkcs11 demo build. 4 years ago
Sukhmani Minhas f4591cec06
Stack fix (#475) 4 years ago