UIID
UIID Menu
v2.21 Module

UIID Zero Zero (UZZ).

Run UIID with temporary, anonymous data. UZZ keeps session data only for a short, fixed time, encrypts it per user, and truncates IP addresses before storage, so the operator holds nothing it can link back to a person.

For End Users

  • Sessions expire automatically after the time you configure. Nothing is kept longer.
  • Each session's data is encrypted with a per-user key; the operator cannot read it without that key.
  • IP addresses are truncated (/24 for IPv4, /48 for IPv6) before anything is stored.

Company Setup

  1. Create a store with a fixed time to live, for example uzz.NewStore(30 * time.Minute).
  2. Create a session with Store.Create and store data with Store.Put; read it back with Store.Get.
  3. Generate a per-user key with uzz.NewUserKey and seal archives with uzz.Seal; only the user holding the key can open them with uzz.Open.
  4. Call Store.Sweep periodically (for example from a ticker) so expired sessions are removed.
  5. Archiving on the user side: store the sealed blob in the user's own storage and never send the key to the platform owner.

Example

import "github.com/linkspreed/uiid-idp/internal/uzz"

store := uzz.NewStore(30 * time.Minute) // data expires after 30 minutes
id, err := store.Create()
if err != nil {
    return err
}
err = store.Put(id, "cart", []byte(cartJSON))

userKey, _ := uzz.NewUserKey()           // held by the user, not the platform
sealed, _ := uzz.Seal(userKey, cartJSON) // encrypted archive

Need code tailored to your stack? Generate ready-to-paste examples in the Developer Modules generator.

Use via API

This module is metered through the UIID API. Create an API key in your dashboard, grant it the scope uzz:use, and send it as the X-API-Key header. Requests without a key get 401; keys without the scope get 403.

  • POST /api/v1/uzz/sessions returns {"session_id"} (201)
  • PUT /api/v1/uzz/sessions/:id/:field body {"value"} (max 64 KiB)
  • GET /api/v1/uzz/sessions/:id/:field returns {"value"}
  • DELETE /api/v1/uzz/sessions/:id returns 204

cURL

SID=$(curl -s -X POST https://idp.uiid.linkspreed.com/api/v1/uzz/sessions \
  -H "X-API-Key: $UIID_API_KEY" | sed -E 's/.*"session_id":"([^"]+)".*/\1/')
curl -X PUT https://idp.uiid.linkspreed.com/api/v1/uzz/sessions/$SID/cart \
  -H "X-API-Key: $UIID_API_KEY" -H "Content-Type: application/json" \
  -d '{"value":"{\"items\":2}"}'

Full request and response reference: UZZ in the API docs.