# Sharing

> Open one secret to a colleague or a team until a time you choose, or hand one version over through a link that works once.

Sharing opens one secret at a time, never a whole vault. A **grant** gives a user or a group lasting access to one
secret, ending by itself if you choose. A **one-time share** hands over one version through a link that works once.
Everything else in the vault stays closed, and no one can share a secret they may not view.

| Capability | What it gives you |
|---|---|
| [Grants](/secrets-store/sharing/grants/) | `view` or `use` on one secret, for a user or a group, until a set time (with limits) |
| [Shared with you](/secrets-store/sharing/grants/#set-it-up) | Every secret granted to you or your groups, across every vault, in one list |
| [Taking a grant back](/secrets-store/sharing/grants/#set-it-up) | One grant, or every grant to a leaver in every vault at once |
| [One-time shares](/secrets-store/sharing/one-time-shares/) | A link to one version that works once, then expires |

## Which to use

| You need | Use |
|---|---|
| A colleague reads one secret for a while | a [grant](/secrets-store/sharing/grants/) with a `validTo` |
| A whole team owns the secrets | the group's own vault: see [Vaults](/secrets-store/vaults/) |
| Someone needs a value once, such as a first password | a [one-time share](/secrets-store/sharing/one-time-shares/) |
| Someone may need your secrets if you can't act | [emergency access](/secrets-store/emergency-access/) |

## How it works

A grant and a share are both sealed for whoever receives them. A grant's copy of the secret is sealed to the
grantee's own key and sealed again at every write; a share is sealed under a key that exists only in its link. See
[Who can read a secret](/secrets-store/guides/who-can-read-a-secret/) for every way in.

A secret's owner can grant it to anyone in the realm, and anyone who may view it can share it with anyone in the
realm. The realm sets only how long one-time shares last.

Find everything shared with you ([Call the API](/develop/api/) shows how to get `$CVYUH_SESSION`):

```sh
curl https://foobar.cvyuh.com/api/v0/vault/managed/v1/shared \
  -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"
```

## Coming next

A realm sharing policy, checking a secret out for a set time with an approver, and a new version written after use:
see [What's next for sharing](/secrets-store/sharing/whats-next/).

## Related

- [Give someone access to a secret](/secrets-store/guides/give-someone-access/): a grant, start to finish.
- [Send a secret once](/secrets-store/guides/send-a-secret-once/): a one-time share, start to finish.
- [Offboard someone](/secrets-store/guides/offboard-someone/): every grant to a leaver taken back.
