[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [kmip] Query Operation: Extension Information is ambiguous
Greetings The KMIP v1.2 specification states the following for a Query Response: 1676 The Extension Information fields in the response contain the descriptions of Objects with Item Tag values 1677 in the Extensions range that are supported by the server (see Section 2.1.9). If the request contains a 1678 Query Extension List and/or Query Extension Map value in the Query Function field, then the Extensions 1679 Information fields SHALL be returned in the response. If the Query Function field contains the Query 1680 Extension Map value, then the Extension Tag and Extension Type fields SHALL be specified in the 1681 Extension Information values. Where an Extension List is expected to look something like this: <ResponsePayload> <ExtensionInformation> <ExtensionName type="TextString" value="ACME LOCATION"/> </ExtensionInformation> <ExtensionInformation> <ExtensionName type="TextString" value="ACME ZIP CODE"/> </ExtensionInformation> </ResponsePayload> and an Extension Map is expected to look something like: <ResponsePayload> <ExtensionInformation> <ExtensionName type="TextString" value="ACME LOCATION"/> <ExtensionTag type="Integer" value="5548545"/> <ExtensionType type="Integer" value="7"/> </ExtensionInformation> <ExtensionInformation> <ExtensionName type="TextString" value="ACME ZIP CODE"/> <ExtensionTag type="Integer" value="5548546"/> <ExtensionType type="Integer" value="2"/> </ExtensionInformation> </ResponsePayload> Problems/Ambiguities: 1. Although an Extension Map is quite different from an Extension List, in both cases the containing Structure tag is Extension Information. One tag for two different data representations necessitates tedious look-ahead logic in the parsing code.
<ExtensionList> <ExtensionName type="TextString" value="ACME LOCATION"/> </ExtensionList> <ExtensionMap> <ExtensionName type="TextString" value="ACME LOCATION"/> <ExtensionTag type="Integer" value="5548545"/> <ExtensionType type="Integer" value="7"/> </ExtensionMap> 2. Specifying that the Query Request Payload may include both Query Extension List and Query Extension Map, necessitates that the parser: a. Determine which list of Extension Information structures comes first, the Extension Map list or the Extension List list? The KMIP specification does not specify which comes first, so either is possible. Solution-2: Make the two options mutually exclusive: Extension List or Extension Map, but not both. Solution-3: Same as Solution-1: Employ a distinct object tag for each data representation. b. Determine the end of one list and the start of the next (different) list, where both lists employ the same tag: <ResponsePayload> <ExtensionInformation> <ExtensionName type="TextString" value="ACME LOCATION"/> <ExtensionTag type="Integer" value="5548545"/> <ExtensionType type="Integer" value="7"/> </ExtensionInformation> <ExtensionInformation> <ExtensionName type="TextString" value="ACME LOCATION"/> </ExtensionInformation> </ResponsePayload> ** OR ** <ResponsePayload> <ExtensionInformation> <ExtensionName type="TextString" value="ACME LOCATION"/> </ExtensionInformation> <ExtensionInformation> <ExtensionName type="TextString" value="ACME LOCATION"/> <ExtensionTag type="Integer" value="5548545"/> <ExtensionType type="Integer" value="7"/> </ExtensionInformation> </ResponsePayload> Solution-4: Same as Solution-2: Make the two options mutually exclusive: Extension List or Extension Map, but not both. Solution-5: Same as Solution-1: Employ a distinct object tag for each data representation. Solution-6: Not really a solution, but a help: Specify that Extension List SHALL precede Extension Map when both are present. 3. In the Extension Map data representation, the Extension Type element has been assigned the Integer type. So, a map whose Extension Type is Text String (7) would be communicated as: <ExtensionType type="Integer" value="7"/> The above information would be better communicated if Extension Type were an Enumeration: <ExtensionType type="Enumeration" value="TextString"/> Cheers, … Dave The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it. |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]