Tywin Lannister
Tywin Lannister

Reputation: 164

If I uploadAttachmentWithMetadata why don't I see the attachment in the CRaSH shell using "attachments trustInfo"

I am learning to work with Attachments and I noticed something I can't explain. If I upload an attachment in the CRaSH shell using:

run uploadAttachment jar: path/to/the/file.zip

...it will appear in the list of Attachments when I run:

attachments trustInfo

However if I run:

run uploadAttachmentWithMetadata jar: path/to/the/file.zip, uploader: Tywin, filename: file.zip

...it will not appear in the list of Attachments.

The same behavior occurs if I upload attachments with their metadata through RPC or SSH.

The attachments with their metadata do successfully upload to the node because I can search for them using RPC and even download them from the CRaSH shell. They just won't show up in the attachments trustInfo list. This may seem minor but when I bump into things like this it makes me wonder if there is some fundamental aspect of Attachments I am missing.

Upvotes: 0

Views: 44

Answers (1)

Ashutosh Meher
Ashutosh Meher

Reputation: 1831

The trustInfo command only returns trusted attachments.

Attachments are trusted if one of the following is true:

  • They are uploaded by a trusted uploader
  • There is another attachment in the attachment store, that is trusted and is signed by at least one key that the given attachment is also signed with

Trusted Uploaders are: app, rpc, and TestDSL.

So any user attachment not signed by a key that was used to sign a previous trusted attachment is UNTRUSTED and not fetched.

Upvotes: 1

Related Questions