Skip to main content

No project description provided

Project description

Keeper PAM WebRTC for Python

A secure, stable, and high-performance Tube API for Python, providing WebRTC-based secure tunneling with enterprise-grade security and reliability optimizations.

Core Values

Security • Stability • Performance - Built for Keeper Security's mission-critical applications:

  • 🔒 Security First: Memory-safe Rust implementation with comprehensive bounds checking
  • 🛡️ Enterprise Stability: Lock-free architecture eliminates race conditions and deadlocks
  • ⚡ Optimized Performance: Advanced optimizations deliver exceptional speed when you need it
  • 🔧 Production Ready: Zero-configuration reliability for demanding security applications

Description

keeper-pam-webrtc-rs provides Python bindings to a Rust-based Tube API for secure communication, designed for:

  • Secure tunneling via WebRTC data channels with memory-safe operations
  • Multi-connection management through tube abstractions
  • Reliable peer connection handling with comprehensive error handling
  • Efficient channel management for different communication patterns
  • Cross-platform compatibility (Linux, macOS, Windows, Alpine)
  • Mission-critical reliability for security-focused applications

This package is designed to be used with Keeper Gateway and Keeper Commander. It provides a secure, reliable tube-based communication system built on WebRTC, specifically tailored for Keeper Security's internal products and security-critical tunneling use cases.

Note: This package is intended for internal Keeper Security products and is not being actively advertised for general use.

Installation

pip install keeper-pam-webrtc-rs

Usage

import keeper_pam_webrtc_rs

# Create a tube registry
registry = keeper_pam_webrtc_rs.PyTubeRegistry()

# Define a signal callback for WebRTC events
def on_signal(signal_dict):
    print(f"Received signal: {signal_dict}")
    # Handle ICE candidates, connection state changes, etc.

# Create a server-side tube for tunneling
server_result = registry.create_tube(
    conversation_id="tunnel-session-123",
    settings={
        "conversationType": "tunnel",
        "target_host": "127.0.0.1", 
        "target_port": "22"  # SSH tunnel example
    },
    trickle_ice=True,
    callback_token="server-token",
    ksm_config="server-config",
    signal_callback=on_signal
)

# Get the offer SDP to send to the client
server_offer = server_result['offer']
server_tube_id = server_result['tube_id']

# Create a client-side tube with the offer
client_result = registry.create_tube(
    conversation_id="tunnel-client-123", 
    settings={
        "conversationType": "tunnel",
        "target_host": "192.168.1.100",
        "target_port": "22"
    },
    trickle_ice=True,
    callback_token="client-token", 
    ksm_config="client-config",
    offer=server_offer,  # Use server's offer
    signal_callback=on_signal
)

# Get the answer SDP to send back to server
client_answer = client_result['answer']
client_tube_id = client_result['tube_id']

# Set the remote description on the server
registry.set_remote_description(server_tube_id, client_answer, is_answer=True)

# Check connection state
state = registry.get_connection_state(server_tube_id)
print(f"Connection state: {state}")

# Close when done
registry.close_tube(server_tube_id)
registry.close_tube(client_tube_id)

Features

  • 🔒 Memory Safety: Rust-powered implementation prevents buffer overflows and memory corruption
  • 🛡️ Reliable Architecture: Lock-free design eliminates race conditions and ensures stability
  • ⚡ Efficient Performance: Optimized for speed without compromising security or stability
  • 🌊 Tube Abstraction: High-level API for managing WebRTC-based secure tunnels
  • 🌍 Cross-Platform: Secure, consistent behavior across Linux, macOS, Windows, Alpine
  • 🐍 Python Integration: Built with abi3 for maximum compatibility (Python 3.7+)
  • 🔧 Production Hardened: Comprehensive error handling and graceful degradation

Tube API Architecture

This implementation provides a Tube-based abstraction over WebRTC:

Security Features

  • Memory-Safe Operations: Rust's ownership system prevents common security vulnerabilities
  • Bounds Checking: Comprehensive validation prevents buffer overflows and data corruption
  • Zero Unsafe Code: Hot paths use only verified, safe Rust code (except vetted SIMD intrinsics)
  • Graceful Error Handling: Robust error recovery prevents crashes and data leaks

Tube Management

  • Multi-Connection Support: Each tube can manage multiple WebRTC connections
  • Channel Abstraction: High-level channel management for different protocols
  • State Management: Comprehensive connection state tracking and reporting
  • Signal Handling: Event-driven architecture for ICE candidates and state changes

Performance Features

  • SIMD Optimization: Hardware-accelerated frame parsing with safe fallbacks
  • Zero-Copy Pipelines: Efficient data handling minimizes memory overhead
  • Event-Driven Design: Native WebRTC events provide responsive communication
  • Always Optimized: Maximum efficiency by default, no configuration required

Tube API Reference

Core Methods

  • create_tube(conversation_id, settings, ...) - Create a new secure tube or add conversation to existing tube
  • set_remote_description(tube_id, sdp, is_answer) - Set remote SDP description
  • add_ice_candidate(tube_id, candidate) - Add ICE candidate for connection
  • get_connection_state(tube_id) - Get current connection state
  • close_connection(connection_id) - Close specific connection
  • close_tube(tube_id) - Close entire tube

Conversation Types

The tube API supports different communication patterns:

  • tunnel - Secure TCP tunneling through WebRTC
  • guacd - Apache Guacamole protocol tunneling
  • socks5 - SOCKS5 proxy tunneling

Build & Verification

To build and verify the implementation:

# Standard build (all optimizations enabled)
cargo build --release

# Run comprehensive test suite
cargo test --release

# Optional: Enable debug logging for troubleshooting
cargo build --release --features production_debug

Why This Implementation?

Built specifically for Keeper Security's tunneling requirements:

  • Security-First Design: Memory safety and comprehensive validation prevent vulnerabilities
  • Mission-Critical Reliability: Lock-free architecture ensures stable operation under load
  • Optimized for Security Applications: Performance optimizations that don't compromise security
  • Tube Abstraction: High-level API designed specifically for secure tunneling use cases

The secure, stable, high-performance tube communication system for enterprise security applications.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

keeper_pam_webrtc_rs-0.2.14-cp37-abi3-win_amd64.whl (7.2 MB view details)

Uploaded CPython 3.7+Windows x86-64

keeper_pam_webrtc_rs-0.2.14-cp37-abi3-musllinux_1_2_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ x86-64

keeper_pam_webrtc_rs-0.2.14-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

keeper_pam_webrtc_rs-0.2.14-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.4 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

keeper_pam_webrtc_rs-0.2.14-cp37-abi3-macosx_11_0_arm64.whl (7.6 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

keeper_pam_webrtc_rs-0.2.14-cp37-abi3-macosx_10_7_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.7+macOS 10.7+ x86-64

File details

Details for the file keeper_pam_webrtc_rs-0.2.14-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for keeper_pam_webrtc_rs-0.2.14-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2b03a830e67eb3d6775fd63583eb373adbc7c0d3b207e5da08adc87caf0a13e5
MD5 5727142dfd3b672642b89f48ee6bd328
BLAKE2b-256 3e1cdcfb06627d72ccf5942bcc0694eeee7cc27f15ce0711444af03ee2098aeb

See more details on using hashes here.

File details

Details for the file keeper_pam_webrtc_rs-0.2.14-cp37-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for keeper_pam_webrtc_rs-0.2.14-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5e26426de184d2ac2b79f8151e14acc049cce5a1b7dd60e5affb7eeb1a844bc0
MD5 67c61a8adb19634b9b0dd0bf27fab7c4
BLAKE2b-256 4f81aee4cbefc4163a135d9119fcc84e02c4e07e8fbba434462285a065e730ee

See more details on using hashes here.

File details

Details for the file keeper_pam_webrtc_rs-0.2.14-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for keeper_pam_webrtc_rs-0.2.14-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c8498b1f59dff8d2c9b335a4112af696d69c8f326aae692a4ca83a970e9f086e
MD5 0b9587b7e0d93d7d18c41020182039aa
BLAKE2b-256 bb95f1ccf929a724ea3b3f6a3b8038473d189f93758164cab4a751a36a5ec1c4

See more details on using hashes here.

File details

Details for the file keeper_pam_webrtc_rs-0.2.14-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for keeper_pam_webrtc_rs-0.2.14-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b89be86971318d35b86d4622edc726936f03cbd7a149a08478279b7cd299974e
MD5 fc5fff7ca33139b75df841d8569c7d6f
BLAKE2b-256 98ef57f9eb36bf2c4e301e488adc32533e3df42b5a8356b07b2804f0196805a7

See more details on using hashes here.

File details

Details for the file keeper_pam_webrtc_rs-0.2.14-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for keeper_pam_webrtc_rs-0.2.14-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 46542212efc1325aeac2bbe816c45970f21844a84a80d0e216c86f8966f3ceda
MD5 7738e8236febdbc4f8a48054ff833f72
BLAKE2b-256 3823a97f4fe9ef50d77b70695662e11986db29f6d869454e8c0a47e26fa1d2e8

See more details on using hashes here.

File details

Details for the file keeper_pam_webrtc_rs-0.2.14-cp37-abi3-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for keeper_pam_webrtc_rs-0.2.14-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 24726a011545fa64c69c906ec20fb5f0cbed2202e4ff21096e3aa6f2c1397072
MD5 fac859c8f8f73319e1da5c9e83a04f5c
BLAKE2b-256 f804ef40a7095063fc704246f1f4fcb70108c2a39afdc34db4293f1b87eeb2ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page