Any tips on how to pass data to the artifact? I want to paste the same artifact many place in my forum, using a different JWT token in each place. I’ve been trying things like this but can’t get the creator to use it:
@david do you think there is any security implication to passing in information about the outside world to an artifact? (leave sandbox, but I guess echo window.location.search into some sort of attribute?
Giving the artefact access to the query string sounds ok. Easiest thing would be to use Ruby to inject it into the untrusted html document. Maybe as a meta tag or something.
I would think it’s a very common use case for real-world artifacts. I have a financial analysis artifact that I want to run against many investments. The artifact pulls the performance data from an API, using the JWT to identify which investment. Making many different artifacts, each with a different hardcoded JWT, is a non-starter.
Not to push my luck, but if I could also get the user id and topic id in the artifact, that would open up a lot more applications.
topic id is easy to add, but user id can get a tiny bit more tricky, cause the artifact is heavily cached, we would have to reduce some of the caching to make that happen.
That would actually be better for my application than passing data attributes. There’s a 1:1 mapping between topics and my JWTs, so I can look up the JWT, without having to edit the JWT in each post.
That probably doesn’t handle other use cases though.