Skip to content

Aerobridge Guardian (trusted flight module) : JWT verification for flights / vehicle arming#1

Open
nCk9 wants to merge 1 commit intoopenutm-labs:masterfrom
nCk9:permArt-verification
Open

Aerobridge Guardian (trusted flight module) : JWT verification for flights / vehicle arming#1
nCk9 wants to merge 1 commit intoopenutm-labs:masterfrom
nCk9:permArt-verification

Conversation

@nCk9
Copy link

@nCk9 nCk9 commented Jan 21, 2022

This is an initial PR for verifying the JWT signature received at the firmware from the ground control station (GCS). Post successful verification, drone arming can be performed.

Work done:

  • Added jwt-cpp as a submodule to leverage the APIs provided by the library for verification.
  • Worked on proper integration: changes to the environment variables for a proper build.
  • Added a sample script in AP_Arming.cpp for verification using the library's APIs.

Future Work:

  • The permission artifact would be present on the drone SD card. We need to find a workaround for successfully fetching that file.
  • Parsing the file, obtaining the signature, verification, and arming decision.

Let me know if you have any suggestions.
Thanks.

Copy link

@botmayank botmayank left a comment

Choose a reason for hiding this comment

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

Added first impression comments

pre_arm_display_counter = 0;
}
//a sample verification token
std::string rsa_pub_key = R"(-----BEGIN PUBLIC KEY-----

Choose a reason for hiding this comment

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

Should not have even test tokens in committed changes. Should move this out to an env file how Kapil did for QGC

auto decoded = jwt::decode(token);

verify.verify(decoded);

Choose a reason for hiding this comment

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

Does verify failure block arming? Doesn't look like it. This just seems like a call to verify and an unused retval.

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.

2 participants