Re: [openc2-lang] mandatory vs optional, Header, id, version, timestamp, sender

From
Allan Thomson <>
Date
2018-01-24T23:24:17+00:00
ID
Thread
Re: [openc2-lang] mandatory vs optional, Header, id, version, timestamp, sender
Duncan  et al – 

 

The suggestion to add these parameters was based on experience of protocol and product development making it easier to develop and debug production code. I agree in some use cases these parameters might not be needed when things just work
 or everything is homogenous environment but we are designing a specification for a protocol that must support different tools, different versions, different environments and therefore we need to design the protocol for those cases. Including these fields is
 not a major problem for *any* programming environment. All of the data is known by the programming and environment that any tool will be deployed in. What harm exists if these parameters mandatory? The # of bytes added to the message is minimal. That
 is not a strong argument for making them optional. 

 

Command-Id -> there is no reason why this can’t be mandatory. This is a common construct across many protocols and applications using those protocols. Optionality just introduces
 complexity when implementations can easily support creating such a parameter. This parameter is useful for tracking and also matching up responses to commands. It allows products to show to users that commands have been received correctly and what their responses
 were. If a use case does not require this capability then just set the command-id to an incrementing number and ignore the response’s value returning it.

 

Version -> A version of protocol/schema being used to construct a message is 100% always known. Programmers that write code have to know what version of the protocol they’re
 writing to. Including this parameter in the messages is useful for compatibility checking, verification that one system is talking to another that is compatibility and is just common sense for debugging problems. If there are problems connecting systems together
 this will be one of the first questions a developer will want on why the commands are not executing correctly. For systems that don’t care about this checking then just hard-code the value and ignore compability checks.

 

Timestamp -> Same rationale as version. Every logging function on the planet generates log messages with timestamps. Time is known when a message is created. It is easily
 available to be included in messages. Its useful for debugging and cross-correlation across systems. If a system doesn’t care about it then just ignore its value. Mandating that the field be filled in is hardly a problem for any programmer to include a timestamp.

 

Allan Thomson,

CTO,
Lookingglass Cyber Solutions

This electronic message transmission contains information from LookingGlass Cyber Solutions, Inc. which may be attorney-client privileged, proprietary and/or confidential.
 The information in this message is intended only for use by the individual(s) to whom it is addressed.  If you believe that you have received this message in error, please contact the sender, delete this message, and be aware that any review, use, disclosure,
 copying or distribution of the contents contained within is strictly prohibited

 

From: <> on behalf of "" <>

Date: Wednesday, January 24, 2018 at 6:51 AM

To: openc2-lang <>

Subject: [openc2-lang] mandatory vs optional, Header, id, version, timestamp, sender

 

I’m sending this email as sFractal Consulting, not as LSC cochair, as a followup to yesterday’s discussions at the LSC.

 

Optional/Mandatory - Language/Actuator/Implementation

There was discussion of whether a field should be mandatory or optional. I think we need to take into account the mandatory/optional
 decision is made in several places. If we make a field mandatory in the language specification then it is mandatory in all implementations in all architectures for all profiles. We should remember that a field can be optional in the language specification
 but required by either a profile (eg all firewalls SHALL implement COMMAND-ID per language spec blah blah) or by an implementation specification (eg all OpenDSS OC2 implementations SHALL implement COMMAND-ID ...). I say this so you have context for what follows
 in the email. In the LSC, we can only determine the optional/mandatory for the Language Specification and will leave it to the AP-SC for profiles and IC-SC for implementation. 

 

COMMAND-ID

Yesterday at the LSC I think we reached consensus among those present that a COMMAND-ID capability should go in the
 language. I propose the field name be “id”, not “command-id”. I am distinguishing between what we humans refer to the field (COMMAND-ID in upper case) vs the ascii string that goes in the JSON (“id” in lower case). I think it’s important to remember there
 is hierarchical context within the JSON and we don’t need to burden the field names with information humans need when discussing it. “id” would be unambiguous in the JSON to both machines and humans.

 

In the case of COMMAND-ID, my gut says it should be optional in the language specification but I could be convinced
 to make it mandatory. In my use cases, I need it sometimes and not others. Ie I have use cases where I don’t need it but I don’t see it as an burden to add it for those use cases.

 

HEADER, VERSION, TIMESTAMP, SENDER

Where I feel more strongly is in the discussions of other field we lumped with COMMAND-ID. For the benefit of those
 not present at the discussion (and to record it for posterity since it’s bound to resurface) there is a proposal on the table to distinguish between two types of fields that are currently lumped under COMMAND-OPTIONS. The proposal was made to pull out what
 (I think it was Allan) called ‘HEADER’ or (I think it was Danny) called ‘METADATA’. I.e. they aren’t really options in the sense that they are part of executing the command like the ‘DELAY’ option is. I believe the “options” that got lumped in the HEADER category
 include VERSION, TIMESTAMP, SENDER, and COMMAND-ID. 

 

Although I maybe could be convinced to make COMMAND-ID mandatory, I feel strongly that VERSION, TIMESTAMP, SENDER should
 be optional in the Language Spec. One suggestion was to make HEADER optional - but, if included, then ID, VERSION, TIMESTAMP, SENDER are mandatory. I disagree with that approach - i.e. I would like to optionally use ID without being forced to include the others.

 

SENDER

In my use cases, I only send commands over a secure, mutually-authenticated communications channel. I personally would
 never recommend executing a security command based on the SENDER field - I’d need something more for authentication, and if I had it - then I wouldn’t need the SENDER field. I’d welcome someone documenting a use case, that they need and would implement, where
 SENDER is needed. I recognize I don’t know everything, but I would insist someone pull out their black pen and document that they will use it (i.e. I personally won’t be swayed by hypothetical, but I would agree based on a stated need by a member that they
 need it and would use it). In the past, it seems to come up in discussions where STIX COA use cases are mentioned. Maybe I just don’t understand that use case and I’d welcome someone documenting it. Assuming such a use case gets documented, I’d agree to it
 as an option but not as mandatory. This might get us into the 80/20 discussions of which uses are more common (with implication that if 80%, make it mandatory). But I feel those arguments belong in AP-SC and IC-SC since I feel they will be actuator and architecture
 dependent. 

 

TIMESTAMP

In my use cases, I at the moment only send commands point-to-point between a security orchestrator (SO) and an actuator
 (A) over mutually authenticated (read the use case for details of CSA SPA used) link carrying an API. In my use cases I do not need a TIMESTAMP in the sense of ‘when was the command sent?’. As shown in my use cases, I do need (as an option, i.e. not on every
 command, but sometimes) the COMMAND-OPTION of allowing for the command to have a duration associated with it (i.e. ‘classic’ command options). I recognize in the future my security orchestrator may receive commands from ‘elsewhere’ (eg if the Small Business
 Administration offered a STIX/TAXII feed with COA in it, or my cloud providers, Amazon and/or RackSpace, send me openc2 about stuff they found). So I will distinguish between the SO-A and SO-SO and confess I don't have fleshed out SO-SO use cases and maybe
 TIMESTAMP makes sense there. If someone were to submit a black pen use case that they need the HEADER TIMESTAMP, I’d agree to it as an option but not as mandatory.

 

I’ll use a fictitious example to make my point on language-optional, implementation-mandatory. Maybe the pubsub implementors
 all feel TIMESTAMP is required on all OpenDSS implementations (this is for explanatory purposes, I don’t know OpenDSS well enough to know it this is true); then the OC2-on-OpenDSS spec by the IC-SC could make TIMESTAMP mandatory while at the same time their
 HTTPS-API spec specifies it SHALL NOT be used (again for illustrative purposes). My point is it should be optional (if exists at all - someone supply a use case) not mandatory in the Language Specification.

 

VERSION

Although I do agree we should future proof the language specification to the extent possible, I don’t feel we need
 to go overboard on future proofing. My use cases are all software in the cloud so are less constrained then those dealing with hardware or less updatable software. I feel that since no one implements OC2 yet, it's not unreasonable to assume future implementations
 will have updatable software. All my use cases are API’s. I believe API versioning is dependent on language versioning and will suffice for all my needs. Ie the language does not need to include a version in every command since the API will. I will defer to
 what the IC-SC decides for OC2-on-API but I will recommend in that group that the version be part of the URL (as opposed to a passed parameter) - ie it will be mandatory. I recognize there are other architectures than https API. Assuming such a use case where
 VERSION is needed gets documented, I’d agree to VERSION as an option but not as mandatory.

 

Duncan Sparrell

sFractal Consulting LLC

iPhone, iTypo, iApologize

--------------------------------------------------------------------- To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail. Follow this link to all your TCs
 in OASIS at: https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php