Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax version URL query parameter to accept partial timestamp values #61

Open
jordan2175 opened this issue Apr 2, 2018 · 8 comments
Open

Comments

@jordan2175
Copy link

All,

Right now in the URL Query Parameter section 3.4.1 for specifying a version, we have the following text for calling out a specific value.

- requests a specific version of an object. For STIX objects, this requests objects whose modified time matches exactly the provided value. This value MUST follow the rules for timestamp as defined in [STIX™ Version 2.0. Part 1: STIX Core Concepts].

I propose that we change this text to be:

- requests a specific version of an object. For STIX objects, this requests objects whose modified time matches the provided value.

The reason for this change is to allow a client to ask for "?match[version]=2017-01" and get all of the STIX objects and their versions from January 2017 but not from December 2016 or earlier or from February 2017 or later.

@varnerac
Copy link

varnerac commented Apr 2, 2018

I’m against adding this. We can already express this using the current format.

@jordan2175
Copy link
Author

@varnerac actually no, we can not. 2018-01-01T00:00:00.001Z for example is in fact a real time that someone might want to query on.

@varnerac varnerac closed this as completed Apr 2, 2018
@varnerac varnerac reopened this Apr 2, 2018
@varnerac
Copy link

varnerac commented Apr 2, 2018

Sorry. Hit wrong button and closed.

@varnerac
Copy link

varnerac commented Apr 2, 2018

I read this too quickly. I think this warrants a new predicate to express version ranges, rather than deviating from the current timestampdata type.

@jordan2175
Copy link
Author

But for this field value, we do not define it as needing to be a timestamp type since some object types other than STIX might have a different version field.

@varnerac
Copy link

varnerac commented Apr 3, 2018

Well, non-STIX content has the option of using any string for the query string. However, version "requests a specific version of an object". That's not suitable for a range request, which returns multiple versions. Your "starts with" syntax is just a range request. It makes an assumption that people want to search on ranges that correspond with the timestamp string's prefix. Why not provide an explicit range operator?

I'd prefer explicit range operators rather than override version to handle a specific version or range of versions via a string prefix comparison.

@JasonKeirstead
Copy link

For what it's worth, the "TAXII Information Request and Response" proposal addresses this use case.

@jmgnc
Copy link

jmgnc commented Apr 10, 2018

you can use ISO 8601 Time Intervals: https://en.wikipedia.org/wiki/ISO_8601#Time_intervals These are computers, calculating time intervals are easy, and they can fully fill out the time. People should not be generating query strings/parameters by hand by themselves, their client should be.

@jordan2175 jordan2175 added this to Unknown in TAXII-2.1 Apr 15, 2018
@jordan2175 jordan2175 removed this from Unknown in TAXII-2.1 Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants