-
Notifications
You must be signed in to change notification settings - Fork 12
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
Revised File Identifier Handling #102
Comments
I think this goes back to making an identifier internally unique vs unique across systems. I believe we should embrace a concept of using 2 IDs, similar to the approach described https://www.rfc-editor.org/rfc/rfc7643#section-3.1: To handle An internal identifier The Unwinding that approach, the other statements will look more like: MUST check for an OSCAL.io external identifier in the metadata\document-ids array, and honor it as the unique identifier used in future API calls; OSCAL REST OpenAPI clients MUST assign an immutable document identifier to OSCAL content prior to POSTing to an OSCAL REST OpenAPI server in the externalId field. The language above is a little loose, and I used |
@pkothare I follow a little better now. I like this. This raises two questions:
2. Should a server allow the use of either identifier when both are available?
|
I concur with this approach. Distinguishing by scheme is concise enough to conform to OSCAL standard and provide us with the necessary flexibility to uniquely identify a document internally and externally.
Borrowing again from https://www.rfc-editor.org/rfc/rfc7644#section-3.4, the
The server responds with:
which also means that when creating an OSCAL document (in this case a catalog) for a given request like:
the server should respond with:
|
@pkothare Understood. I will revise accordingly |
Relates to Issue |
@pkothare after further review and consideration, I see your recommended approach as violating one of our specification design principles. We have longed maintained that the only requirement for OSCAL content to be passed via the API is that it passes the NIST OSCAL syntax validators. Requiring the assignment of an External ID in an otherwise optional OSCAL filed is a departure from that principle. I would like to suggest an hybrid solution. The External Identifier approach described above should be held up as a best practice. It should be honored and used by the server when present in OSCAL content. However, The server should not reject valid OSCAL content simply because it is missing this identifier. Instead it should accept the content and assign the External ID itself. This includes adding the identifier to the server's copy of the OSCAL content for inclusion when served to other entities. As mentioned in our verbal discussion, the I realize this is a departure from the System for Cross-Domain Identity Management; however, I believe the sharing of OSCAL content is a sufficiently different use case with different design principles. Allowing an honoring the External ID when present addresses your concern, while not requiring it allows us to continue honoring the goal of accepting any valid OSCAL content. |
That's fair, I incorrectly made the statement: It should have been stated as something along the lines of:
Agree, which changes the modal verb from MUST to SHOULD, per RFC 2119.
Agree. As you stated, it's best practice but there is no hard requirement.
I don't believe this would work. By virtue of generating the External ID on the server, there may be collisions on the client's side. Moreover, it would couple the client's and server's implementation of an External ID. Lastly, if the server were to generate an External ID, the solution of using both an External ID and Content ID would not be succinct. We should simply accept an External ID if supplied. The Content ID is sufficient to identify a document from the server's perspective. The client may choose to use the Content ID to establish uniqueness within it's boundary, but that's really up to the client. The External ID should be treated as an opaque identifier provided by the client, i.e. it has no meaning to the server, it just holds it as extra information on behalf of the client.
In accordance with what was mentioned above and your recommendation of making the External ID optional, I believe the following interaction should be valid. For the given request:
the server should respond with:
In fact, the SCIM does not require it either. The language they use for
Taken from: https://www.rfc-editor.org/rfc/rfc7643#section-3.1 |
@brian-comply0 is this issue sounds like a topic we should propose on the https://github.com/GSA/fedramp-automation repository. Thoughts? |
@pjavan are you saying we should propose the PMO define what identifiers they expect in the content they receive? |
@pkothare glad we are on the same page on "must" vs. "should". I guess I'm still confused on one point:
Do I follow what your response correctly? |
Assuming oscal file exchange will create reference problems for FedRAMP, I'm wondering if the PMO has had to tackle this problem yet and if they have a preferred approach developed. |
Even in legacy packages they assign a Package ID. One per system. They require it to be in the SSP, AP, AR, and POA&M for a given system. It also appears on the Marketplace. When I wrote the FedRAMP OSCAL guides, I described this as being required content in the /metadata/document-ids array. I can't speak to what they may or may not have done after I left. I'd prefer to socialize it with Dave before posting something to their repo. |
Agreed
Agreed
For now, only the Content ID can be used in GET, PUT and DELETE actions. The External ID may be used in GET actions in the future if we want to support actions like
Yes, as stated above, from the server's perspective, the Content ID provides uniqueness for operations conducted against a single entity and MUST be used by the client to identify resources on the server; the External ID has no bearing on the server. If a server responds with a document that includes an External ID for a given GET request by the client, then the client may choose to use it at it's own discretion, because the client supplied it during POST request at some earlier point in time. |
@pkothare perfect! Thank you for clarifying! |
We should consider making a minor tweak to this for consistency. We've mixed
I think they should be either... this way (with hyphens):
or this way (dropping the
I slightly favor the latter. |
@brian-comply0 makes sense what you're bringing up. I'm indifferent on the naming convention minus a small preference to keep things consistent with standard (content-uuid/external-uuid). Will circle back with @pkothare and provide resolution path. Thanks for bringing this up. |
User Story
As a tool developer, I want file identifiers to be more reliable and consistent across implementations, so that document references are more universal.
Description
Per a suggestion from @pkothare, file identifiers should:
The draft specification currently allows each implementation to assign their own unique identifier, and is completely silent on how that identifier is managed, and does not consider the possibility of using the same identifier to reference the same document in multiple different systems.
Further, while the OSCAL standard offers a document identifier field in metadata, this field is not required.
Acceptance Criteria
Proposed Solution
The OSCAL REST OpenAPI Specification should be revised such that:
POST
ing to an OSCAL REST OpenAPI serverPOST
method:metadata\document-ids
array, and honor it as the unique identifier used in future API calls;metadata\document-ids
array as the OSCAL.io identifier.The text was updated successfully, but these errors were encountered: