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

sys/fido2: follow up continued #18663

Merged
merged 5 commits into from
Nov 28, 2024
Merged

Conversation

Ollrogge
Copy link
Member

@Ollrogge Ollrogge commented Sep 28, 2022

Contribution description

This PR adds changes to make the FIDO2 API usable without a transport layer as
well as improve the overall usability. With this come changes specific to the native
target, to account for the fact that mtd flash handling is file backed in this case.

This also includes breaking changes to the public API:

  • All public methods defined in "sys/include/fido2/ctap.h" now return a
    ctap_status_code_t instead of the size of the response.
  • The size of the FIDO2 response is now contained within the response structure
    ctap_resp_t.

Users of the FIDO2 API need to adjust their applications to now expect a status
code as the return value of functions such as fido2_ctap_handle_request and
expect the length of the response in resp->len.

To test the usability of FIDO2 without a transport layer, this PR also adds
another test module which tests the CTAP implementation without transport layer.

With the new test module being added, the old tests are renamed to
sys_fido2_ctap_hid to highlight the fact that they test the CTAP2 implementation
using CTAPHID as transport binding.

Furthermore, this PR removes the dependency of ctap_hid for ztimer64 as
having 64 bit timestamps is not required.

Testing procedure

  • tests/sys_fido2_ctap
  • tests/sys_fido2_ctap_hid

Issues/PRs references

Depends on PR #18637
Issue regarding file backed flash memory on native: #19559

@github-actions github-actions bot added Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration Area: sys Area: System Area: tests Area: tests and testing framework labels Sep 28, 2022
Copy link
Member

@chrysn chrysn left a comment

Choose a reason for hiding this comment

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

I'm splitting review into multiple stages as that's a relatively large number of files for a subsystem with few major contributors. For this round, I'm only looking at changes visible outside the module, including the removed ztimer64 use.

Minor comments inline; one larger here:

There are several incompatible changes to the public fido2 API. Please prepare, ideally in the top post of the PR, a note that can then be placed in the release notes. It should describe to users of the API what they need to change in their applications, with emphasis on changes that might go undetected by the compiler and alter the program's meaning (such as when fido2_ctap_handle_request returns a status code rather than a length, which the compiler may cast implicitly).

sys/Makefile.dep Outdated Show resolved Hide resolved
sys/include/fido2/ctap.h Outdated Show resolved Hide resolved
sys/include/fido2/ctap/ctap_utils.h Outdated Show resolved Hide resolved
tests/sys_fido2_ctap/Makefile Outdated Show resolved Hide resolved
tests/sys_fido2_ctap/main.c Outdated Show resolved Hide resolved
tests/sys_fido2_ctap/main.c Outdated Show resolved Hide resolved
@Ollrogge Ollrogge force-pushed the fido2_follow_up2 branch 4 times, most recently from 96cb0a4 to 9f341f9 Compare October 16, 2022 18:18
@Ollrogge
Copy link
Member Author

With #18637 having been merged a while a go, I would like to get this in as well. Rebased on latest master.

@Ollrogge
Copy link
Member Author

Ollrogge commented May 8, 2023

@chrysn Can we get this in ?

@Ollrogge Ollrogge force-pushed the fido2_follow_up2 branch from 73e1053 to 1b20cb7 Compare May 25, 2023 09:48
@github-actions github-actions bot added Area: cpu Area: CPU/MCU ports Platform: native Platform: This PR/issue effects the native platform and removed Area: doc Area: Documentation labels May 25, 2023
@kfessel
Copy link
Contributor

kfessel commented May 25, 2023

link to #19559 native is using file backed mtd

@github-actions github-actions bot added the Area: doc Area: Documentation label May 25, 2023
@Ollrogge Ollrogge force-pushed the fido2_follow_up2 branch 2 times, most recently from 68b8994 to 4e1b12d Compare May 26, 2023 07:57
@kfessel
Copy link
Contributor

kfessel commented Nov 18, 2024

✔️ all files are reviewed
✔️ no opposition in 2 weeks

please squash your commits ( to a level of your liking)

@Ollrogge
Copy link
Member Author

✔️ all files are reviewed ✔️ no opposition in 2 weeks

please squash your commits ( to a level of your liking)

Done

@kfessel kfessel added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 20, 2024
@riot-ci
Copy link

riot-ci commented Nov 20, 2024

Murdock results

✔️ PASSED

db95ef6 sys/fido2: Small fix to dependencies && cleanup

Success Failures Total Runtime
10249 0 10249 19m:27s

Artifacts

@kfessel
Copy link
Contributor

kfessel commented Nov 21, 2024

if fixup chages are related to a previous commit -- please prepare them to be integrated with these commits (aka fixup)

@kfessel
Copy link
Contributor

kfessel commented Nov 21, 2024

sys/fido2/ctap/ctap_mem.c Outdated Show resolved Hide resolved
@github-actions github-actions bot removed Platform: native Platform: This PR/issue effects the native platform Area: cpu Area: CPU/MCU ports labels Nov 22, 2024
@kfessel kfessel changed the title Fido2 follow up continued sys/fido2 follow up continued Nov 25, 2024
@kfessel kfessel changed the title sys/fido2 follow up continued sys/fido2: follow up continued Nov 25, 2024
Copy link
Contributor

@kfessel kfessel left a comment

Choose a reason for hiding this comment

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

This is better than before and successfully went through CI

I assume the author tested it.

@Ollrogge
Copy link
Member Author

This is better than before and successfully went through CI

I assume the author tested it.

Done. Ran all tests and everything still works as expected :)

@kfessel kfessel added this pull request to the merge queue Nov 28, 2024
Merged via the queue into RIOT-OS:master with commit 737f675 Nov 28, 2024
30 checks passed
@Ollrogge
Copy link
Member Author

@kfessel thanks for reviewing !

@Ollrogge Ollrogge deleted the fido2_follow_up2 branch December 18, 2024 15:38
@MrKevinWeiss MrKevinWeiss added this to the Release 2025.01 milestone Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants