-
Notifications
You must be signed in to change notification settings - Fork 1
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
add blobId as an attachment to shard #20
Conversation
schemas/shard/v2.js
Outdated
required: ['name', 'reference'], | ||
properties: { | ||
name: { type: 'string' }, | ||
reference: { $ref: '#/definitions/blobId' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am yet to figure out if we can specify different possibly references here. e.g. at this point, content.attachment.reference
can only be a blobId
. While this is fine for the moment, would be more extensible / open ended to make it so that it could be one of multiple options. Not sure how to do this with JSON schema.
@ameba23 thought more about this, if we pass an attachment and give it a For the sake of the Patchwork integration, it would be useful, as it would allow the interface to only render shards that are relevant to their SSB identity. We've got a trade-off here between security and usability. |
@KGibb8 thinking outside the box here is it possible to slice up the gossip.json, encrypt the slices, and reconfigure on the other end with a recomposition script? |
@KGibb8 this is indeed gonna be a problem, but i think it's a problem we will have to live with if we want patchwork to only display shards relating to ssb keys. and its not that big a problem!? i would like to propose that we make a generalised solution for handling bigger secrets, and add anything specific to gossip.json files or patchwork intergration on top. but this is just my opinion. @dan-mi-sun do you wanna explain how this idea helps us? is the idea to obfuscate the size of the gossip.json file? |
If we choose to do this, it kind of undoes a lot of the work we did obfuscating the @ameba23 agreed on the generalised solution for bigger secrets. That was why I made it so you can just attach a |
@KGibb8
agreed, i think its acceptable
nothing different to what you're suggesting, i think we are on the same page. as i think i mentioned elsewhere, ideally id like if the share method handled everything, as in it notices the secret you gave it is to big and creates a blob for you. but it might start getting a bit bloated. |
@KGibb8 so this commit makes the attachment property be an object with properties 'name' and 'blobId'. is this what you were imagining? i'm gonna wait for the thumbs up from you before making changes to the schema in this PR. |
Unified into single branch, see #22 |
Adds capacity to attach a file / blob reference to a shard message. Needed by Patchwork Integration - Phase 1: ssbc/patchwork#952