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

(WIP) : HTTPS support for manufacturing-server and manufacturing-client for DI #579

Open sarmahaj opened 9 months ago

sarmahaj commented 9 months ago

This PR (currently in draft state) contains-

(Meanwhile to test manually, use following commands )

To create key & certs: openssl genpkey -algorithm RSA -out server.key openssl req -new -key server.key -out server.csr openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Mention this address in manufacturing_server_https_key and manufacturing_server_https_cert fields in manufacturing_server.config file. (This part to generate cert and key will be taken care in separate PR as a part of admin-tool)

sudo MANUFACTURING_SERVER_CONF=/usr/share/fdo/manufacturing_server.yml LOG_LEVEL=trace ./target/debug/fdo-manufacturing-server

HTTPS request: sudo DEV_ENVIRONMENT=1 MANUFACTURING_SERVER_URL=https://localhost:8084 LOG_LEVEL=trace DIUN_PUB_KEY_ROOTCERTS=aio-dir/keys/diun_cert.pem ./target/debug/fdo-manufacturing-client

HTTP request: sudo DEV_ENVIRONMENT=0 MANUFACTURING_SERVER_URL=http://localhost:8080 LOG_LEVEL=trace DIUN_PUB_KEY_ROOTCERTS=aio-dir/keys/diun_cert.pem ./target/debug/fdo-manufacturing-client

DI should work and create device_credentials file under /etc/device-credentials.