# dev.knotless.authGateway

> What an owner grants a gateway as they delegate writes to it: the records a push writes, in their public repo and in their own spaces; and, for an organization, its record of being one, its records of whom it invited, its own space, and making and changing the members of its spaces, never deleting one.

- Kind: permission-set
- Authority: knotless.dev
- Lexicon: 1
- Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.authGateway)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.authGateway/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.authGateway/analytics)

## Permission set (`dev.knotless.authGateway`)

Type: permission-set

### Shown at sign-in

- `title` (string): knotless gateway
- `detail` (string): Write to your repositories for the collaborators you share them with, and run your organization: its members and its private repositories.

### Permissions

- `repo` (permission): Create, update and delete records in dev.knotless.claim, dev.knotless.org, dev.knotless.orgMember, dev.knotless.pack, dev.knotless.ref and dev.knotless.repo.
  - Collections: `dev.knotless.claim`, `dev.knotless.org`, `dev.knotless.orgMember`, `dev.knotless.pack`, `dev.knotless.ref`, `dev.knotless.repo`
- `space` (permission): Read, create, update and delete dev.knotless.claim, dev.knotless.orgMember, dev.knotless.pack, dev.knotless.ref and dev.knotless.repo records in your own dev.knotless.space spaces, and create and update the spaces themselves. From the Atproto Spaces proposal (0016); servers without it ignore space permissions.
  - Constraints: authority: self, collection: dev.knotless.claim, dev.knotless.orgMember, dev.knotless.pack, dev.knotless.ref, dev.knotless.repo, manage: create, update
  - Space type: `dev.knotless.space`
- `space` (permission): Read, create, update and delete dev.knotless.orgAcceptance and dev.knotless.orgMember records in your own dev.knotless.orgSpace spaces, and create and update the spaces themselves. From the Atproto Spaces proposal (0016); servers without it ignore space permissions.
  - Constraints: authority: self, collection: dev.knotless.orgAcceptance, dev.knotless.orgMember, manage: create, update
  - Space type: `dev.knotless.orgSpace`

### Asking for it (OAuth scope)

- `include:dev.knotless.authGateway` (scope): A client asks for this permission set with this scope. The scope builder lists what the set grants.
  - Scope builder: `Open in the scope builder`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "What an owner grants a gateway as they delegate writes to it: the records a push writes, in their public repo and in their own spaces; and, for an organization, its record of being one, its records of whom it invited, its own space, and making and changing the members of its spaces, never deleting one.",
      "detail": "Write to your repositories for the collaborators you share them with, and run your organization: its members and its private repositories.",
      "permissions": [
        {
          "collection": [
            "dev.knotless.claim",
            "dev.knotless.org",
            "dev.knotless.orgMember",
            "dev.knotless.pack",
            "dev.knotless.ref",
            "dev.knotless.repo"
          ],
          "resource": "repo",
          "type": "permission"
        },
        {
          "authority": "self",
          "collection": [
            "dev.knotless.claim",
            "dev.knotless.orgMember",
            "dev.knotless.pack",
            "dev.knotless.ref",
            "dev.knotless.repo"
          ],
          "manage": [
            "create",
            "update"
          ],
          "resource": "space",
          "spaceType": "dev.knotless.space",
          "type": "permission"
        },
        {
          "authority": "self",
          "collection": [
            "dev.knotless.orgAcceptance",
            "dev.knotless.orgMember"
          ],
          "manage": [
            "create",
            "update"
          ],
          "resource": "space",
          "spaceType": "dev.knotless.orgSpace",
          "type": "permission"
        }
      ],
      "title": "knotless gateway",
      "type": "permission-set"
    }
  },
  "id": "dev.knotless.authGateway",
  "lexicon": 1
}
```
