fdo-rs / fido-device-onboard-rs

An implementation of the FIDO Device Onboard (FDO) spec written in Rust.
BSD 3-Clause "New" or "Revised" License
58 stars 32 forks source link

The admin tool fails to print the device credentials after the device manufacturing has been completed. #563

Closed mmartinv closed 9 months ago

mmartinv commented 10 months ago

To reproduce just run the aio with the admin tool

fdo-admin-tool aio --directory=./aio run 

And run the device manufacturing process:

fdio-admin-tool aio --directory=./aio \
                device --device-credential-location=./device-credentials \
                manufacture --device-info=$(uuidgen)

The proccess will end up with:

========== MANUFACTURING CLIENT ENDED WITH STATUS: ExitStatus(unix_wait_status(0)) ==========
 INFO  fdo_admin_tool::aio::device > Device manufacturing completed
error: unexpected argument 'home' found

Usage: fdo-owner-tool dump-device-credential <PATH>

For more information, try '--help'.
Error: Error manufacturing device

Caused by:
    Owner-tool failed with status: ExitStatus(unix_wait_status(512))
nullr0ute commented 10 months ago

What do you mean by "print the device credentials" in this context? I don't see those details in the report

mmartinv commented 10 months ago

What do you mean by "print the device credentials" in this context? I don't see those details in the report

After the manufacturing process has been completed the fdo-admin-tool calls the fdo-owner-tool command to dump the device credentials. That invocation is failing and showing the above output. Instead, the output should be something like:

========== MANUFACTURING CLIENT ENDED WITH STATUS: ExitStatus(unix_wait_status(0)) ==========
 INFO  fdo_admin_tool::aio::device > Device manufacturing completed
Active: true
Protocol Version: 101
Device Info: efda0731-d5c2-4d8a-80b6-5647be536e68
Device GUID: bc44dd1c-81f1-151e-ea11-c087a4c0c181
Rendezvous Info:
    - [(DevicePort, [25, 31, 146]), (IPAddress, [68, 127, 0, 0, 1]), (OwnerPort, [25, 31, 146]), (Protocol, [1])]
Public key hash: cde99dd10aef9a624559ca930fcb6d3602a98e4950da5be2bc0d296d69b9a604d0676b0691ed01cf1f229998ca4eee21 (Sha384)
HMAC and signing key:
    HMAC key: <secret>
    Signing key: <secret>