# pub.techne.draft.appAccess

> A space's authority lets one app (an OAuth client) read one space: our published form of atproto 0016's simplespace `appAccess`. 0016 ANDs two axes for a read: the reader passes the space's read policy, and the app has appAccess for the space. Authored by the space's AUTHORITY, in its own repo, placed IN the space it names (as a `share` is), so the space's readers see which apps may read it. Approved by whoever passes the space type's published `manage` leg (the owner of a personal space itself, never another account linked to it; Facilitator and up for a collective's, a role held by any of the caller's linked accounts included), written with the authority's pen. Approval is per space. `criteria` is a stated rule for future spaces, stored and shown in social.scenius.listAppAccess; nothing evaluates it yet: future-space coverage is evaluated when `space:` grant enforcement exists. Deleting it withdraws the approval for future reads. Nothing stores a denial. Enforcement arrives with `space:` OAuth grants: before Spaces a proxied read carries no client identity.

- Kind: record
- Record key: any
- Authority: draft.techne.pub
- Lexicon: 1
- Published by [lexicons.techne.town](https://lexicon.garden/identity/did:plc:cbtfheqpi4g6vlrha4tpoh53), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:cbtfheqpi4g6vlrha4tpoh53/pub.techne.draft.appAccess)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:cbtfheqpi4g6vlrha4tpoh53/pub.techne.draft.appAccess/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:cbtfheqpi4g6vlrha4tpoh53/pub.techne.draft.appAccess/analytics)

## Record (`pub.techne.draft.appAccess`)

Type: record · key any

### Properties

- `client` (string · uri, required): The app: its OAuth `client_id` (the URL of its client metadata document).
  - Constraints: maxLength: 2048
- `createdAt` (string · datetime, required)
- `criteria` (ref): Which future spaces the approver means this approval to cover too, as the app's sign-in listed them. Stored and shown in listAppAccess only; coverage is evaluated once `space:` grants are enforced.
  - Reference: `#criteria`
- `space` (string · at-uri, required): The space the app may read. Its target format is 0016's `space-ref`; it carries the pre-flip form `at://{authority}/{spaceType}/{skey}` until the address flip.

## #criteria (`pub.techne.draft.appAccess#criteria`)

Type: object

A stated rule for future spaces: spaces of these types that the approver later comes to manage are meant to be covered too, without a new approval. Not evaluated until `space:` grant enforcement exists.

### Properties

- `spaceTypes` (array, required): The space types (NSIDs) covered.
  - Constraints: maxLength: 32
  - `items` (string · nsid)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "criteria": {
      "description": "A stated rule for future spaces: spaces of these types that the approver later comes to manage are meant to be covered too, without a new approval. Not evaluated until `space:` grant enforcement exists.",
      "properties": {
        "spaceTypes": {
          "description": "The space types (NSIDs) covered.",
          "items": {
            "format": "nsid",
            "type": "string"
          },
          "maxLength": 32,
          "type": "array"
        }
      },
      "required": [
        "spaceTypes"
      ],
      "type": "object"
    },
    "main": {
      "key": "any",
      "record": {
        "properties": {
          "client": {
            "description": "The app: its OAuth `client_id` (the URL of its client metadata document).",
            "format": "uri",
            "maxLength": 2048,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "criteria": {
            "description": "Which future spaces the approver means this approval to cover too, as the app's sign-in listed them. Stored and shown in listAppAccess only; coverage is evaluated once `space:` grants are enforced.",
            "ref": "#criteria",
            "type": "ref"
          },
          "space": {
            "description": "The space the app may read. Its target format is 0016's `space-ref`; it carries the pre-flip form `at://{authority}/{spaceType}/{skey}` until the address flip.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "space",
          "client",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "A space's authority lets one app (an OAuth client) read one space: our published form of atproto 0016's simplespace `appAccess`. 0016 ANDs two axes for a read: the reader passes the space's read policy, and the app has appAccess for the space. Authored by the space's AUTHORITY, in its own repo, placed IN the space it names (as a `share` is), so the space's readers see which apps may read it. Approved by whoever passes the space type's published `manage` leg (the owner of a personal space itself, never another account linked to it; Facilitator and up for a collective's, a role held by any of the caller's linked accounts included), written with the authority's pen. Approval is per space. `criteria` is a stated rule for future spaces, stored and shown in social.scenius.listAppAccess; nothing evaluates it yet: future-space coverage is evaluated when `space:` grant enforcement exists. Deleting it withdraws the approval for future reads. Nothing stores a denial. Enforcement arrives with `space:` OAuth grants: before Spaces a proxied read carries no client identity.",
  "id": "pub.techne.draft.appAccess",
  "lexicon": 1
}
```
