Removing members and rotating keys

When someone leaves a team, three things matter: they stop getting new changes, they can't read anything added after they left, and the secrets they could see stop working. MorphGate walks you through all three.

What removal can and can't do

Removing someone stops their sync and, after a key rotation, keeps them out of anything written from then on. It can't take back what they already synced: their devices keep the copies they had. That's why the last steps change the passwords and keys they could see.

Remove a member with offboarding

Owners and admins remove confirmed members from the app. Only the owner removes admins. On the team's Members tab, choose Remove… on the person's row. MorphGate opens four steps.

1. What they can open

Each vault they have access to, their access level, and how many hosts, SSH keys, VPNs and other items it holds. The team's member key directory shows as Members' public SSH keys (nothing secret).

2. Remove and rotate

Choose Remove (with their address) and rotate keys. MorphGate removes them from the team, then gives each of those vaults a new key, sealed to everyone who still has access. If a rotation fails, the page shows why, and Rotate the rest finishes the job. When it's done, the page says every vault they had has a new key. Back on the team's page, a vault that still shows Rotate key hasn't been rotated yet: choose it there.

Their devices drop the team's vaults at their next sync.

3. Their SSH keys on your hosts

If they published the SSH keys they use on the team's servers (see below), MorphGate can find and remove them.

  1. Choose Check hosts. MorphGate signs in to every host in the team's vaults, as each host is saved (through its jump hosts and VPN), and looks for their keys in ~/.ssh/authorized_keys of the user it logs in as. A host it hasn't met before asks you to confirm its host key, as when you connect.
  2. Each host shows how many of their keys it found, or the problem it ran into. A host whose login asks for a password every time is skipped: save its password to include it.
  3. Choose Remove from (the number of hosts). MorphGate removes those lines and replaces the file in one step over SFTP. Every other line, comment and option stays as it was. It then reads the file back; if the file changed in the meantime, it says so: check that host by hand.

A server that can't replace a file in one step is left alone, with a message saying so. Remove the key there by hand.

If they published no keys, the app can't tell which lines are theirs. Check the hosts by hand. Do the same for other users' authorized_keys on those hosts and for hosts that aren't saved in the team's vaults: MorphGate only looks where each saved host logs in.

4. Change what they could see

A checklist of every saved password (of hosts and identities), SSH key, VPN profile and feed token in those vaults. Change a feed's token where the feed is published, then in the source's Settings… (see Hosts from your cloud). Tick each one as you change it. The ticks aren't kept: if you leave the page, note what's left.

For a shared SSH key, Replace key does the work for you. It needs edit access to the key's vault.

  1. MorphGate generates a new key and adds it to every host in that vault that signs in with the old one, directly or through an identity or group, and tries it there.
  2. Then the vault switches to the new key. Every host that used the old key now uses the new one.
  3. Then the old key is removed from those hosts.

If any host fails before the switch, nothing changes. If the old key couldn't be removed somewhere, the list says where it's still installed: remove it there by hand.

  • The new key is an Ed25519 key with the old key's name and no passphrase.
  • If the old key had a certificate, the new key has none: choose Renew now on the key if it renews with a command, or have a new certificate signed.
  • Only hosts saved in that vault are updated. If the old key is also installed anywhere else, remove it there by hand.
  • On morphgate.com, replace keys only while the team has a trial or plan. Without one, the team's vaults can't change, so the new key wouldn't reach the other members.

Removing without offboarding

  • People who accepted but weren't confirmed yet have nothing to rotate. Remove takes them off the list.
  • Owners and admins can also remove members on the team page at morphgate.com. That removes them but doesn't rotate keys or clean hosts. Rotate the keys of their vaults in the app afterwards.
  • Your identity provider can remove people over SCIM (Enterprise). Their vaults are flagged for a key rotation the same way.
  • Taking someone's access to one vault, or making an admin a member, flags the affected vaults too.

Rotating a key by hand

Whenever someone loses access, the team's page says under Needs you that the vault's key should be rotated, and the sidebar shows Teams · rotate a key to anyone who manages that vault. Choose Rotate key there, or on the vault's row of the Vaults tab.

Rotation seals the new key to everyone with access, owners and admins included, then re-encrypts the vault's items under it. Once the key has changed, the server refuses changes made with the old key. If a device is interrupted while re-encrypting, any member with edit access finishes it at their next sync. Older items stay readable for members with the older keys until they're re-encrypted.

Publishing your SSH keys

For step 3 to work, members publish the public halves of the SSH keys they use on the team's servers. Only the public key is shared.

  1. Open the team in Teams, then its Your SSH keys tab.
  2. Pick a key under Publish one of your keys… and choose Publish.

The list shows your published keys; Unpublish withdraws one. Only keys in your personal vault can be published. Each entry is signed by you, so nobody else, the server included, can publish a key in your name.

The published keys live in a special team vault every confirmed member can write to, shown as Every member, with Members' SSH public keys. It's created with the team, and arrives on your devices at the next sync. Until then, the page says The organization's member key directory arrives with the next sync.

A team can ask every member to publish their keys (see Team policies). Members who haven't then see Teams · publish your keys at the bottom of the sidebar and Publish a key under Needs you on the team's page, and the Members tab shows None yet next to them.