[BUG] Api parameter order divergence
Awbmilne opened this issue · 2 comments
Describe the bug
It seems that various documentation shows the order of the parameters for the /api/v1/owner/redirect
endpoint to have different order.
Different Sources
To list:
In the primary README
Configure the Owners TO2 address using the following API:
POST https://localhost:8043/api/v1/owner/redirect (or http://localhost:8042/api/v1/owner/redirect) Authorization DIGEST with "apiUser" and api_password defined in the owner's service.env POST content-type text\plain
In the request body add Owner T02RedirectAddress.
[[null,"localhost",8043,5]]
In the AIO docs
\component-samples\demo\aio\README.md
Operation | Description | Path/Query Parameters | Content Type | Request Body | Response Body | Sample cURL call |
---|---|---|---|---|---|---|
POST /api/v1/owner/redirect | Updates TO2 RVBlob in ONBOARDING_CONFIG table. | text/plain | RVTO2Addr in diagnostic form | curl -D - --digest -u ${api_user}: --location --request POST 'http://localhost:8080/api/v1/owner/redirect' --header 'Content-Type: text/plain' --data-raw '[["localhost","127.0.0.1",8042,3]]' |
In the Owner docs
\component-samples\demo\owner\README.md
Operation | Description | Path/Query Parameters | Content Type | Request Body | Response Body | Sample cURL call |
---|---|---|---|---|---|---|
POST /api/v1/owner/redirect | Updates TO2 RVBlob in ONBOARDING_CONFIG table. | text/plain | RVTO2Addr in diagnostic form | curl -D - --digest -u ${api_user}: --location --request POST 'http://localhost:8042/api/v1/owner/redirect' --header 'Content-Type: text/plain' --data-raw '[["localhost","127.0.0.1",8042,3]]' |
In the FIDO specification
3.3.14. RVTO2Addr (Addresses in Rendezvous 'blob')
CDDL
RVTO2Addr = [ + RVTO2AddrEntry ] ;; (one or more RVTO2AddrEntry)
RVTO2AddrEntry = [
RVIP: IPAddress, ;; IP address where Owner is waiting for TO2
RVDNS: DNSAddress, ;; DNS address where Owner is waiting for TO2
RVPort: Port, ;; TCP/UDP port to go with above
RVProtocol: TransportProtocol ;; Protocol, to go with above
]
Differences
The primary README and the FIDO docs indicate that the order of the parameters is:
[[IpAddress,DnsAddress,Port,RvProtocol]]
But, the AIO and Owner README files indicate that the order of the parameters is:
[[IpAddress,DnsAddress,Port,RvProtocol]]
- Question/Concern
So, my problem is... Which is correct? Is the java API backward? or just some of the documentation?
Thanks for the help! And great work with the Intel SDO/FIDO Device Onboarding! Loving it so far.
@Awbmilne Thanks a lot for your Contributions.
It's just a documentation error. @JsonPropertyOrder({"ipAddress", "dnsAddress", "port", "protocol"})
from protocol/src/main/java/org/fidoalliance/fdo/protocol/message/To2AddressEntry.java
Fixed in PR #527.