ExoSafe: Cloud-Backed Credential Store

ExoSafe Logo

1. Defining ExoSafe and Its Purpose

ExoSafe is a credential management component within the ExoHub ecosystem, designed to securely store and provision SSH keys and git tokens for users operating in agentic, headless, or ephemeral environments. When users authenticate via OIDC but lack locally available credentials — such as SSH keys needed for git clone/push operations — ExoSafe bridges that gap by providing a personal, cloud-backed safe.

The core problem ExoSafe solves is straightforward: in environments like MCP-connected AI agents, CI/CD pipelines, or remote compute nodes, a user can authenticate (obtaining JWT tokens and AWS credentials) but has no way to bring along their SSH keys or git tokens. ExoSafe allows users to upload these credentials once, and have them automatically provisioned whenever they run exo login in a new environment.

ExoSafe Portable Identity

Security Considerations

ExoSafe is designed for git-access credentials only. Users should follow these practices:

2. Role in the ExoHub Architecture

ExoSafe operates as a bridge between OIDC authentication and git operations, ensuring that authenticated users can seamlessly interact with git repositories regardless of their runtime environment.

Integration with ExoHub Components

ExoCLI: ExoCLI provides the exo safe command group for managing safe contents and automatically retrieves credentials during exo login. After provisioning, ExoCLI injects the SSH configuration into all git subprocesses it spawns.

ExoGate: ExoGate coordinates data synchronization that often involves git operations. ExoSafe ensures the credentials needed for these operations are available in the environments where ExoGate’s workers run.

OIDC Authentication: ExoSafe relies on OIDC JWT tokens for identity resolution. The preferred_username claim determines which safe a user accesses. AWS session tags (user identity attributes) enable infrastructure-level access control via ABAC policies.

Credential Flow

  1. Upload — User stores credentials via exo safe store (interactive TUI wizard or direct flags; requires prior exo login)
  2. Storage — Credentials are encrypted in AWS Parameter Store (SecureString) under /exohub/safe/<username>/<type>/<key>
  3. Retrieval — On exo login (device flow only, not silent refresh), the CLI fetches safe contents via the ExoHub API
  4. Provisioning — SSH keys are written to ~/.config/exo/ssh/ with a generated SSH config; git tokens are written to ~/.config/exo/credentials/git-credentials
  5. Usage — ExoCLI sets GIT_SSH_COMMAND on all git subprocesses, pointing to the generated SSH config
  6. Cleanup — On exo logout, all provisioned credentials are removed from the local filesystem

3. Technical Implementation

Typed Entries

Each safe entry has a required type that determines how it is validated on upload and provisioned on retrieval:

TypeUpload validationProvisioning
ssh-keyPEM format check + optional host verificationWritten to ~/.config/exo/ssh/<name>, SSH config generated
tokenSize limit only (4KB)Written to git credential-store file

Storage Backend

ExoSafe uses AWS Systems Manager Parameter Store (Standard tier, SecureString) as its backend:

SSH Configuration

When multiple SSH keys are stored (e.g., for different git providers), ExoSafe generates an SSH config file at ~/.config/exo/ssh/config:

Host github.com
    IdentityFile ~/.config/exo/ssh/github.com
    StrictHostKeyChecking no
    IdentitiesOnly yes

Host github.com
    IdentityFile ~/.config/exo/ssh/github.com
    StrictHostKeyChecking no
    IdentitiesOnly yes

The GIT_SSH_COMMAND environment variable is set on each git subprocess to use this config, avoiding any modification to the user’s global SSH or git configuration.

CLI Usage

Interactive wizard

Run exo safe store with no arguments to launch a step-by-step TUI wizard. It guides you through selecting the credential type (SSH key or git token), choosing a host from a predefined list or entering a custom one, and selecting the credential source (key file picker or environment variable / paste). Press Escape at any step to go back.

exo safe store

Direct commands

# Store an SSH key (verifies against the host; prompts "Store anyway?" on failure)
exo safe store github.com --type ssh-key --file ~/.ssh/id_ed25519_git

# Store an SSH key, skip verification prompt
exo safe store github.com --type ssh-key --file ~/.ssh/id_ed25519_git --yes

# Store a git token from environment variable
exo safe store github.com --type token --from-env GITHUB_TOKEN

# Store a git token for github.com
exo safe store github.com --type token

# List stored credentials (names and types, no values)
exo safe list

# Show a credential value (interactive select if no name given)
exo safe show github.com

# Delete a credential (interactive select if no name given)
exo safe delete github.com

# Delete all credentials (shows warning, prompts for confirmation)
exo safe clear

# Export all credentials to a JSON file
exo safe dump ~/safe-backup.json

# Import credentials from a JSON dump
exo safe restore ~/safe-backup.json

Storage path structure

Parameters are stored in AWS Parameter Store at /exohub/safe/<username>/<type>/<key>, where <type> is ssh-key or token. Including the type in the path allows storing both an SSH key and a git token for the same hostname. Names containing : (e.g., github.com/genentech:30022) are encoded as _ in the path; the original name is preserved in a JSON envelope stored as the parameter value.

API Endpoints

The ExoHub API provides CRUD operations for safe management:

MethodEndpointDescription
GET/api/safeGet all entries (names + types + values)
GET/api/safe/keysList entry names and types (no values)
PUT/api/safe/<key>Store or update a typed secret
DELETE/api/safe/<key>Delete a secret

All endpoints require JWT authentication. The user’s identity is resolved from the preferred_username claim.

ExoSafe Architecture

4. FAQ

Yes.

Yes.

No.

Yes.

I agree.

Request this feature by opening an issue on the project repository.