# 1password

Delivers 1Password items to the roles you grant them to, item by item, from a service-account token no agent holds.

| | |
|---|---|
| Kind | Plugin |
| Roles | Sync source, Sync target |
| Status | beta |
| Ships with Fleetlayer | Yes |
| Licence | FSL-1.1-ALv2 (source-available) |
| Maintainer | Fleetlayer |
| Source | https://github.com/fleetlayer/fleetlayer/tree/main/plugins/1password |
| Install | In every Fleetlayer release |
| Command | `fleetlayer-1password` |
| Platforms | Linux, macOS |
| Works with | Fleetlayer 0.3.13 and later |
| Plugin protocol | version 1 |
| Needs | 1Password's op command line on the source machine; a 1Password service account |
| Grants | `sync.publish`, `reading.publish` |

## What it does

Grants name items (op://vault/item/field) and the nodes of a role. Each node gets one bundle, 1password/<node>,
with exactly its items, again within minutes of a change in 1Password, and loses items (and files that need them)
when a grant is taken away. Agents use them through fleetlayer secrets run, the replacement for op run; targets can
also write env files and token files, mode 0600. Delivered values are redacted from everything the node sends.

## Setup

It comes with Fleetlayer, so there's nothing else to install. To start from:

```yaml
plugins:
  - name: 1password
    command: fleetlayer-1password
    grants: [sync.publish, reading.publish]
    config:
      source:                       # on the 1Password user's node
        token_files: [~/.config/fleetlayer/1password/token]
        roles:
          - { role: everyday, nodes: [agents], read: [op://github/deploy-bot/token] }
      receive: { from: secrets }    # on each role's node: the source's node
```

## What it can read and do

The service-account token stays with the source's Unix user; agents get only the items granted to their role, sealed to their node's key, and the control plane relays ciphertext it never stores. Values never appear in logs, readings or state files. Whoever can read a role's node can use its items.

More: https://fleetlayer.ai/docs/plugins/1password.md.
