Skip to content

Cli#114

Merged
vsilent merged 49 commits intomainfrom
cli
Feb 25, 2026
Merged

Cli#114
vsilent merged 49 commits intomainfrom
cli

Conversation

@vsilent
Copy link
Copy Markdown
Collaborator

@vsilent vsilent commented Feb 25, 2026

No description provided.

vsilent added 30 commits February 16, 2026 10:09
When SSH authentication fails, the validate response now includes
the public key stored in Vault so you can compare it with what's in
the server's authorized_keys file to debug key mismatches.
Per CORS spec, Access-Control-Allow-Headers: * does not cover
Authorization when credentials mode is used. Replaced allow_any_header()
with explicit allowed_headers list including Authorization, Content-Type,
Accept, Origin, and X-Requested-With. Also removed supports_credentials()
since the API uses Bearer tokens (not cookies), and allow_any_origin()
is incompatible with credentials mode per spec.
The PUT /server/{id} endpoint was creating a fresh Server model from
the form data, overwriting ALL columns. If the form omitted srv_ip
(or any other field), it would be set to NULL in the database.

Now explicitly preserves existing DB values for any field that is
None in the incoming form: srv_ip, ssh_port, ssh_user, name,
cloud_id, region, zone, server, os, disk_type, vault_key_path,
and key_status.
Critical bugs:
1. saved_item() hardcoded routing to tfa, now uses connector
2. Connector routes to own flow when server has existing IP
3. srv_ip preserved with .or() pattern in both endpoints
4. item() now handles server_id for existing servers
- Auto-generate SSH keypair and store in Vault when creating a new server
  during deployment (both item() and saved_item() endpoints). This ensures
  vault_key_path is populated on the server record for future SSH access.
- In item() endpoint, capture cloud insert result so cloud_creds.id is
  available, then set server.cloud_id from saved cloud credentials.
- Use .or() pattern for zone in update paths to prevent overwriting
  existing zone with None when form doesn't provide it.
- Add VaultClient as web::Data parameter to both deploy endpoints.
Migration 20260204120000 registered rules with '/api/v1/project/:id/...'
but the actual routes are mounted at '/project/:id/...'. This caused
Casbin to reject all GET /project/:id/containers/discover requests with
403, which the browser then reported as a CORS error because the CORS
middleware never got to add 'Access-Control-Allow-Origin' to the response.

Fixes: container discovery 403 / CORS header missing regression
vsilent added 19 commits February 23, 2026 18:25
Implements:
- stacker list projects [--json]
- stacker list servers [--json]
- stacker list ssh-keys [--json]

Each command authenticates via stored credentials, queries the Stacker
server API, and supports both table and JSON output formats.
The Local orchestrator tries to run a docker install container
(trydirect/install-service:latest) which hangs when unavailable.
Remote orchestrator delegates to the Stacker server API, which is
the standard flow for CLI users.

This fixes 'stacker deploy --target cloud' hanging at 'starting...'
when no orchestrator is specified in stacker.yml.
…as + status_panel

- Add serde alias 'monitors' for monitoring field in StackerConfig
- Inject 'statuspanel' into integrated_features when status_panel is enabled
- Set connection_mode='status_panel' on server config for Ansible detection
- Add nginx_proxy_manager feature to build_project_body when proxy type is nginx
- Inject nginx_proxy_manager into extended_features in build_deploy_form
- Add tests for all three features (monitors alias, status_panel, nginx proxy)
…ature entry

The server's Feature form flattens App which requires _id (String),
name, and restart as non-optional fields. Without them the PUT
/project/{id} endpoint returns 400 'missing field _id'.
@gitguardian
Copy link
Copy Markdown

gitguardian bot commented Feb 25, 2026

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
27494177 Triggered Generic Password 6b2dd24 src/cli/ai_scanner.rs View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@vsilent vsilent merged commit ee35760 into main Feb 25, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant