Commit graph

456 commits

Author SHA1 Message Date
johnrhen
4e450d39d4
Update Fleet Provisioning Demo comments (#762) 2022-01-03 12:12:21 -08:00
johnrhen
43defa566c
Apply release changes to main branch (#759)
* Update History.txt and README.md for December release (#744)

* Update History.txt and README.md for release

* Bump mbedtls submodule to v2.28.0 (#745)

* Patch project files for mbedtls (#751)

* Apply group 1 patches

* Apply patches for group 2

* Update project files for mbedTLS new version

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Fix warnings in projects

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Fix warnings in HTTP_S3_Download demo

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>

* Update changelog and history for corePKCS11 update (#752)

* Update submodule pointer and manifest.yml for corePKCS11 (#754)

* Update readme and history.txt to show that Sigv4 is a newly added library (#756)

* Revert update to v143 of VS toolset (#757)

* [AUTO][RELEASE]: Bump file header version to "202112.00"

* Update file headers to satisfy core checks

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: johnrhen <johnrhen@users.noreply.github.com>
2021-12-23 10:16:27 -08:00
Bhaumik Jain
b44f5932fe
update submodule pointer in P3 (#737) 2021-12-16 10:44:25 -08:00
chinglee-iot
8f5740a67c
Update the submodule pointer of FreeRTOS-Cellular-Interface (#739)
* Update manifest and submodule pointer of FreeRTOS-Cellular-Interface
2021-12-16 10:43:24 -08:00
Oscar Michael Abrina
3da495ccf8
Update sigv4 submodule pointer to latest release tag (#735)
* Update sigv4 submodule pointer to latest release tag

* Update manifest.yml sigv4 entry to v1.1.0
2021-12-15 17:55:52 -08:00
johnrhen
eefc603422
Update fleet provisioning submodule and pointer to release tag (#736) 2021-12-15 16:39:52 -08:00
johnrhen
92c5f8fe50
Add default Claim template to fleet provisioning example (#734) 2021-12-14 15:29:10 -08:00
Aniruddha Kanhere
65fd843787
Update the submodule pointer of FreeRTOS+TCP (#733)
* Update manifest and submodule pointer of TCP

* Update TCP submodule pointer and manifest
2021-12-14 15:22:13 -08:00
johnrhen
56394747d4
Add default thing policy name to Fleet Provisioning example template (#732)
* Add default thing policy name to the example template

* Rename default Thing policy
2021-12-14 13:11:03 -08:00
johnrhen
a727061dc2
Create example IoT Thing policy (#731)
* Create example claim policy and update formatting on previous examples

* Add trailing linebreak
2021-12-14 11:31:41 -08:00
Bhaumik Jain
4610b37ade
Update server root CA certificate (#730)
* update server root CA certificate for http demo

* update comments
2021-12-13 10:37:24 -08:00
johnrhen
c1266ddb60
Port the AWS Fleet Provisioning demo from the CSDK (#724)
* Add fleet provisioning and tinycbor submodules

* Copy demo files from FP in CSDK and the Defender Demo

* Modify FP demo files to function in FreeRTOS

* Update styling and formatting of demo files to match FreeRTOS conventions

Co-authored-by: Archit Gupta <71798289+archigup@users.noreply.github.com>
2021-12-08 13:17:00 -08:00
johnrhen
b1b3a0a3e9
Add variable PKCS11 label support to using_mbedtls_pkcs11 (#723)
The previous "using_mbedtls_pkcs11.c" implementation requires using the device key and device certificate stored under the labels "pkcs11configLABEL_DEVICE_PRIVATE_KEY_FOR_TLS" and "pkcs11configLABEL_DEVICE_CERTIFICATE_FOR_TLS".

This commit updates the NetworkCredentials to include fields for pClientCertLabel and pPrivateKeyLabel, so other labels can be used with PKCS11. This matches the behavior seen in the CSDK.

This commit also updates the "pkcs11_mqtt_mutual_auth_demo" to set the newly-added NetworkCredentials fields.
2021-11-26 10:49:59 -08:00
johnrhen
d2329791aa
Fix PKCS11 demo failures (#722)
* Fix build errors from improper core_pkcs11_pal paths

* Runtime failure fixes

* Runtime PKCS11 demo failure fixes

Co-authored-by: Shivangi <66447522+gshvang@users.noreply.github.com>
2021-11-24 12:50:15 -08:00
andysun2015
426ad44c05
Remove using_mbedtls folder and move its content to the parent folder (#717)
Move the contents of FreeRTOS/FreeRTOS-Plus/Source/Application-Protocols/network_transport/using_mbedtls/
to its parent folder i.e. FreeRTOS/FreeRTOS-Plus/Source/Application-Protocols/network_transport/.
This removes one unnecessary folder in the hierarchy.
2021-11-18 13:23:41 -08:00
tianmc1
a483eba7d4
Updated HTTP S3 download demo to show SigV4 usage (#696)
* Updated HTTP S3 download demo to show SigV4 usage

* Fixed missing config in demo_config

* Added dynamic sha256 payload compute

* Fixed some compiler warnings

* Fixed some comments

* remove unused code

* Spell check updates

* Core check fix
2021-11-16 14:47:02 -08:00
andysun2015
75639a3e86
Fix build warning due to log configuration. (#715) 2021-11-16 10:24:17 +08:00
aggarg
ecd1a8f9f1 [AUTO][RELEASE]: Bump file header version to "202111.00" 2021-11-13 02:37:14 +00:00
Aniruddha Kanhere
e106d3fa61
Update manifest and submodule pointer of TCP (#712) 2021-11-12 17:46:26 -08:00
Shivangi
7f268e655a
[P3 Release] Update submodule Pointers of the spoke repos in P3 (#707)
* Updating submodule except OTA

* Update Manifest file

* Update Manifest file

* Updating Ota pointer

* Manifest Update
2021-11-11 19:40:09 -08:00
andysun2015
221adba9e5
Update FreeRTOS-Cellular-Interface (#705)
* Update FreeRTOS-Cellular-Interface

* manifest file update
2021-11-12 00:50:13 +08:00
andysun2015
a6dfca9829
Update file header and cellular lib commit (#704) 2021-11-11 09:41:49 +08:00
andysun2015
957fb26dbe
Add cellular library submodule path and demo (#695)
* [Cellular] Add cellulr lib submodule and demo app

* [Cellular] Fix memory violation in transport layer and add using LoggingPrintf

* Update FreeRTOS Cellular Interface

* Change the mbedtls usage in FreeRTOS-Plus

* [Cellular] Fix missing spell

* [Cellular] Add manifest.yml

* Fix missing spell

* Update manifest.yml

* [Cellular] Add integration test

* Modify the demo log level to LOG_INFO

* Update cellular interface

* The modification of the folder structure for cellular library

* Rename the naming of demo

* Adjust the location of using_mbedtls and socket_wrapper

* Adjust project setting for relocating using_mbedtls and socket_wrapper

* Turn off PSM mode

* Add start marker for CI validation.

* The modification for mbedtls platform send/recv function for cellular

* Change the project file due to the changes of mbedtls platform send/recv function for cellular

* Fix missing newline and remove unused file

* Add missing configuration.

* Make cellular and freertos tcp plus use the same transport implementation

* Add comment for the macro MBEDTLS_SSL_SEND and MBEDTLS_SSL_RECV

* Make changes from the github comment.
2021-11-10 11:38:44 +08:00
Gaurav-Aggarwal-AWS
226c987b1a
Remove non-ASCII characters (#701)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2021-11-08 15:17:52 -08:00
Shivangi
20fc88cb8b
Update Submodule Pointer in P3 Repo (#699)
* changing submodule

* manifest file update

Co-authored-by: Paul Bartell <pbartell@amazon.com>
2021-11-03 12:48:10 -07:00
Shivangi
0407cbf166
Include path update (#698) 2021-10-28 10:31:39 -07:00
Shivangi
08238481d1
pkcs11 util changes (#694) 2021-10-26 13:59:00 -07:00
chinglee-iot
b4cc7670df
Fix possible null pointer dereference in Log (#677)
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2021-09-11 17:00:07 -07:00
Gaurav-Aggarwal-AWS
a40172758a
Update submodule pointers (#680)
* Update submodule pointers

This is needed to address doxygen failures (Which are already fixed in
the submoduled repos).

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2021-09-02 12:40:52 -07:00
JD
4744787e55
Added 'extern "C"' to FreeRTOS-CLI header file. (#674)
Co-authored-by: JD Scott <jscott@hotstart.com>
2021-08-09 15:54:03 -07:00
tianmc1
176f1cae02 [AUTO][RELEASE]: Bump file header version to "202107.00" 2021-07-24 00:32:35 +00:00
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>
2021-07-23 17:14:40 -07:00
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>
2021-07-23 12:48:59 -07:00
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
2021-07-23 12:07:34 -07:00
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
2021-07-22 15:49:04 -07:00
Oscar Michael Abrina
dd80d615b5
Remove duplicate error.c in WIN32.vcxproj.filters files (#662) 2021-07-22 11:42:29 -07:00
Archit Aggarwal
1e4f79709c
Some changes for upcoming release (#657)
Update mbedTLS submodule to v2.26.0 and update History.txt
2021-07-20 14:58:39 -07:00
Shivangi
6c17a54685
CorePKCS11 Muthual Auth demo fix (#656) 2021-07-19 17:23:17 -07:00
tianmc1
aa1eed8b4e
Defender demo cleanup (#651) 2021-07-19 16:32:53 -07:00
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>
2021-07-19 16:17:18 -07:00
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.
2021-07-19 16:05:35 -07:00
Shivangi
a9c27ccdac
[P3] Update corePKCS11 demo to read the public key (#652)
* PKCS11 fix
2021-07-16 16:30:09 -07:00
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.
2021-07-15 15:21:29 -07:00
tianmc1
096824515f
Cleaned up report_builder in defender_demo_json (#644) 2021-07-14 14:12:23 -07:00
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.
2021-07-14 13:21:40 -07:00
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
2021-07-14 12:10:35 -07:00
tianmc1
6ef5c92233
Updated device-shadow submodule to support named shadow, and updated demo to use named shadow (#636) 2021-07-07 11:15:33 -07:00
thomas-coding
b8bcbf2a40
Fix data copy address error (#634) 2021-06-29 10:18:00 -07:00
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.
2021-06-25 12:19:00 -07:00
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.
2021-06-16 10:22:06 -07:00