Labels

Created by Xinxiang Wang, Modified on Fri, 15 Dec, 2023 at 8:24 AM by Xinxiang Wang

Each artifact stored in the Codenotary Trustcenter can be assigned a set
of labels that can be modified over time.

Adding and removing labels

Labels can be added, removed, or set with vcn notarize command. Multiple
labels can be set using comma-separated argument values. Invoking the
command for an artifact that was already notarized updates the labels
list accordingly.

To add labels:

$ vcn n artifact \--labels-add "label1,label2,label3"

To delete labels:

$ vcn n artifact \--labels-del "label1,label2"

To set (overwrite previous) labels:

$ vcn n artifact \--labels-set "label1,label2"

The --labels-add--labels-del and --labels-set argument also allows
the use of a csv file with labels to be processed. It is automatically
detected if the argument contains a single name ending with .csv
extension:

$ vcn n artifact \--labels-add "./myLabels.csv"

The format of CSV file is one column list of labels:

label1 label2 label3 label4 label77

The output of vcn notarize command with labels operation shows the
operations that were performed for labels:

Labels: label1 (added), label2 (added), label3 (added)

Viewing current labels

To see the current list of labels attached to the artifact you can use
vcn inspect (short version - vcn i) command with --labels argument:

$ vcn inspect artifact --labels --last 1

Authenticating with labels

When authenticating assets you can specify a label to check against

$ vcn authenticate artifact --label "label1"

Here is breakdown of the possible outcomes of this authentication:

  • If the artifact was trusted and has label1 assigned, the status will be trusted.
  • If the artifact was trusted and does not have label1 assigned, the status will be unknown.
  • If the artifact was untrusted/unsupported and has a label1 assigned, the status will be untrusted/unsupported.
  • If the artifact was untrusted/unsupported and does not have label1 assigned, the status will be unknown.

And the same logic described in a table:

TC statusIs label1 assigned?vcn a outcome:
trustedyestrusted
trustednounknown
untrusted or unsupportedyesuntrusted/unsupported
untrusted or unsupportednounknown

Note: Support for authenticating against multiple labels is planned.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article