Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ausbru87/coder-windows-certmgr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coder Windows Certificate Manager

A JavaFX GUI application for pushing Windows certificates to Coder Linux workspaces.

Java Platform License

Features

  • Certificate Selection - Browse Windows Certificate Store for signing and encryption certificates
  • Workspace Selection - Lists all available Coder workspaces
  • Secure Export - Exports certificates as PKCS12 with PIN protection
  • Remote Installation - Pushes certificates to Linux workspace at ~/.pki/
  • Integrity Verification - SHA-256 checksum verification after transfer
  • Login Validation - Checks Coder authentication status on startup
  • Debug Mode - Optional verbose output for troubleshooting

Prerequisites

1. Java 17+ (LTS recommended)

Download and install:

java --version

2. Apache Maven

mvn --version

3. Coder CLI

The Coder CLI must be installed and authenticated:

  1. Download from your Coder deployment or Coder releases
  2. Add to PATH
  3. Authenticate:
coder login https://your-coder-deployment.com
coder list  # Verify it works

Quick Start

# Clone
git clone https://github.com/your-org/coder-file-push.git
cd coder-file-push

# Build
mvn clean package

# Run
mvn javafx:run

Usage

  1. Launch the application
  2. Login check runs automatically - if not logged in, you'll be prompted to run coder login <url>
  3. Select a workspace from the dropdown
  4. Select signing and/or encryption certificates from the Windows Certificate Store
  5. Enter your certificate PIN/password when prompted
  6. Click Push Certificates
  7. Certificates are exported as PKCS12 and pushed to ~/.pki/ on the workspace

Verifying Installation

After pushing certificates, verify on the Linux workspace:

# Check files exist
coder ssh <workspace> -- ls -la ~/.pki/

# View certificate details
coder ssh <workspace> -- openssl pkcs12 -in ~/.pki/signing-cert.p12 -info -nokeys

Project Structure

coder-windows-certmgr/
├── pom.xml                          # Maven build config
├── README.md
├── scripts/
│   ├── create-test-certs.ps1        # Create test certificates
│   └── remove-test-certs.ps1        # Remove test certificates
└── src/
    ├── main/
    │   ├── java/com/coder/filepush/
    │   │   ├── Main.java            # JavaFX entry point
    │   │   ├── MainController.java  # UI controller
    │   │   ├── CertificateInfo.java # Certificate DTO
    │   │   ├── CertificateManager.java # Windows cert store access
    │   │   ├── CertificatePusher.java  # Remote cert installation
    │   │   ├── CoderCliExecutor.java   # Coder CLI wrapper
    │   │   ├── CommandRunner.java      # Interface for testability
    │   │   ├── DefaultCommandRunner.java
    │   │   └── ProcessResult.java
    │   └── resources/
    │       └── main.fxml            # UI layout
    └── test/
        └── java/com/coder/filepush/
            ├── CertificateManagerTest.java
            ├── CertificatePusherTest.java
            └── CoderCliExecutorTest.java

Testing

# Run unit tests
mvn test

# Create test certificates (Windows)
powershell -ExecutionPolicy Bypass -File scripts/create-test-certs.ps1

# Remove test certificates
powershell -ExecutionPolicy Bypass -File scripts/remove-test-certs.ps1

Unit tests cover:

  • Certificate manager operations
  • Certificate pusher with mocked SSH
  • Coder CLI executor
  • Checksum verification

Architecture

graph LR
    A[GUI] --> B[MainController]
    B --> C[CertificateManager]
    B --> D[CertificatePusher]
    C --> E[Windows Cert Store]
    D --> F[CoderCliExecutor]
    F --> G[CommandRunner]
    G --> H[coder CLI]
    H --> I[Linux Workspace]
Loading

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages