-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add AWS keywords and create test for connecting thinedge to AWS using keys for authentication #3066
Conversation
… keys Signed-off-by: gligorisaev <gligorisaev@gmail.com>
{ | ||
"Effect": "Allow", | ||
"Action": "iot:Connect", | ||
"Resource": "arn:aws:iot:us-east-1:227890699892:client/${iot:Connection.Thing.ThingName}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The region and client id should not be hardcoded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I work now on a solution not to have a file at all, I want to avoid the need of maintaining a file
#Check addapter and run only if adapter is ssh | ||
Run Command If SSH Adapter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why such a restriction?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the differences of the "Setup" keyword wtih different adapter used is that in case of adapter=Docker (adapter: None is default, which is Docker) Setup is bootstrapping and making a fresh instalation, creating certificate etc. In case of adapter=ssh it is not
…full connection Signed-off-by: gligorisaev <gligorisaev@gmail.com>
Robot Results
Failed Tests
|
Signed-off-by: gligorisaev <gligorisaev@gmail.com>
… for c8y Signed-off-by: gligorisaev <gligorisaev@gmail.com>
@gligorisaev Since this is AWS specific functionality it might make more sense creating a dedicated |
This is superseded by #3097 |
New keywords are added to the ThinEdgeIO Robot Framework Library
Create Session With Keys
- Creates an AWS session using the provided access key, secret key, and optional region.Create New Policy
- Creates a new IoT policy with the provided name and reads the policy document from a file.Register Device
- Registers a new IoT Thing with the provided device ID.Check Policy Exists
- Checks if the specified IoT policy exists.Check Device Exists
- Checks if the specified IoT device (thing) exists.Configure Device
- Configures the device by creating keys and certificates, attaching the policy to the certificate,Teardown AWS Resources
- Deletes the created IoT policy and the registered device (thing) in AWS IoT Core.Test Case created: tests/RobotFramework/tests/aws/aws_coonect_with_keys.robot
Description:
This test case validates the ability of thin-edge.io to successfully connect to AWS IoT Core. The test ensures that the necessary AWS credentials are available in the .env file and that the AWS IoT Core environment is correctly configured.
Preconditions:
AWS credentials:
AWS_URL
AWS_ACCESS_KEY
AWS_SECRET_KEY
AWS_REGION
must be provided in the .env file.
The test also support SSH adapter to be used.
Test Steps:
Suite Setup:
Custom setup is executed, which includes setting up the device serial number and configuring the AWS IoT Core URL.
Teardown:
Custom teardown is performed, which includes removing the created resources from AWS IoT Core, deleting the certificate files from the device, and retrieving logs.
Tags:
theme:aws
test:on_demand
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments