Skip to main content
Loom supports multiple authentication methods to securely manage LDAP bind credentials.

Credential Methods Overview

Choose the method that best fits your security requirements:
MethodDescriptionBest For
PromptInteractive password entryAd-hoc connections, development
CommandExecute shell command for passwordIntegration with password managers
KeychainOS-native credential storageConvenience with system security
VaultLoom’s encrypted vaultPortable encrypted storage
The credential method is configured per connection profile. Different profiles can use different methods.

Prompt Method

The simplest method - Loom asks for the password when needed.

Configuration

[[connections]]
name = "My Server"
host = "ldap.example.com"
bind_dn = "cn=admin,dc=example,dc=com"
credential_method = "prompt"

Behavior

If connecting on startup, you’ll see a terminal password prompt:
Password for cn=admin,dc=example,dc=com: _
Type the password (hidden) and press Enter.

Environment Variable

Skip the prompt by setting LOOM_PASSWORD:
export LOOM_PASSWORD="your-password"
loom-ldapbrowser
Environment variables are visible to other processes and may be logged. Only use this for testing or in secure environments.

Command Method

Execute a shell command to retrieve the password. Works with any password manager or script.

Configuration

[[connections]]
name = "Production"
host = "ldap.example.com"
bind_dn = "cn=admin,dc=example,dc=com"
credential_method = "command"
password_command = "pass show ldap/prod"

How It Works

  1. Loom executes password_command via sh -c
  2. Reads the password from stdout
  3. Trims trailing newlines
  4. Uses the password for LDAP bind
The command must print only the password to stdout. Prompts, warnings, or extra output will cause authentication to fail.

Password Manager Examples

pass - the standard Unix password manager:
credential_method = "command"
password_command = "pass show ldap/production"
Retrieves the password from ~/.password-store/ldap/production.gpg.
Store the password with:
pass insert ldap/production

Keychain Method

Uses your operating system’s native credential storage.

Configuration

[[connections]]
name = "Production"
host = "ldap.example.com"
bind_dn = "cn=admin,dc=example,dc=com"
credential_method = "keychain"

Platform Support

Keychain AccessPasswords are stored in macOS Keychain with:
  • Service: loom
  • Account: Connection profile name (e.g., Production)
View/edit stored passwords:
  1. Open Keychain Access app
  2. Search for loom
  3. Double-click the entry to view/edit

Storing Passwords

On first connection with keychain method:
  1. Loom prompts for the password
  2. After successful authentication, asks: “Save password to keychain?”
  3. If you confirm, the password is stored
  4. Future connections retrieve it automatically
To update a stored password, delete the keychain entry manually and reconnect. Loom will prompt for the new password.

Vault Method

Loom’s built-in encrypted vault for portable, secure storage.

Configuration

Enable vault in general settings:
[general]
vault_enabled = true

[[connections]]
name = "Production"
host = "ldap.example.com"
bind_dn = "cn=admin,dc=example,dc=com"
credential_method = "vault"

Vault Setup

1

Enable Vault

Add to your config.toml:
[general]
vault_enabled = true
2

First Launch

On first launch with vault enabled, you’ll be prompted to create a master password:
Create vault master password: _
Confirm master password: _
Store this password safely! There is no password recovery. If forgotten, you’ll lose access to all vault credentials.
3

Store Credentials

When connecting to a profile with credential_method = "vault":
  1. Loom prompts for the bind password
  2. After successful bind, asks: “Store in vault?”
  3. Password is encrypted and stored
4

Future Connections

On subsequent launches:
  1. Loom prompts for vault master password (once per session)
  2. All vault credentials are decrypted and available

Vault Location

  • Linux/macOS: ~/.config/loom-ldapbrowser/vault.dat
  • Windows: %APPDATA%\loom-ldapbrowser\vault.dat
The vault file is encrypted with AES-256. Backup this file to preserve your stored credentials.

Command-Line Options

# Use custom vault location
loom-ldapbrowser --vault /path/to/vault.dat

# Provide master password via CLI (not recommended)
loom-ldapbrowser --vault-password "master-password"

# Provide via environment variable
export LOOM_VAULT_PASSWORD="master-password"
loom-ldapbrowser

Anonymous Bind

Connect without authentication by leaving bind_dn empty:
[[connections]]
name = "Public Server"
host = "ldap.example.com"
base_dn = "dc=example,dc=com"
# bind_dn is omitted
Anonymous access is often restricted. You may only see public entries or have limited search capabilities.

Security Best Practices

Production servers:
  • ✅ Use “keychain” or “vault” for persistent storage
  • ✅ Use “command” with a password manager
  • ❌ Avoid “prompt” with LOOM_PASSWORD env var
Development/testing:
  • ✅ Use “prompt” for temporary access
  • ✅ Use “command” if you have a password manager setup
Vault master password:
  • Choose a strong, unique password
  • Store in your personal password manager
  • Never share or commit to version control
  • There is no recovery mechanism
Password manager:
  • Use your password manager’s security features
  • Enable MFA/2FA if available
  • Keep the password manager locked when not in use
When sharing config.toml:Do:
credential_method = "prompt"  # Forces user to provide password
Don’t:
password = "plaintext-password"  # Never store passwords in config!
Loom does not support storing passwords in config.toml. Use credential methods instead.
For browsing/auditing:
bind_dn = "cn=readonly,dc=example,dc=com"
read_only = true
Limits damage if credentials are compromised.
Periodically update LDAP bind passwords:
  1. Change the password on the LDAP server
  2. Update stored credentials:
    • Keychain: Delete entry, reconnect to store new password
    • Vault: Reconnect, Loom will prompt and update
    • Command: Update the password in your password manager

Troubleshooting

macOS:
  • Open Keychain Access
  • Search for loom
  • Click “Access Control” tab
  • Add loom-ldapbrowser to allowed applications
Linux:
  • Ensure a Secret Service provider is running:
    ps aux | grep -E "gnome-keyring|kwallet"
    
  • Install if missing:
    # GNOME
    sudo apt install gnome-keyring
    
    # KDE
    sudo apt install kwalletmanager
    
Windows:
  • Run Loom with administrator privileges once to grant access
  • Check Windows Defender isn’t blocking credential access
If command method returns an error:
  1. Test the command manually:
    sh -c "pass show ldap/prod"
    
    Ensure it prints only the password
  2. Check command output:
    • No prompts or interactive input
    • No extra text or formatting
    • Command exits with status 0
  3. Check PATH: The command must be in Loom’s PATH. Use full paths if needed:
    password_command = "/usr/local/bin/pass show ldap/prod"
    
Unfortunately, there is no password recovery for the vault.Options:
  1. Delete vault.dat and start fresh (loses all stored passwords)
  2. Restore from backup if available
  3. Switch affected profiles to a different credential method
Vault encryption is intentionally unrecoverable without the master password.
If authentication fails despite stored credentials:
  1. Verify password is correct:
    • Delete stored credential
    • Reconnect with prompt method
    • Re-store if successful
  2. Check bind DN format:
    • OpenLDAP: cn=admin,dc=example,dc=com
    • Active Directory: [email protected] or DOMAIN\admin
  3. Check server logs:
    • Look for bind failures
    • Verify account isn’t locked

Method Comparison

FeaturePromptCommandKeychainVault
SecurityMediumHigh*HighHigh
ConvenienceLowHighHighHigh
PortabilityHighMediumLowMedium
Setup ComplexityNoneMediumLowLow
Cross-platformYesYesYes**Yes
Backup/SyncN/AExternalSystemManual
* Depends on password manager security
** Requires platform-specific credential store

Next Steps

Connection Profiles

Configure profiles with credential methods

Connecting

Connect to LDAP servers

Configuration

Complete configuration reference

TLS Modes

TLS connection modes and security

Build docs developers (and LLMs) love