Skip to content

For all tasks add in the 'id' field in addition to display name #601

@mbwhite

Description

@mbwhite

Today, the 'name' of components, such CAs, is really the 'display_name'. there is an assumption that this is unique and is suitable for lookup.

However there are cases where this is problematic, if a CA already has the name 'MyCA' requesting a new one, will create a CA with display name 'MyCA', but with a new id 'MyCA1' . When this is then referred to later, it's not possible to accurately locate the correct CA.

Plan:

  • Add ID into all the modules that support creation. Use that if it is supplied in the ID field (not mandatory in the current implementation)

  • Allow ID to be used in modules, when looking up components - prefer this to using display_name

  • For those that do fall back to display_name, then if multiple entries are returned, this will be considered an error. This could be considered a breaking change, as something that notionally worked before would fail. However as soon as the wrong component is chosen, the code has started down a (very likely) error path. Therefore best to fail fast.

  • Ensure that if created via just display_name, the returned ID is available for use later. It should be returned today but is not clearly documented as such.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions