Choosing an Onboarding Mode
Every session is obtained through onboarding. An app joins in one of three ways, depending on where it runs and who starts it. The API details are on Onboarding and Sessions.
Which mode
Is your process started by your own local app? ────────yes──> Companion
│ no
Does your app run on the QAROS PC? ────────────────────yes──> Local app
│ no
Does an app on the QAROS PC grant it a member-hub
invitation, and is QAROS installed on its PC? ─────────yes──> Remote app through a member hub
| # | Your app | Mode | The user or operator does | Tutorial |
|---|---|---|---|---|
| 1 | runs on the QAROS PC (a source app) | local app: no code, an app tag per instance | clicks Allow once | Local App Onboarding |
| 2 | is a process your local app starts (a companion in another language, a helper) | companion: an invite from your app over stdin or a pipe | nothing | Co-Process Onboarding |
| 3 | runs on another PC with QAROS installed | remote app through a member hub: a grant from an app on the QAROS PC | allows the granting app to bring in member hubs, once | Remote App on Another PC |
- A source app normally runs on the QAROS PC: start with the local app.
- Several places in one process (C, C#, a plug-in) each onboard as a local app with the same tag and share one session: Several API Instances in One Process.
- An app QAROS starts from Source Applications joins as a local app, the same way.
- Target apps (the players on headsets) are QAROS's own apps; your app does not onboard them. It can bring a HoloLens in with
qar_session_invite_target_app; an Android headset is paired by the operator and joins by itself.
What is stored, and how long credentials live
Nothing is written to disk in any mode, and the onboarding id is always zero: every start onboards again.
| Mode | Credential | Lifetime | Renewal |
|---|---|---|---|
| Local app | key in process memory + certificate | 30 min | by the runtime while the session lives |
| Companion | key in memory (QarRuntimeEphemeralStorageExt) + certificate under your app's approval | 30 min | only while your app's session lives |
| Remote app | key in memory + certificate, as a local app of its PC | 30 min | by the runtime while the session lives |
The secrets that bootstrap a mode:
| Secret | Who makes it | Valid | Reaches |
|---|---|---|---|
| Companion invite | your local app, from its session | every start of the companion while your app's session lives; no expiry of its own | only this user on this PC |
| Member-hub invitation with a remote-app grant | the primary hub, on an allowed app's request | 24 h and one hub by default (at most 7 days, 64 hubs); the grant admits one app | whoever holds it |
Never log these, never put them on a command line or in an environment variable, and hand them over a private channel (a pipe to a child process, your own encrypted channel between PCs).
Peer id across restarts
| Mode | Same peer id after a restart | Who picks it |
|---|---|---|
| Local app (also several API instances, or started by QAROS) | yes: remembered per approval and app tag | the hub |
| Companion | yes: remembered per your app's approval and the companion's tag | the hub |
| Remote app | yes: remembered on the primary under the grant's tag | the primary hub |
- A remembered id is reused only while no other live process holds it; otherwise the newcomer gets a one-off id that is not remembered. Give instances that run together different tags.
- Launched or not, a source app's peer follows its app tag. When QAROS starts your app from the Source Applications panel it does not choose or change the tag: stopping and starting the app again keeps its peer when it passes the same tag, and two instances of it must pass distinct tags. Resolving multiple instances is up to the app.
- The hub keeps at most 64 tags per approval (least recently used dropped first) and forgets a tag unused for 30 days.
- Revoking or narrowing an approval revokes its running instances and forgets all its remembered peer ids.
Rules no app can bypass
- Apps cannot mint pairing codes or unbound invites.
qar_session_request_onboarding_invitemints only companion invites, which name your app on this PC. - A local app is identified by Windows, not by what it says. The hub checks the executable, its signature or file hash and the Windows user; the display name is only shown as the app's own claim. A moved, copied or re-signed app is refused until the operator revokes the old approval.
- The hub picks peer ids. An app tag only selects among the ids of the app's own approval.
- A companion invite stays with its app. Only a local app (or an app QAROS started) may request one; it reaches only this user on this PC, works only while the app's session lives, and the companion's certificate stops renewing once the app leaves.
- A remote-app grant admits exactly one executable. The first one that redeems it is recorded; any other executable is refused, also with a later invitation of the same tag. Only an app the operator allowed to bring in member hubs, with quota left, can create one, and the joining PC must trust the primary.
- The runtime must be the installed QAROS. A local app loads the installed runtime; the hub refuses a private copy of another version or flavor, and the runtime refuses a hub that is not the installed, signed QAROS.
- Renewal proves the key. A certificate is renewed only by a request signed with its own key; a stolen certificate alone renews nothing.
The security model behind these rules is described in Security Model.