34. FAQ
Frequently Asked Questions about wFabricSecurity.
35. General
What is wFabricSecurity?
wFabricSecurity is a Zero Trust Security System for Hyperledger Fabric that provides:
Cryptographic identity verification
Code integrity validation
Secure message signing and verification
Communication permission management
Rate limiting for DoS protection
Certificate caching for performance
What is Zero Trust?
Zero Trust is a security model that operates on the principle: “Never trust, always verify.”
In Zero Trust:
No participant is automatically trusted
Every request must be authenticated
Every transaction must be authorized
Continuous verification is required
Least privilege access is enforced
wFabricSecurity implements Zero Trust by verifying:
Identity via X.509 certificates
Code integrity via SHA-256 hashes
Message authenticity via ECDSA signatures
Permissions via access control lists
Why use wFabricSecurity?
wFabricSecurity is ideal for:
What are the system requirements?
36. Installation
How do I install wFabricSecurity?
Install via pip:
pip install wFabricSecurity
Or from source:
git clone https://github.com/wisrovi/wFabricSecurity.git
cd wFabricSecurity
pip install -e .
What are the dependencies?
Core Dependencies:
cryptography- For ECDSA signing and X.509 certificatesecdsa- Elliptic curve cryptographyrequests- HTTP client for Fabric gateway
Optional Dependencies:
hyperledger-fabric-gateway- For Fabric integrationsphinx- For documentation building
How do I verify the installation?
from wFabricSecurity import FabricSecurity
# Test basic import
print(f"Version: {FabricSecurity.__module__}")
# Run self-test
from wFabricSecurity.fabric_security.security.integrity import IntegrityVerifier
verifier = IntegrityVerifier()
print("✓ Installation verified!")
37. Security
How does code integrity verification work?
If hashes don’t match, code tampering is detected.
What hashing algorithm is used?
SHA-256 (Secure Hash Algorithm 256-bit)
Part of the SHA-2 family
Produces 256-bit (32-byte) hash
No known collision attacks
Used for code integrity and message integrity
What signing algorithm is used?
ECDSA (Elliptic Curve Digital Signature Algorithm)
Curve: secp256k1
Key size: 256 bits
Signature size: 64 bytes
Same algorithm as Bitcoin
How are private keys protected?
wFabricSecurity never stores private keys directly. Instead:
Can wFabricSecurity prevent all attacks?
wFabricSecurity provides strong security guarantees for:
However, security is a chain - it’s only as strong as the weakest link:
38. Hyperledger Fabric
What Fabric versions are supported?
Do I need a Fabric network to use wFabricSecurity?
No, wFabricSecurity works in two modes:
Standalone mode is useful for:
Development and testing
Offline scenarios
Gradual Fabric adoption
How do I configure the Fabric gateway?
from wFabricSecurity import FabricSecurity
security = FabricSecurity(
me="ParticipantName",
msp_path="/path/to/msp",
gateway_path="/path/to/connection-profile.yaml"
)
The gateway connection profile can be:
A file path (
.yamlor.json)A dictionary with connection details
Environment variable reference
What happens if Fabric is unavailable?
wFabricSecurity handles Fabric unavailability gracefully:
39. Performance
How fast is signature verification?
These are typical benchmarks on modern hardware.
Does certificate caching help?
Yes, significantly!
Default configuration:
identity = IdentityManager(
cache_size=1024, # 1024 certificates
ttl=3600 # 1 hour TTL
)
How do I tune performance?
For High Throughput:
security = FabricSecurity(
# Increase cache size
certificate_cache_size=4096,
certificate_ttl=7200, # 2 hours
# Reduce logging
log_level=logging.WARNING
)
For Development:
security = FabricSecurity(
# Use local storage instead of Fabric
use_local_storage=True,
# Smaller cache
certificate_cache_size=128
)
40. Troubleshooting
I’m getting “Permission Denied” errors
security.register_communication(
from_participant="CN=Master",
to_participant="CN=Slave",
direction=CommunicationDirection.BIDIRECTIONAL
)
# Master can send to Slave
security.register_communication(
"CN=Master", "CN=Slave",
CommunicationDirection.OUTBOUND # Master sends
)
# For bidirectional
security.register_communication(
"CN=Slave", "CN=Master",
CommunicationDirection.OUTBOUND # Slave sends back
)
print(security.get_permission_matrix())
Code integrity check is failing
security.register_code(
files=["updated.py"],
version="1.1.0",
store_on_ledger=True
)
security = FabricSecurity(
me="Dev",
msp_path="/path/to/msp",
skip_code_verification=True # Only for development!
)
Rate limiting is too restrictive
Adjust the rate limiter configuration:
security = FabricSecurity(
me="Master",
msp_path="/path/to/msp",
rate_limit=100, # 100 requests/second
rate_capacity=500 # Burst of 500
)
Or per-participant:
security.configure_rate_limit(
participant="CN=TrustedPartner",
rate=1000, # Higher limit
capacity=5000 # Larger burst
)
Can’t connect to Fabric gateway
ls -la /path/to/connection-profile.yaml
# Check gateway connectivity
from wFabricSecurity.fabric_security.fabric.gateway import FabricGateway
gw = FabricGateway(gateway_path="/path/to/profile")
gw.connect() # Will raise if invalid
telnet peer0.org1.example.com 7051
Certificate parsing errors
# Should show certificate info
openssl x509 -in /path/to/cert.pem -text -noout
msp/
├── cacerts/
├── signcerts/
└── keystore/
pip install --upgrade cryptography
41. Development
How do I contribute to wFabricSecurity?
git checkout -b feature/your-feature
pytest test/ -v
How do I run the tests?
# Install dev dependencies
pip install -e ".[dev]"
# Run all tests
pytest test/ -v
# Run with coverage
pytest test/ --cov=wFabricSecurity --cov-report=html
# Run specific test file
pytest test/test_crypto.py -v
How do I build the documentation?
# Install documentation dependencies
pip install -r docs/requirements.txt
# Build HTML docs
cd docs
make html
# View locally
open _build/html/index.html
42. Licensing
What license does wFabricSecurity use?
MIT License
You can:
You must:
Can I use wFabricSecurity in commercial products?
Yes, wFabricSecurity is MIT licensed, which is a permissive license that allows commercial use.
See the LICENSE file for details.
43. Support
Where can I get help?
How do I report bugs?
## Bug Description
[Clear description of the bug]
## Steps to Reproduce
1. [Step 1]
2. [Step 2]
3. [Step 3]
## Expected vs Actual Behavior
[What you expected]
[What actually happened]
## Environment
- OS: [Your OS]
- Python: [Version]
- wFabricSecurity: [Version]
Is there a community or chat?
See also
API Reference - Complete API documentation
Tutorials - Step-by-step implementation guides
Architecture - System architecture details
Glossary - Terms and definitions