78 lines
2.4 KiB
Markdown
78 lines
2.4 KiB
Markdown
|
|
# Nushell Plugins Integration (v1.0.0) - See detailed guide for complete reference
|
||
|
|
|
||
|
|
For complete documentation on Nushell plugins including installation, configuration, and advanced usage, see:
|
||
|
|
|
||
|
|
- **Complete Guide**: [Plugin Integration Guide](plugin-integration-guide.md) (1500+ lines)
|
||
|
|
- **Quick Reference**: [Nushell Plugins Guide](nushell-plugins-guide.md)
|
||
|
|
|
||
|
|
## Overview
|
||
|
|
|
||
|
|
Native Nushell plugins eliminate HTTP overhead and provide direct Rust-to-Nushell integration for critical platform operations.
|
||
|
|
|
||
|
|
### Performance Improvements
|
||
|
|
|
||
|
|
| Plugin | Operation | HTTP Latency | Plugin Latency | Speedup |
|
||
|
|
|--------|-----------|--------------|----------------|---------|
|
||
|
|
| **nu_plugin_kms** | Encrypt (RustyVault) | ~50 ms | ~5 ms | **10x** |
|
||
|
|
| **nu_plugin_kms** | Decrypt (RustyVault) | ~50 ms | ~5 ms | **10x** |
|
||
|
|
| **nu_plugin_orchestrator** | Status query | ~30 ms | ~1 ms | **30x** |
|
||
|
|
| **nu_plugin_auth** | Verify session | ~50 ms | ~10 ms | **5x** |
|
||
|
|
|
||
|
|
### Three Native Plugins
|
||
|
|
|
||
|
|
1. **Authentication Plugin (nu_plugin_auth)**
|
||
|
|
- JWT login/logout with password prompts
|
||
|
|
- MFA enrollment (TOTP, WebAuthn)
|
||
|
|
- Session management
|
||
|
|
- OS-native keyring integration
|
||
|
|
|
||
|
|
2. **KMS Plugin (nu_plugin_kms)**
|
||
|
|
- Multiple backend support (RustyVault, Age, Cosmian, AWS KMS, Vault)
|
||
|
|
- 10x faster encryption/decryption
|
||
|
|
- Context-based encryption (AAD support)
|
||
|
|
|
||
|
|
3. **Orchestrator Plugin (nu_plugin_orchestrator)**
|
||
|
|
- Direct file-based operations (no HTTP)
|
||
|
|
- 30-50x faster status queries
|
||
|
|
- KCL workflow validation
|
||
|
|
|
||
|
|
## Quick Commands
|
||
|
|
|
||
|
|
```nushell
|
||
|
|
# Authentication
|
||
|
|
auth login admin
|
||
|
|
auth verify
|
||
|
|
auth mfa enroll totp
|
||
|
|
|
||
|
|
# KMS Operations
|
||
|
|
kms encrypt "data"
|
||
|
|
kms decrypt "vault:v1:abc123..."
|
||
|
|
|
||
|
|
# Orchestrator
|
||
|
|
orch status
|
||
|
|
orch validate workflows/deploy.ncl
|
||
|
|
orch tasks --status running
|
||
|
|
```
|
||
|
|
|
||
|
|
## Installation
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cd provisioning/core/plugins/nushell-plugins
|
||
|
|
cargo build --release --all
|
||
|
|
|
||
|
|
# Register with Nushell
|
||
|
|
plugin add target/release/nu_plugin_auth
|
||
|
|
plugin add target/release/nu_plugin_kms
|
||
|
|
plugin add target/release/nu_plugin_orchestrator
|
||
|
|
```
|
||
|
|
|
||
|
|
## Benefits
|
||
|
|
|
||
|
|
✅ **10x faster KMS operations** (5 ms vs 50 ms)
|
||
|
|
✅ **30-50x faster orchestrator queries** (1 ms vs 30-50 ms)
|
||
|
|
✅ **Native Nushell integration** with data structures and pipelines
|
||
|
|
✅ **Offline capability** (KMS with Age, orchestrator local ops)
|
||
|
|
✅ **OS-native keyring** for secure token storage
|
||
|
|
|
||
|
|
See [Plugin Integration Guide](plugin-integration-guide.md) for complete information.
|