-
Notifications
You must be signed in to change notification settings - Fork 9
# Enterprise & Corporate Environment Enhancements for Maestro #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Features: - AWS Bedrock authentication and container support - Mount host SSL certificates for corporate proxies (Zscaler) - SSH agent forwarding for secure git authentication - Internal DNS routing for corporate networks - Configurable git user name/email for containers - AWS wildcards (*.amazonaws.com, *.awsapps.com) in firewall Config options added: - aws.enabled, aws.profile, aws.region - bedrock.enabled, bedrock.model - ssh.enabled - git.user_name, git.user_email - firewall.internal_dns, firewall.internal_domains 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Document: - AWS Bedrock setup - SSH agent forwarding - Git user configuration - Internal DNS for corporate networks - SSL certificate handling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add ssl.certificates_path config option (default: ~/.maestro/certificates) - Import .crt/.pem files into Java cacerts keystore on container startup - Randomize keystore password after import for security - Add CertificatesDir() helper in paths package - Add Java JDK 17 and Gradle 8.13 to container Dockerfile This fixes SSL handshake errors when using Gradle/Maven with corporate proxies that use custom CA certificates (e.g., Zscaler, Avast). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Mount host Android SDK as read-only volume when configured, set up ANDROID_HOME environment variable, and update local.properties if present. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add documentation for new config options: - ssl.certificates_path: Custom CA certificates for corporate HTTPS inspection - android.sdk_path: Mount Android SDK into containers for mobile development 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Auto-start daemon when TUI launches (EnsureDaemonRunning) - Fix daemon to use configured container prefix instead of hardcoded "mcl-" - Fix notify-send icon argument order for Linux notifications - Fix daemon log messages to show correct notification method per OS - Add containers.default_return_to_tui config option - Update README with daemon and notification configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
jwriteclub
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall a really solid PR. Thank you!
I am inclined to accept it as is, but can you please answer the questions I put on a couple of the commits first @kisnandor2?
|
|
||
| # SSL certificates for corporate HTTPS inspection | ||
| ssl: | ||
| certificates_path: "~/.maestro/certificates" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess they're just public certificates. I wonder if there is any risk here that I haven't thought of?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mostly due to the fact that these need to be part of the java cacerts (it's mainly for Java/Android builds).
We could simplify by importing from the already-mounted /etc/ssl/certs instead of requiring a separate ~/.maestro/certificates directory.
The current approach is:
- Conservative - avoid touching Java's default cacerts unnecessarily
- Avoiding duplicates - Java ships with ~100+ common CAs already
- Startup speed - importing hundreds of certs takes time
But for corporate proxies (Zscaler, etc.), their CA cert IS typically in /etc/ssl/certs on the host. So we could just import from there.
Simpler approach:
# In container startup, import any certs from /etc/ssl/certs
# that aren't already in Java's keystore
for cert in /etc/ssl/certs/*.crt /etc/ssl/certs/*.pem; do
keytool -importcert -noprompt -trustcacerts \
-alias "$(basename $cert)" \
-file "$cert" \
-keystore $JAVA_HOME/lib/security/cacerts \
-storepass changeit 2>/dev/null || true # ignore duplicates
doneThis would:
- Eliminate the need for
ssl.certificates_pathconfig - Automatically work with any corporate CA on the host
- Be idempotent (duplicates just fail silently)
- Add ~5-10 seconds to container startup to process all certs.
| autoInputScript := fmt.Sprintf(`#!/bin/sh | ||
| # Wait for Claude to fully start | ||
| sleep 5 | ||
| # Wait for Claude to start and show the bypass permissions prompt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to detect this? I will need to test with a .claude.json file to make sure this works in both environments (or we have to branch and have two versions based on whether using bedrock or not?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During maestro auth with claude backend the prompt is accepted by the user. However during maestro auth with AWS backend, the claude instance is not started at all so the prompt can't be accepted by the user thus permission prompt is accepted in the container.
The current approach sends Down+Enter blindly. If the prompt doesn't appear (e.g., already accepted in .claude.json), it just sends those keys to Claude which is harmless. We could add detection, but the current approach works for both cases.
| ENV PATH="${GOPATH}/bin:${PATH}" | ||
|
|
||
| # Install Java JDK 17 (for Android development) | ||
| RUN ARCH=$(dpkg --print-architecture) && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we feel about versioning this? It's not necessarily ideal to have it fixed in a config file like this, but if you guys are using this regularly, and will commit to sending a PR from time to time when it needs changes, then I'm okay hardcoding it like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't yet know if this is a good approach or not. I'm currently at Hey, it's working on my end point. Since this impacts the container, I'm not yet sure how to make this more dynamic.
|
Also, I just cut a release, so while the merge looks clean, please just run through your use cases again with the latest main to make sure it'll still be a good merge. |
AWS domain wildcards (*.amazonaws.com, *.awsapps.com) are now only added to the firewall whitelist when aws.enabled or bedrock.enabled is true in the config. This prevents unnecessarily broad network access for users not using AWS services. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
Hi @jwriteclub. Please see my updates and let's discuss if any other changes are needed. |
- Add batch command for managing multiple containers - Add shell completion support for bash, zsh, fish, and powershell - Add install-completion Makefile target for easy setup - Show⚠️ Waiting status in TUI when container needs attention Co-Authored-By: Claude <[email protected]>
Mounts the host's known_hosts file (read-only) into containers when SSH is enabled, eliminating the need to manually accept host keys for internal git servers. Co-Authored-By: Claude <[email protected]>
- Add CREATED column to TUI table showing container creation time - Hide AUTH column when AWS/Bedrock auth is enabled - Parallelize container info fetching for faster loading: - Fetch all container details concurrently per container - Fetch individual details (branch, bell, claude, auth, activity, git) in parallel - Use consistent single-width Unicode symbols for status indicators Co-Authored-By: Claude <[email protected]>
Enable GitHub CLI authentication with custom hostnames for GitHub Enterprise instances. Bedrock auth flow now also offers GitHub CLI setup. Co-Authored-By: Claude <[email protected]>
The LLM prompt now focuses on finding parallel-ready work units instead of splitting every numbered item into separate tasks. Sequential steps within phases are kept together, and concrete examples guide the model. Co-Authored-By: Claude <[email protected]>
Allows users to specify an additional instruction that will be sent to Claude in every container after the main task completes. Useful for common follow-up actions like committing, pushing, and opening PRs against a target branch. Co-Authored-By: Claude <[email protected]>
Map arm64 to aarch64 for OpenJDK download URL, fixing Docker build on Apple Silicon Macs. Co-Authored-By: Claude <[email protected]>
- Add live-updating progress display for batch mode copy operations - Parallelize firewall verification tests (reduces worst-case from 25s to 8s) - Add timeout to GitHub API curl in firewall init (prevents hangs) - Add sync.compress config option to disable gzip for large projects - Show copy stats (size, duration, speed) for single container mode Co-Authored-By: Claude <[email protected]>
Items now appear dynamically only when they actually start copying, rather than showing all containers as 'Waiting...' upfront. Co-Authored-By: Claude <[email protected]>
Projects can now create a .maestroignore file to exclude files/directories when copying to containers. Useful for large projects with build artifacts (e.g., Android projects with 6GB+ build directories). - Added readMaestroIgnore() to parse exclusion patterns from project root - Updated copyProjectToContainer to use patterns from .maestroignore - Updated README with documentation and examples Co-Authored-By: Claude <[email protected]>
Add batch command, shell completion, and waiting status indicator
New Features
Performance Improvements
TUI Improvements
Developer Experience
🤖 Generated with Claude Code |
Notes from me:
.awsfolder mount might not be the best approach (probably making a copy is safer)Summary
This PR adds comprehensive support for corporate/enterprise environments, AWS Bedrock, and Android development, making Maestro work seamlessly behind corporate proxies, VPNs, and with AWS authentication instead of direct Anthropic API access.
Key Features
Changes
AWS Bedrock Integration
awsandbedrockconfig sections incmd/root.gomaestro authincmd/auth.go~/.aws) into containers (read-write for SSO token refresh)AWS_PROFILE,AWS_REGION,CLAUDE_CODE_USE_BEDROCK=1,ANTHROPIC_MODELpkg/tui/model.go)sts.amazonaws.com,bedrock.amazonaws.com,bedrock-runtime.amazonaws.com,*.amazonaws.com,*.awsapps.comCorporate Network Support
firewall.internal_dns- Route internal domains through corporate DNS serverfirewall.internal_domains- List of internal domains to route/etc/internal-dns.txtand/etc/internal-domains.txtinit-firewall.shSSL Certificate Management
ssl.certificates_pathconfig option (default:~/.maestro/certificates)CertificatesDir()function inpkg/paths/paths.goupdate-ca-certificates/usr/local/jdk-17.0.2/lib/security/cacerts)NODE_EXTRA_CA_CERTS,SSL_CERT_FILE,CURL_CA_BUNDLE,REQUESTS_CA_BUNDLEdocker/container-startup.sh)SSH Agent Forwarding
ssh.enabledconfig optionSSH_AUTH_SOCKinto containers at/ssh-agentSSH_AUTH_SOCKnot setAndroid Development Support
Docker Image Changes (
docker/Dockerfile)JAVA_HOME,GRADLE_HOMEadded toPATHca-certificatespackage installed for SSL supportupdate-ca-certificatesSDK Mounting (
cmd/new.go)android.sdk_pathconfig option (e.g.,~/Android/Sdk)/home/node/Android/SdkANDROID_HOMEenvironment variable and updatesPATHlocal.propertiesin workspace if presentGit Configuration
git.user_nameandgit.user_emailconfig options incmd/root.goconfigureGitUser()function incmd/new.gogit config --globalin new containersDaemon & Notifications
Auto-Start (
cmd/daemon.go,cmd/root.go)EnsureDaemonRunning()function starts daemon silently if not runningConfiguration
daemon.check_interval- How often to check containers (default: 30m)daemon.notifications.attention_threshold- Delay before notification (default: 5s)Fixes (
pkg/daemon/daemon.go)--iconargument now placed before title/messageconfig.ContainerPrefixinstead of hardcodedmcl-getShortName()now a method using configured prefixContainer Defaults
containers.default_return_to_tui- Auto-check "Return to TUI" checkbox when creating containers (pkg/tui/model.go)Automatic Bypass Permissions Accept (
cmd/new.go)Configuration Example
Files Changed
README.mdcmd/root.gocmd/new.gocmd/auth.gocmd/daemon.gopkg/daemon/daemon.gopkg/tui/model.gopkg/paths/paths.goassets/init-firewall.shdocker/init-firewall.shdocker/Dockerfiledocker/container-startup.shTotal: +725 insertions, -39 deletions across 12 files
Testing
Breaking Changes
None - all new features are opt-in via configuration.
Migration
Existing users can continue using Maestro without changes. To use new features, add the relevant configuration to
~/.maestro/config.yml.For AWS Bedrock users:
awsandbedrockconfig sectionsmaestro authto set up AWS SSOFor corporate/VPN users:
firewall.internal_dnsandfirewall.internal_domains~/.maestro/certificates/For Android developers:
android.sdk_pathto your host SDK location