Skip to content
f5devcentralPublic

About

Go CLI for F5 MyF5 Support Cases, Software Downloads, iHealth QKView Diagnostics, and BIG-IP/BIG-IQ Appliance Operations

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

9 Commits

Folders and files

myf5-cli

A high-performance, memory-safe, zero-dependency Go CLI and client library for MyF5 Cloud APIs, Software Downloads, iHealth Diagnostics, BIG-IP TMOS Appliances, and BIG-IQ Centralized Management.

Important

DISCLAIMER: This project is a community-maintained tool authored and maintained by Greg Robinson and is NOT covered by an official F5 Technical Support SLA.

API ENTITLEMENT PREREQUISITE: While this CLI source code is open source, the MyF5 API itself is not publicly open. Using MyF5 Cloud API commands (downloads, cases) requires F5 to enable API support on your customer account and issue account-specific OAuth2 credentials (F5_CLIENT_ID and F5_CLIENT_SECRET). Direct appliance commands (bigip, bigiq, push, pull, geoip) and ihealth operate independently with your appliance or iHealth credentials.


Key Highlights

  • Memory-Safe & Statically Compiled: Compiles to a single static binary with zero external runtime dependencies (CGO_ENABLED=0).
  • Wire-Speed Multi-GB Streaming: Streams 2.5 GB – 10+ GB BIG-IP ISOs, OVAs, and qcow2 images directly to disk using io.TeeReader with simultaneous SHA-256 verification and minimal RAM footprint (< 10 MB).
  • Direct Appliance Push & Pull Engine: First-class parity across BIG-IP TMOS (myf5 bigip) and BIG-IQ Centralized Management (myf5 bigiq), plus unified top-level commands (ready, info, serial, qkview, push, pull, geoip) with --target auto|bigip|bigiq and automatic seamless failover between iControl REST chunked transfer (512 KiB upload / 1 MiB download chunks over HTTPS) and verified native Go SCP streaming (64 KiB chunks over SSH).
  • End-to-End Download & Deploy: Downloads an image from MyF5 (delivered via signed AWS CloudFront *.cloudfront.net CDN URLs), cryptographically verifies its SHA-256 checksum, and immediately pushes it to target appliances in a single atomic pipeline (myf5 downloads get ... --push <host>).
  • Automated GeoIP Deployment Engine (BIG-IP Only): Downloads, stages to /shared/tmp, unpacks .rpm packages into /shared/GeoIP via rpm2cpio | cpio -idmv, installs, and reloads MaxMind/Digital Envoy GeoIP databases via tmsh load sys geoip (per K11176) in a single atomic pipeline (myf5 geoip or myf5 downloads get ... --apply-geoip). Automatically rejected on BIG-IQ.
  • Outbound Corporate & Lab Proxy Support: Universal support for HTTP, HTTPS, SOCKS5, and SOCKS5h proxies via --proxy or standard environment variables (ALL_PROXY, HTTPS_PROXY, HTTP_PROXY, NO_PROXY). Includes proxy configuration command myf5 proxy and connectivity probe myf5 doctor.
  • Interactive Case Creation Wizard: Step-by-step TUI wizard (myf5 wizard) and CLI flags (--from-appliance, --from-device, --from-bigip, --from-bigiq) with automatic serial and version discovery from live BIG-IP / BIG-IQ appliances or offline .qkview files, interactive multiline text buffer (:u/:undo, :p/:show, :e/:edit, :b/:back), and dry-run safety gates.
  • Machine-Readable --json Output: Structured JSON output across cases (list, get, comment, metadata), ihealth (list, upload), info (myf5 info, myf5 bigip info, myf5 bigiq info), serial (myf5 serial, myf5 bigip serial, myf5 bigiq serial), push (myf5 push, myf5 bigip push, myf5 bigiq push), and geoip (myf5 geoip, myf5 bigip geoip).
  • Signal Handling & Interruption Safety: Comprehensive trap for SIGINT (Ctrl+C) and SIGTERM across all commands; ensures partial .part downloads are pruned, active SSH channels and TCP sockets are closed gracefully, and no orphaned processes linger.
  • MyF5 Downloads API Client: Targets api.software.downloads.f5.com over the /v1/downloads-management/v1/... gateway route with automatic fallback and HTTP 429 rate-limit backoff.
  • Two-Tier Zero-Secret CLI Security: Tier 1 (pkg/auth.CheckNoCLISecrets on os.Args[1:]) blocks all 22 global secret flags with exit code 2 before command dispatch; Tier 2 (cmd/myf5.rejectSecretFlag) blocks --pass, -P, and --ssh-passphrase with exit code 1 in appliance flag parsers.
  • SSH known_hosts & TLS Hardening: Pre-authentication OpenSSH known_hosts verification (--known-hosts, --push-known-hosts, BIGIP_KNOWN_HOSTS, BIGIQ_KNOWN_HOSTS, MYF5_SSH_KNOWN_HOSTS, MYF5_STRICT_HOST_KEY_CHECKING=1), PQC hybrid TLS 1.2–1.3 (X25519MLKEM768), strict appliance TLS (MYF5_STRICT_APPLIANCE_TLS=1), and custom root CA bundle loading (MYF5_CA_BUNDLE, SSL_CERT_FILE).
  • Multiple Credential Formats: Automatically discovers credentials in F5_CLIENT_ID / F5_CLIENT_SECRET (and dedicated IHEALTH_CLIENT_ID / IHEALTH_CLIENT_SECRET) environment variables or ~/.f5api_credentials (both KEY=VALUE and [profile] INI formats).
  • Interactive Console & REPL: Menu-driven terminal TUI for catalog exploration (myf5 downloads browse) and interactive CLI shell (myf5 interactive), with NO_COLOR support for disabling ANSI color sequences.
  • Universal Appliance Connectivity: Seamlessly supports standard LAN management IPs (10.1.1.4), custom management ports (:8443), and cloud/UDF access proxies (https://*.access.udf.f5.com).

Architecture & Directory Layout

myf5-cli/
β”œβ”€β”€ cmd/
β”‚   └── myf5/
β”‚       β”œβ”€β”€ main.go             # Unified CLI entrypoint, flag parsing, signal handling
β”‚       β”œβ”€β”€ wizard.go           # Interactive case creation wizard & multiline text editor
β”‚       β”œβ”€β”€ interactive.go      # Interactive console REPL and catalog browser
β”‚       └── selector.go         # Terminal menu selector and download confirmation TUI
β”œβ”€β”€ pkg/
β”‚   β”œβ”€β”€ auth/                   # OAuth2 authentication, Zero-Secret validator, credentials resolver
β”‚   β”œβ”€β”€ client/                 # Secure TLS 1.2+ HTTP transport, SOCKS5/HTTP proxy dialer, timeouts
β”‚   β”œβ”€β”€ downloads/              # Downloads API catalog client and streaming downloader
β”‚   β”œβ”€β”€ cases/                  # MyF5 Support Case API client & metadata schema
β”‚   β”œβ”€β”€ ihealth/                # F5 iHealth QKView multipart upload and status client
β”‚   β”œβ”€β”€ bigip/                  # BIG-IP & BIG-IQ client (iControl REST chunking, bash promotion, native SCP, failover)
β”‚   β”‚   β”œβ”€β”€ client.go           # Appliance HTTP client, readiness, QKView automation, REST download
β”‚   β”‚   β”œβ”€β”€ info.go             # TMOS system, platform, and chassis serial inspection
β”‚   β”‚   β”œβ”€β”€ upload.go           # iControl REST chunked file transfer & bash promotion
β”‚   β”‚   β”œβ”€β”€ scp.go              # Native Go SCP streaming (upload & download) over SSH
β”‚   β”‚   β”œβ”€β”€ geoip.go            # TMOS GeoIP extraction, RPM installation, and reload engine
β”‚   β”‚   β”œβ”€β”€ lifecycle.go        # TMOS software (K5903) and hardware (K4309 / K13144) lifecycle evaluation
β”‚   β”‚   └── failover.go         # Dual-protocol automatic failover engine
β”‚   β”œβ”€β”€ logger/                 # Structured audit & debug logging with automatic secret scrubbing
β”‚   └── progress/               # Terminal progress bar and spinner rendering
β”œβ”€β”€ scripts/
β”‚   └── gen-sbom.sh             # CycloneDX 1.5 SBOM generator with SPDX license metadata
β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ workflows/              # GitHub Actions CI, Release, and Security workflows
β”‚   β”œβ”€β”€ ISSUE_TEMPLATE/         # Structured Bug Report & Feature Request templates
β”‚   β”œβ”€β”€ CODEOWNERS              # Repository ownership mappings
β”‚   └── pull_request_template.md
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ how-it-works.html       # Interactive architecture, protocol, and CLI visual reference
β”‚   β”œβ”€β”€ cli.md                  # Comprehensive CLI reference manual
β”‚   β”œβ”€β”€ appliance_push.md       # Appliance software deployment, hotfix, and GeoDB push guide
β”‚   β”œβ”€β”€ downloads.md            # Downloads catalog taxonomy, GeoDB automation & direct push
β”‚   β”œβ”€β”€ credentials.md          # Zero-Secret policy & credential management
β”‚   └── network_and_firewall.md # Egress firewall rules, proxy routing, and cloud endpoint architecture
β”œβ”€β”€ Makefile                    # Developer build, test, and release automation
β”œβ”€β”€ SECURITY.md                 # Security & vulnerability reporting policy
β”œβ”€β”€ CONTRIBUTING.md             # Developer workflow & coding standards
β”œβ”€β”€ CONTRIBUTING_AI.md          # Rules for AI assistants β€” this tool writes to live F5 Support
β”œβ”€β”€ LICENSE                     # Apache License 2.0
β”œβ”€β”€ go.mod
└── README.md

Installation & Building

Pre-Compiled Binaries

Download pre-built standalone binaries for Linux, macOS, and Windows from the GitHub Releases page.

Developer Build with GNU Make

# Clone the repository
git clone https://github.com/f5devcentral/myf5-cli.git
cd myf5-cli

# Build for host OS & architecture
make build

# Run full quality test suite (race detection, formatting, vet)
make test

# Build cross-platform distribution binaries
make cross-compile

Credential Configuration

In accordance with the Zero-Secret CLI Policy, secret flags are prohibited on the command line. Provide credentials using either method:

Important

Don't have a client_id and client_secret yet? They are issued from MyF5, but only after your account is granted API Catalog access. In short: log in at my.f5.com, request API Catalog access from F5 Support, then create an API key once the grant lands. Full steps are in Obtaining API Credentials.

1. ~/.f5api_credentials (Recommended for Local Dev)

Create ~/.f5api_credentials with mode 0600:

username=your.email@f5.com
client_id=your_oauth2_client_id
client_secret=your_oauth2_client_secret

Or with profiles:

[default]
client_id = your_oauth2_client_id
client_secret = your_oauth2_client_secret

[production]
client_id = prod_oauth2_client_id
client_secret = prod_oauth2_client_secret

2. Environment Variables (Recommended for CI/CD)

# MyF5 Cloud API credentials (audience=api://ciam-api-myf5, scope=myf5_scope)
export F5_CLIENT_ID="your_oauth2_client_id"
export F5_CLIENT_SECRET="your_oauth2_client_secret"
export F5_API_KEY="optional_api_usage_key_override"

# Dedicated iHealth API credentials (audience=api://ciam-api-ihealth, empty scope per K000130498)
export IHEALTH_CLIENT_ID="your_ihealth_client_id"
export IHEALTH_CLIENT_SECRET="your_ihealth_client_secret"

# Appliance credentials & host pinning
export BIGIP_USER="admin"
export BIGIP_PASSWORD="YourAppliancePassword"
export BIGIQ_USER="admin"
export BIGIQ_PASSWORD="YourAppliancePassword"

# Optional SSH host-key & TLS verification controls
export MYF5_SSH_KNOWN_HOSTS="$HOME/.ssh/known_hosts"
export MYF5_STRICT_HOST_KEY_CHECKING=1
export MYF5_STRICT_APPLIANCE_TLS=1
export MYF5_CA_BUNDLE="/path/to/custom-ca-bundle.pem"

CLI Usage Guide

Machine-Readable JSON Output (--json): Structured JSON output is supported across cases (list, get, comment, metadata), ihealth (list, upload), info (myf5 info, myf5 bigip info, myf5 bigiq info), serial (myf5 serial, myf5 bigip serial, myf5 bigiq serial), push (myf5 push, myf5 bigip push, myf5 bigiq push), and geoip (myf5 geoip, myf5 bigip geoip).

1. Diagnostic Doctor

Verify API credentials, DNS resolution, and TCP port 443 egress to all 8 F5 Cloud endpoints:

./bin/myf5 doctor

2. MyF5 Software Downloads & Catalog

# Interactive menu browser (set NO_COLOR=1 to disable ANSI color output)
./bin/myf5 downloads browse

# List available product families
./bin/myf5 downloads families

# List product lines (e.g. big-ip_v17.x)
./bin/myf5 downloads lines BIG-IP

# List release versions and containers
./bin/myf5 downloads versions BIG-IP big-ip_v17.x

# List container categories for a version
./bin/myf5 downloads containers BIG-IP big-ip_v17.x 17.1.1

# List downloadable files for a version
./bin/myf5 downloads files BIG-IP big-ip_v17.x 17.1.1

# Download software image with wire-speed streaming and live progress bar
./bin/myf5 downloads get BIG-IP big-ip_v17.x 17.1.1 "Virtual Edition" BIGIP-17.1.1-0.0.6.ALL.qcow2.tar.gz -o /var/tmp/bigip.qcow2.tar.gz

# Download and push directly to BIG-IP or BIG-IQ appliance in one step
./bin/myf5 downloads get BIG-IP big-ip_v17.x 17.1.1 "Base Software & ISO Releases" BIGIP-17.1.1-0.0.6.iso \
    -o /var/tmp/BIGIP-17.1.1.iso \
    --push 10.1.1.4 \
    --push-target bigip \
    --push-method icontrol \
    --push-dest /shared/images \
    --push-known-hosts ~/.ssh/known_hosts

3. MyF5 Support Cases

# List open cases (add --all to include closed ones, --json for machine-readable output)
./bin/myf5 cases list
./bin/myf5 cases list --all --json

# Retrieve case creation schema metadata (products, versions, priorities, timezones)
./bin/myf5 cases metadata --json

# Show one case in full, including contacts and the email thread
./bin/myf5 cases get 01234567
./bin/myf5 cases get 01234567 --json

# Add a note or comment to a case (supports interactive multiline editor with :u/:undo, :p/:show, :e/:edit)
# Case numbers are 8 digits, no prefix - exactly as MyF5 displays them.
./bin/myf5 cases comment 01234567 "Investigating packet captures." --json
# Or launch multiline buffer:
./bin/myf5 cases comment 01234567

# Open a case. The API requires an entitlement identifier validated against F5
# support records: BIG-IP, BIG-IQ, and hardware families use --serial; NGINX and Aspen Mesh
# use --subscription. (To open a case without an entitlement identifier, use the
# MyF5 web portal; see docs/cli.md for details.)
# Supports --from-appliance, --from-device, --from-bigip, and --from-bigiq to auto-populate
# product family, product, version, serial, and hostname from a live device or .qkview.
# Use --dry-run first to check the payload without calling the API.
./bin/myf5 cases create --family BIG-IP --product "BIG-IP LTM" \
  --version 17.5.1 --serial ABC1234 \
  --subject "SSL handshake failures" --description "Details here." \
  --priority "4 - General Assistance" --reason "General Problem" \
  --email you@example.com \
  --timezone "(GMT -5:00) US/Eastern - Eastern Standard Time"

# Or auto-populate from a live BIG-IP / BIG-IQ or local .qkview file:
./bin/myf5 cases create --from-appliance 10.1.1.4 \
  --subject "SSL handshake failures" --description "Details here." \
  --priority "4 - General Assistance" --reason "General Problem" \
  --email you@example.com \
  --timezone "(GMT -5:00) US/Eastern - Eastern Standard Time" --dry-run

# Alternatively, launch the interactive step-by-step case creation wizard.
# Step 1 auto-detects both BIG-IP and BIG-IQ (ProductFamily: "BIG-IQ",
# Product: "BIG-IQ Centralized Management") from live appliances or .qkview files:
./bin/myf5 cases wizard
# Or top-level shortcut:
./bin/myf5 wizard

4. F5 iHealth

# List previously uploaded QKViews
./bin/myf5 ihealth list
./bin/myf5 ihealth list --json

# Upload a local QKView bundle to iHealth, optionally attaching it to a case
./bin/myf5 ihealth upload /path/to/appliance.qkview "01234567" "Initial triage bundle" --json

5. BIG-IP Appliance Management & Image Transfer (Auto Failover)

Works with local management IPs, lab appliances, or cloud/UDF external access proxies with automatic failover between iControl REST (512 KiB upload / 1 MiB download chunks) and verified 64 KiB SCP.

# Check TMOS readiness (exits 0 when READY, 1 when NOT READY or on error)
./bin/myf5 bigip ready 10.1.1.4

# Check TMOS readiness (via UDF or Cloud Access Proxy)
./bin/myf5 bigip ready https://00000000-0000-0000-0000-000000000000.access.udf.f5.com/

# Inspect appliance version, edition, build, and serial (supports live host or offline .qkview)
./bin/myf5 bigip info 10.1.1.4 --user admin --json
./bin/myf5 bigip info /var/tmp/support.qkview --json

# Retrieve chassis/system serial number (supports live host or offline .qkview)
./bin/myf5 bigip serial 10.1.1.4 --user admin --json

# Trigger full, non-truncating QKView generation (-s0) with resilient download
./bin/myf5 bigip qkview 10.1.1.4 --user admin --known-hosts ~/.ssh/known_hosts

# Push software ISO to BIG-IP /shared/images with automatic failover (default)
./bin/myf5 bigip push 10.1.1.4 /var/tmp/BIGIP-17.1.1.iso --dest /shared/images --json

# Push engineering hotfix via native Go SCP over SSH with known_hosts verification
./bin/myf5 bigip push 10.1.1.4 /var/tmp/Hotfix-BIGIP-17.1.1.1.0.0.2-ENG.iso --method scp -i ~/.ssh/f5_key --known-hosts ~/.ssh/known_hosts

# Pull/download software image or QKView from BIG-IP appliance
./bin/myf5 bigip download 10.1.1.4 /shared/images/BIGIP-17.1.1.iso -o ./BIGIP-17.1.1.iso
./bin/myf5 bigip pull 10.1.1.4 /var/tmp/qkviews/support.qkview -o ./support.qkview

# Push and activate GeoIP database archive in one step (BIG-IP only)
./bin/myf5 bigip push 10.1.1.4 /var/tmp/ip-geolocation-default.zip --apply-geoip --json
# Or invoke direct GeoIP installer
./bin/myf5 bigip geoip 10.1.1.4 /var/tmp/ip-geolocation-default.zip --json

6. BIG-IQ Centralized Management & Image Transfer

First-class parity with myf5 bigip across ready, info, serial, qkview, push, pull, and download:

  • Token Authentication: Authenticates via POST /mgmt/shared/authn/login with {"username":"...","password":"..."} (omitting loginProviderName per BIG-IQ REST API schema, with automatic fallback if required), refreshes tokens within 5 minutes of expiry via POST /mgmt/shared/authn/exchange, and stops immediately after 1 failed login attempt (loginFailedErr) to prevent appliance account lockout.
  • Readiness Probes: When /mgmt/tm/sys/ready returns 403/404 on BIG-IQ, ready automatically probes /mgmt/shared/echo, /mgmt/cm/system/machineid-resolver, and /mgmt/shared/failover-state (exiting 0 when READY and 1 when NOT READY or on error).
  • System Info & Serial: Queries /mgmt/shared/identified-devices/config/device-info and /mgmt/shared/resolver/device-groups/cm-shared-all-big-iqs/devices, keeping hardware ChassisSerialNumber (serialNumber) distinct from UUID machineId.
  • Upload, Download & QKView: Streams .iso images to /mgmt/cm/autodeploy/software-image-uploads/<filename>, fails over (or routes directly for non-ISO paths like /var/tmp) to verified 64 KiB SCP when webd blocks /mgmt/tm/util/bash (403 Forbidden), supports single-response 200 OK and 1 MiB HTTP Range downloads from /mgmt/shared/file-transfer/downloads/, and routes qkview directly to SSH/SCP (/var/tmp) when REST QKView endpoints are restricted.
# Check BIG-IQ management plane readiness (exits 0 when READY, 1 when NOT READY)
./bin/myf5 bigiq ready 192.0.2.50

# Inspect BIG-IQ system version, edition, build, and serial (live host or offline .qkview)
./bin/myf5 bigiq info 192.0.2.50 --user admin --json

# Retrieve BIG-IQ chassis/system serial number (live host or offline .qkview)
./bin/myf5 bigiq serial 192.0.2.50 --user admin --json

# Generate and retrieve diagnostic QKView from BIG-IQ
./bin/myf5 bigiq qkview 192.0.2.50 --user admin --known-hosts ~/.ssh/known_hosts

# Push software ISO to BIG-IQ central repository (auto failover)
./bin/myf5 bigiq push 192.0.2.50 /var/tmp/BIGIP-17.1.1.iso --dest /shared/images --json

# Pull/download software ISO or QKView from BIG-IQ repository
./bin/myf5 bigiq pull 192.0.2.50 /shared/images/BIGIP-17.1.1.iso -o ./BIGIP-17.1.1.iso
./bin/myf5 bigiq download 192.0.2.50 /shared/images/BIGIP-17.1.1.iso -o ./BIGIP-17.1.1.iso

7. Unified Appliance Commands (ready, info, serial, qkview, push, pull)

Top-level appliance commands automatically detect or accept --target auto|bigip|bigiq (accepting "BIG-IQ", "big-iq", "bigiq", "BIG-IP", "big-ip", "bigip", or "auto"):

# Top-level readiness, info, serial, and QKView shortcuts
./bin/myf5 ready 10.1.1.4
./bin/myf5 info 10.1.1.4 --json
./bin/myf5 serial 10.1.1.4 --json
./bin/myf5 qkview 10.1.1.4

# Push file to any appliance with target selection and auto failover
./bin/myf5 push 10.1.1.4 /var/tmp/BIGIP-17.1.1.iso --target bigip --dest /shared/images --known-hosts ~/.ssh/known_hosts

# Pull .iso or .qkview from /shared/images, /var/config/rest/downloads, /var/tmp, or /shared/tmp
./bin/myf5 pull 10.1.1.4 /var/tmp/qkviews/support.qkview -o ./support.qkview --target auto -i ~/.ssh/id_ed25519 --known-hosts ~/.ssh/known_hosts

8. Automated GeoIP Deployment Engine (BIG-IP Only)

Automate the end-to-end lifecycle of MaxMind / Digital Envoy GeoIP updates on BIG-IP appliances (AskF5 K11176 / K78974041). Rejected on BIG-IQ because BIG-IQ Centralized Management does not host TMM GeoIP tables. Stages the .zip to /shared/tmp, unpacks .rpm files into /shared/GeoIP via rpm2cpio | cpio -idmv, and runs tmsh load sys geoip:

# Download latest GeoIP update package and apply to BIG-IP in a single pipeline:
./bin/myf5 downloads get "BIG-IP" "big-ip_v17.x" "17.1.1" "GeoLocationUpdates" \
    "ip-geolocation-default.zip" -o /var/tmp/geoip.zip \
    --push 10.1.1.4 --apply-geoip

# Or apply an already downloaded archive directly to a BIG-IP:
./bin/myf5 geoip 10.1.1.4 /var/tmp/ip-geolocation-default.zip --json

9. Outbound Corporate & Lab Proxy Support

myf5 supports outbound HTTP, HTTPS, SOCKS5, and SOCKS5h proxies for corporate networks and isolated lab environments:

# View active proxy configuration and probe connectivity via doctor:
./bin/myf5 proxy show
./bin/myf5 --proxy socks5://proxy.corp.internal:1080 doctor

# Run commands through proxy via global flag:
./bin/myf5 --proxy socks5://10.0.0.1:1080 doctor
./bin/myf5 --proxy http://10.0.0.1:8080 downloads families

# Or configure via standard environment variables:
export ALL_PROXY="socks5://proxy.corp.internal:1080"
export HTTPS_PROXY="http://proxy.corp.internal:8080"
export NO_PROXY="localhost,127.0.0.1,10.0.0.0/8,.internal"

10. Interactive Case Creation Wizard

Launch a guided terminal interface that validates input at every step:

./bin/myf5 wizard
# Or:
./bin/myf5 cases wizard
  • Step 1 auto-detects serial number, product family, product name, and version from a live BIG-IP or BIG-IQ (ProductFamily: "BIG-IQ", Product: "BIG-IQ Centralized Management") appliance IP/hostname or local .qkview archive.
  • Non-interactive myf5 cases create also supports --from-appliance, --from-device, --from-bigip, and --from-bigiq.
  • System timezone detection automatically maps to F5's expected string representation.
  • Multiline description text buffer (:m) supports line-by-line undo (:u / :undo), buffer preview (:p / :show), external editor launch (:e / :edit), and bi-directional step/field back navigation (:b / :back).
  • Pre-submission dry-run safety review ensures you never open an accidental case against production.

11. Interactive Console REPL & Tab Completion

Launch an interactive Read-Eval-Print-Loop (REPL) shell with built-in TAB autocompletion (for commands, subcommands, and flags), command history, and isolated per-command Ctrl+C handling (respects NO_COLOR to disable ANSI color codes in interactive selectors):

./bin/myf5 interactive
# Or aliases (or invoke `./bin/myf5` with no arguments in a terminal TTY):
./bin/myf5 shell
./bin/myf5 repl

Within the interactive shell, run commands directly without the myf5 prefix and press TAB at any prompt to autocomplete commands, subcommands, or flags:

myf5> doctor
myf5> downloads families
myf5> bigip info 10.1.1.4
myf5> exit

πŸ›‘οΈ Memory Safety & Zero-Secret Security Architecture

1. Memory Safety & Constant-RAM Streaming

  • Zero CGO (CGO_ENABLED=0): Compiles without cgo or dynamic C runtime links, eliminating use-after-free, double-free, and buffer overflow vulnerabilities common in C extensions.
  • Wire-Speed Multi-GB Streaming Pipeline:
    HTTP TLS Stream ---> io.TeeReader ---> SHA-256 Hasher
                                |
                                v
                        os.File (Disk Write)
    
    Instead of buffering 2.5 GB – 10+ GB BIG-IP ISOs/OVAs into RAM, the streaming engine pipelines chunked HTTP packets directly into disk writes and SHA-256 hashing in a single pass. Memory footprint remains constant at < 10 MB RAM regardless of download file size.
  • Atomic Verification & Promotion: Downloads are written to a .part temporary file and verified against authoritative checksums before atomic promotion to the target filename.

2. Two-Tier Zero-Secret Defense-in-Depth Architecture

  • Tier 1 Global Pre-Dispatch Rejection (pkg/auth.CheckNoCLISecrets on os.Args[1:], Exit Code 2): Before command dispatch or flag evaluation, myf5 scans os.Args[1:] and immediately aborts with exit code 2 if any of the 22 global secret flags are present: --password, -password, --pw, -pw, --client-secret, -client-secret, --clientsecret, -clientsecret, --secret, -secret, --token, -token, --access-token, -access-token, --api-key, -api-key, --apikey, -apikey, --auth-token, -auth-token, --key, -key.
  • Tier 2 Appliance Subcommand Flag Rejection (cmd/myf5.rejectSecretFlag, Exit Code 1): Appliance subcommand flag parsers additionally trap and reject --pass, -P, and --ssh-passphrase with exit code 1.
  • Process Table & Shell History Isolation: Prevents credentials from appearing in /proc/$PID/cmdline, ps aux, ~/.bash_history, ~/.zsh_history, or host audit logs (Falco, auditd).
  • Encrypted SSH Keys via ssh-agent: Private keys specified with -i / --identity (or --push-key) never prompt for a passphrase on the command line; encrypted SSH private keys are supported via SSH_AUTH_SOCK (ssh-agent).
  • Pre-Authentication SSH known_hosts Verification: Supports --known-hosts <path>, --push-known-hosts <path>, BIGIP_KNOWN_HOSTS, BIGIQ_KNOWN_HOSTS, and MYF5_SSH_KNOWN_HOSTS. Setting MYF5_STRICT_HOST_KEY_CHECKING=1 (true/yes) enforces strict OpenSSH known_hosts verification before sending credentials (rejecting unknown, mismatched, and @revoked host keys). In default mode, ~/.ssh/known_hosts is checked if present and any key mismatch or @revoked marker is rejected before credentials are sent, while unknown ephemeral lab hosts are allowed if no entry matches.
  • TLS 1.2–1.3, PQC Hybrid Suites & Custom CA Bundles: Cloud APIs enforce pkg/client.SecureTLSConfig (TLS 1.2–1.3 with post-quantum hybrid X25519MLKEM768 and 256-bit AEAD cipher suites). Appliance iControl REST clients default to SkipTLSVerify: true for self-signed management certificates unless MYF5_STRICT_APPLIANCE_TLS=1 (true/yes) is set or mTLS (--cert / --cert-key) is used. Custom root CA bundles are loaded via MYF5_CA_BUNDLE or SSL_CERT_FILE.
  • Hierarchical Credential Resolution:
    1. OS Environment Variables (F5_CLIENT_ID / F5_CLIENT_SECRET, IHEALTH_CLIENT_ID / IHEALTH_CLIENT_SECRET, BIGIP_PASSWORD / BIGIQ_PASSWORD)
         β”‚ (Not Found)
         β–Ό
    2. File: ~/.f5api_credentials (Permissions 0600, INI profile support)
         β”‚ (Not Found)
         β–Ό
    3. SSH Keys / Agent (SCP method: -i <key>, ~/.ssh/id_*, $SSH_AUTH_SOCK)
         β”‚ (Not Found)
         β–Ό
    4. Interactive Masked Terminal Prompt (Echo suppressed via term.ReadPassword)
    
  • Masked Diagnostics: Diagnostic utilities (myf5 doctor) mask all secret strings, displaying only non-sensitive metadata.

3. Interruption Safety & Resource Cleanup (CTRL+C / SIGINT / SIGTERM)

  • Top-Level Signal Trapping: Global context (signal.NotifyContext) traps interruption signals across all CLI operations, ensuring clean cancellation rather than abrupt process termination.
  • Atomic File Cleanup: Streaming file downloads write to temporary .part files. If interrupted via Ctrl+C, the .part files are immediately removed from disk to prevent corrupt or incomplete files from accumulating.
  • Graceful Network & Session Teardown: In-flight HTTP request bodies, TLS connection pools, native SSH client sessions, and SCP channels are closed cleanly upon signal receipt, preventing connection hangs and orphaned appliance processes.

πŸ“š Documentation & Technical Guides

Guide Description
Interactive Visual Architecture (docs/how-it-works.html) Interactive visual guide covering OAuth2/CIAM, CloudFront streaming, BIG-IP/BIG-IQ failover, and Zero-Secret enforcement.
CLI Reference Manual Full reference for all commands, subcommands, arguments, and exit codes.
Appliance Push & Deployment Guide Direct streaming of ISOs, hotfixes, and GeoDB updates to BIG-IP and BIG-IQ via iControl REST and SCP.
MyF5 Downloads & GeoDB Guide Catalog hierarchy, automated GeoDB updates, and end-to-end download & push workflows.
Zero-Secret Security Architecture Process isolation, credentials file permissions, SSH keys, and environment setup.
Network, DNS & Firewall Architecture Egress firewall requirements (TCP 443), proxy routing, and F5 cloud service endpoints.

Reference F5 Knowledge Base Articles

Article Covers
K2633 Submitting a support case β€” priority definitions and response targets
K12878 Generating diagnostic data with the qkview utility
K000090853 Exchanging files with F5 Support
K27404821 Using F5 iHealth to diagnose vulnerabilities
K15202 IP addresses and FQDNs for F5 hosted cloud services
K000163521 Network allowlisting for api.f5.com and callhome.f5.com
K000130498 MyF5 API authentication β€” OAuth2 client-credentials flow

Running Unit Tests

Run the full Go test suite:

make test

Or with code coverage:

make test-coverage

About

Go CLI for F5 MyF5 Support Cases, Software Downloads, iHealth QKView Diagnostics, and BIG-IP/BIG-IQ Appliance Operations

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages