Found while mapping the Experience model for #774, then verified against the live service.
GET /api/v1/experiences serializes store.Experience with no response type, so every field goes out, including share_token and editors.
Verified on the live service just now: 14 experiences return a non-empty share_token, which is all of the FTI zone.
Authentication IS required. Unauthenticated, and with a wrong token, the endpoint answers 401. So this is not a public leak.
A share token is not a label, it is a capability. Issuing one makes the experience publicly readable, and registering through /studio/experience/<name>?invite=<token> on hydramancer earns the caller editor rights on that experience.
So any holder of the library bearer token can read every share token and promote themselves to editor on all 14 shared experiences. That token is a shared service credential, not a per-caller one: hydravenues holds it in its config in order to assemble venue guides, and it only needs name, label, developer, description and the hosting text.
The secret stays out of the venue guide today only because hydravenues' client struct in internal/library/client.go does not declare a share_token field. An omission in a consumer is not an access boundary. Any new consumer, or any consumer that starts decoding into a map, gets the secrets for free.
Give the read endpoints a real response type instead of returning the store type. Drop share_token and editors from it. The owner's own view can keep them behind a stronger check if a screen needs them.
This is cheap to do on its own and does not need to wait for #774, but #774 is the natural moment: a split into a technical half and a human half has to define the wire shape anyway, and that is exactly where the omission belongs.
hydrabody decodes a key the library has never sent: Resolution with tag json:"resolution" (hydrabody/pkg/provider/experiences.go:23), written to install state at lines 114 and 141. There is no Resolution anywhere in hydraexperiencelibrary, so every body has been receiving the empty string and falling back.
Nothing is broken, but it is worth recording as a lesson for #774: a field in a consumer struct proves nothing about what the producer emits. Verify the split against the live route, not against the structs on either side.
Filed the two follow-ups so this issue is not carrying them:
Correction, and it closes more of this issue than the earlier comment claimed.
I wrote that links already sent still work and that the 12 unfollowed ones were the path we were counting on with the makers. That was wrong, and it was my assumption, not a fact anybody gave me. Only two links were ever sent: Rise and Bliss. Those two are the two editors we have. The other twelve were issued and never sent to anybody, so they were capabilities with no purpose, sitting in the store and readable by every holder of the library's service token.
So they are gone, not kept:
share_token as the only change: 14 still public, both editors (bert@riseof.eu on rise-of, zeno@bliss-content.com on lam-gods) untouched. The values are kept in experiences.yaml.bak-pre-token-retire on the node in case one did go out.?invite= claim path, no share URL, no ShareToken field on the client struct, no tokenMatches. A token written into the store by any other means now grants nothing. Proved by mutation: reinstating a grant on the query fails TestAnOldShareLinkEarnsNothing.This shrinks what is left here. There is no longer a secret in GET /api/v1/experiences for any caller to read, so the capability half of this issue is closed for every consumer at once, not only for hydravenues. What remains is editors, which is a list of people's private email addresses, and is still withheld only from the reader class. #795 still stands for that.
Taking the page private no longer destroys anything either: reading is public, writing is editors, and neither touches the other.
Deployed and verified. hydramancer v0.17.0, hydraexperiencelibrary v0.20.0, hydravenues v0.20.0.
share tokens in the store: 0 (was 14)
public experiences: 14 (unchanged behaviour)
editors: 2 (bert@riseof.eu, zeno@bliss-content.com)
Live, with no session:
| request | answer |
|---|---|
| public page | 200, six sections, zero private fields, no link and no copy button |
public page with ?invite=anything |
200, the read-only page, zero form fields |
| private page | 303 to sign in |
private page with ?invite=anything&signin=1 |
404 |
| venue guide | 200, zero email addresses |
What this issue asked for is done: the read endpoints have a real response type, share_token and editors are not in it, and the one consumer named here holds a credential that cannot see them. The secret itself no longer exists anywhere, so no caller of any kind can read one.
Closing. What is left is not this issue: editors is still visible to an admin token, and several consumers still hold one. That is #795, with the evidence, and it is now a privacy and least-privilege question rather than a capability leak.
The second finding in the original report, hydrabody decoding a resolution key the library has never sent, is untouched and still true.
Half of this is deployed and verified live. The other half is bigger than the issue says, and the evidence is below.
What landed
hydraexperiencelibrary v0.20.0.
server.reader_tokensholds one named credential per read-only consumer. A reader readsGET /api/v1/experiencesandGET /api/v1/experiences/{name}and nothing else, throughreaderExperienceininternal/api/wire.go.That type is an ALLOWLIST, not the store type with two fields blanked, because an omission is what caused this issue in the first place.
TestReaderFieldsAreDeclaredwalksstore.Experienceand fails on any key that is in neither the allowlist norwithheldFromReaders, which carries a reason per key. Proved by mutation: adding a field to the store fails the test, and puttingshare_tokenback into the allowlist fails it twice over.hydravenues now holds a reader token. Verified against the live service:
/api/v1/statusThe zone guide still answers anonymously with zero email addresses and no private fields.
What is NOT closed
hydravenues is not the only consumer. These also call
/api/v1/experiences:If they hold the admin token, each of them can still read all 14 share tokens and follow one to become an editor of that experience. On a kiosk head that is worse than on a server, because the credential sits somewhere physically reachable. I could not confirm their configs: the sweep that would have answered it wedged a node's exec queue, which is filed separately.
They cannot simply take the same reader token. A guide consumer needs the copy; a body or stream consumer needs
exe_path,stream_mode,orientationand the build numbers, which this allowlist deliberately withholds. That is a second reader class, and it is not work for the week before the zone opens.Related, from hydramancer v0.16.0
The share token is no longer issued at all. An owner invites an email address, iamnim proves who arrives, and the address decides what they may write. 14 links were issued and 2 were ever followed. Links already sent still work, because the makers we are waiting on have them in their inbox. That shrinks this issue over time: a share token nobody can read is still a capability, and one that does not exist is not.