Skip to content

Draft: Add support for CoRE RD based AS lookup

Hugo Hakim Damer requested to merge hdamer/dcaf:rd_as_lookup into master

This MR allows users to specify that instead of using the hardcoded AS/AM-URI specified in the dcaf_context_t struct, a resource directory should be queried for the AS location instead. To do so, this MR also adds helper functions for parsing CoRE Link Format files, which are used in resource directories to declare links and relations between links. This MR uses a non-standardized relation type am-authorize in link format files to declare the appropiate AS for a resource (as is suggested in https://doi.org/10.26092/elib/937, section 12.2.1.1, pp. 235).

A few things still remain until this MR is ready.

  • add some more documentation and source code comments to describe the added behavior
  • allow for using custom endpoint/audience names, possibly by allowing users to provide a callback that translates between URLs and endpoint/audience names (might also be a separate MR)
  • add convenience functions for finding the resource lookup URL using the RD's .well-known/core
  • possibly find a better way of persisting the ticket request information instead of storing the already serialized request CBOR map
  • free additionally allocated memory
  • do proper error handling
  • check formatting (max line length, indentation, brackets)
    • check for naming consistency (AM/AS/SAM?)
  • add tests?
Edited by Hugo Hakim Damer

Merge request reports

Loading