Skip to content

Do not allow clients to set guid for Topic, Viewpoint, Document Reference, Comment #238

@lasselindqvist

Description

@lasselindqvist

This issue is opened due to b4e86e5

I feel like this presents bad design.

Some downsides of the design:

  1. It introduces an easy possibility of denial-of-service attacks if server allows client to generate the guids, forcing bad hashcodes to be used in the server. Of course the server can deny client guids by the analysis of whether it should, is difficult.
  2. The guid should be similar to database primary keys. The server should generate it and it should be immutable.
  3. The suggested API includes a lot of optionality. Optionality fragments the API when realistically not all vendors will implement the functionality.

Instead I suggest the API will start including an optional field called client_id. guid will be left as server generated and immutable. client_id can be given by the client and can be used by the server to merge newly posted items to existing ones. In case that happens, the server would need to respond with a proper HTTP response code, such as 303 See Other (or maybe something else more suitable).

This suggestion would also cover the originally intended use case mentioned in #189

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions