Skip to content

Craig saas improvements - #1511

Merged
sk-keeper merged 5 commits into
releasefrom
craig_saas_improvements
Jul 1, 2025
Merged

Craig saas improvements#1511
sk-keeper merged 5 commits into
releasefrom
craig_saas_improvements

Conversation

@craiglurey

Copy link
Copy Markdown
Contributor

Overview

This PR adds line continuation support to Keeper Commander CLI and provides comprehensive documentation for the record-add command.

Features Added

🔗 Line Continuation Support

  • Backslash (\) line continuation in CLI commands
  • Enhanced argument parsing with whitespace normalization
  • Robust copy-paste handling - filters empty fields from trailing spaces
  • Continuation prompt shows ... to indicate multi-line mode

📚 Comprehensive Documentation

  • Complete record-add documentation with 200+ examples
  • All record types covered: login, contact, bankCard, address, serverCredentials, sshKeys, etc.
  • Correct syntax examples: dot notation, $JSON:, $GEN, file attachments
  • Advanced features: password generation, TOTP, SSH key generation, self-destruct
  • Comparison with record-update command
  • Troubleshooting and best practices

Technical Changes

keepercommander/cli.py

  • Enhanced read_command_with_continuation() function
  • Improved whitespace handling and error resilience
  • Maintains backward compatibility

keepercommander/commands/record_edit.py

  • Added empty field filtering for both record-add and record-update
  • Prevents parsing errors from copy-paste whitespace issues

unit-tests/test_cli.py

  • Comprehensive test coverage for line continuation
  • Edge case testing for trailing spaces and empty lines

RECORD_ADD_DOCUMENTATION.md

  • Brand new comprehensive documentation file
  • Accurate examples based on actual command capabilities
  • Covers beginner to advanced use cases

User Experience Improvements

Fixed: Multi-line commands now work reliably
Fixed: Copy-paste from documentation no longer fails
Added: Clear visual feedback with continuation prompts
Added: Complete reference documentation
Added: Troubleshooting guide for common issues

Testing

  • All existing tests pass
  • New unit tests added for line continuation functionality
  • Manual testing confirmed copy-paste examples work correctly

Examples

Before (would fail):

record-add -t "Gmail Account" -rt login \ 
  login=john.doe@gmail.com \ 
  password=SecurePass123 \ 
  url=https://accounts.google.com

After (works perfectly):

record-add -t "Gmail Account" -rt login \
  login=john.doe@gmail.com \
  password=SecurePass123 \
  url=https://accounts.google.com

Documentation Coverage

  • Basic and advanced record creation examples
  • All supported record types with real-world scenarios
  • Password generation, TOTP, SSH keys, file attachments
  • Self-destructing records for one-time shares
  • Record-update vs record-add comparison
  • Field syntax reference and troubleshooting

- Modified SSL certificate detection to prefer system CA store over certifi bundle
- Added support for KEEPER_SSL_CERT_FILE environment variable for configuration
- Enables compatibility with corporate SSL inspection proxies like Zscaler
- Maintains backward compatibility with existing installations
- Includes automatic detection of system certificate paths on macOS and Linux

This resolves issues where GitHub API calls (and other HTTPS requests) would
fail in corporate environments that use SSL inspection proxies.
- Added ssl_aware_get() utility function that uses system CA certificates
- Updated all PAM SaaS direct requests.get() calls to use SSL-aware requests
- Fixes SSL errors with corporate proxies like Zscaler when downloading plugins
- Ensures consistent SSL certificate handling across all HTTP requests

This resolves SSL certificate verification errors when downloading SaaS catalog
and plugin files from GitHub objects.githubusercontent.com in corporate
environments with SSL inspection proxies.
- Updated SSL certificate selection to prefer Homebrew CA bundle on macOS
- Homebrew certificates (/opt/homebrew/etc/ca-certificates/cert.pem) work better
  with corporate SSL inspection proxies like Zscaler
- Fixes objects.githubusercontent.com SSL verification errors
- Maintains fallback to system certificates for non-Homebrew environments

This resolves the specific SSL certificate verification issues with GitHub asset
downloads in corporate environments using SSL inspection.
- Removed logging calls from utils.py that were interfering with main logging config
- Moved SSL certificate logging to after logging configuration is set up
- Changed warning messages to use stderr print instead of logging
- Prevents INFO:root messages from appearing in normal command output
- SSL certificate functionality remains unchanged

This resolves the issue where SSL certificate changes were causing unwanted
debug output to appear in normal command execution.
Features added:
- Line continuation support using backslash (\) in CLI commands
- Enhanced argument parsing with whitespace normalization
- Empty field filtering to handle copy-paste issues gracefully
- Comprehensive unit tests for line continuation functionality

Documentation improvements:
- Complete record-add command documentation with 200+ examples
- Covers all record types (login, contact, bankCard, etc.)
- Shows correct syntax: dot notation, $JSON:, $GEN, file attachments
- Includes record-update comparison and self-destruct features
- Provides troubleshooting and best practices

Technical details:
- Enhanced read_command_with_continuation() function in cli.py
- Added empty string filtering in record_edit.py commands
- Comprehensive test coverage for edge cases
- Handles trailing spaces and formatting issues from copy-paste

Fixes user experience issues with multi-line commands and provides
complete reference documentation for record management.
@sk-keeper
sk-keeper changed the base branch from master to release July 1, 2025 17:56
@sk-keeper
sk-keeper merged commit 22c9f69 into release Jul 1, 2025
@sk-keeper
sk-keeper deleted the craig_saas_improvements branch September 1, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants