Skip to content

post-bootstrap scriptΒ #2

@Ccccraz

Description

@Ccccraz

πŸš€ Overview

We’ve been exploring how to securely distribute sensitive information to Cagelab instances.
Examples of such data include:

  • πŸ”‘ Netbird key
  • πŸ” SSH public key (secure, but inconvenient to manage via GitHub)

πŸ› οΈ Proposed Approach: Two-Step Setup

  1. bootstrap.sh
    Runs inside the target Cagelab instance, preparing the environment:

    • Install Netbird
    • Install SSH server
    • Perform basic setup
  2. post-bootstrap script
    Runs on a separate machine (e.g., an office workstation).
    The user manually provides sensitive information here, such as:

    • Netbird key
    • Updated SSH public keys

πŸ”„ Sequence (Two-Step)

sequenceDiagram
    participant Workstation as Workstation (Office PC)
    participant Cagelab as Cagelab Instance

    Cagelab->>Cagelab: Run bootstrap.sh
    Note over Cagelab: Basic setup completed

    Workstation->>Cagelab: Run post-bootstrap script provides Netbird key && etc..
    Note over Cagelab: Sensitive data configured
Loading

πŸ” Further Simplification

  • Windows (SSH disabled by default): must follow the two-step process above.
  • Linux (SSH enabled by default): can often be simplified into one step, enabling full remote configuration.

In the Linux case, the control server directly calls bootstrap.sh and provides sensitive information as parameters.
This eliminates the need for a separate post-bootstrap step.


πŸ”„ Sequence (One-Step, Linux)

sequenceDiagram
    participant Control as Control Server
    participant Cagelab as Cagelab Instance (Linux)

    Control->>Cagelab: Invoke bootstrap.sh with parameters (Netbird key, SSH public keys, etc.)
    Note over Cagelab: bootstrap.sh
    Note over Cagelab: Applies sensitive data
Loading

πŸ“Š Comparison

System Type Approach Notes
πŸͺŸ Windows Two steps β†’ run bootstrap.sh (basic setup), then post-bootstrap (inject sensitive info) Separation required since the instance cannot initially receive sensitive data directly
🐧 Linux One step β†’ control server directly invokes bootstrap.sh with sensitive parameters Enables complete remote configuration without a separate step

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions