Skip to content

ChristND242/GlobalSign-Atlas-API-Powershell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GlobalSign Atlas API CLI (Windows)

image

PowerShell Platform License Status API

A Windows-native CLI tool for interacting with the GlobalSign Atlas API using PowerShell and mTLS authentication.

This project is the Windows counterpart of the original Bash-based CLI built for Linux environments. It provides the same functionality and structure, adapted to work natively with Windows systems using PowerShell.

Overview

This tool allows you to interact with the GlobalSign Atlas API from the command line with a structured, menu-driven interface.

It is designed for:

  • Certificate lifecycle management
  • Automation of issuance workflows
  • Testing and interacting with Atlas endpoints
  • Internal tooling and operational use

The implementation focuses on:

  • Simplicity
  • Readability
  • Maintainability
  • Full feature parity with the Linux version

References

Features

  • mTLS authentication using .pfx certificates
  • Secure API key / secret handling (runtime prompt)
  • Full certificate lifecycle operations:
    • Issue certificates
    • Poll certificate status
    • Retrieve certificates
    • Retrieve trust chains
    • Rekey / reissue certificates
  • Structured menu-driven CLI
  • JSON request support via external files
  • Clean logging and formatted output
  • Windows-native implementation (no curl dependency)

Architecture

The script is structured into logical layers:

1. Configuration Layer

Handles:

  • Base URL
  • Certificate path
  • API credentials
  • Input/output files

All sensitive inputs are prompted securely at runtime.

2. Authentication Layer

Responsible for:

  • Login via /login
  • Token retrieval and storage
  • Bearer token injection into subsequent requests

3. API Transport Layer

Implemented using PowerShell native calls:

  • Invoke-WebRequest
  • mTLS via X509Certificate2

Handles:

  • Request execution
  • Status code capture
  • Response body storage
  • Header extraction (e.g. Location)

4. Business Logic Layer

Encapsulates all workflows:

Issuance Flow

  • Submit certificate request
  • Extract certificate ID from response
  • Poll until certificate is issued
  • Save certificate and metadata
  • Retrieve trust chain

Checking Flow

  • Fetch certificate details
  • Display status and metadata

Domain Flow

  • Domain-related operations (if applicable)

IP Flow

  • IP-based certificate operations (if applicable)

5. CLI Interface Layer

  • Menu-driven navigation
  • Input validation
  • Structured output formatting
  • User-friendly prompts

Requirements

  • Windows 10 / 11
  • PowerShell 5.1+ or PowerShell 7+
  • Valid GlobalSign Atlas API access
  • mTLS certificate in .pfx format

Authentication (mTLS)

This tool uses:

  • PFX certificate for mTLS
  • API Key / Secret for login

You will be prompted at runtime for:

  • API Key
  • API Secret
  • PFX password

No credentials are stored in the script.

File Structure


.
├── globalsign_atlas_api_cli.ps1
├── request.json
├── reissue.json
├── output/
└── README.md

Usage

Run the script from PowerShell:

.\globalsign_atlas_api_cli.ps1

If execution policy blocks it, consult your organization’s policy.

Example Workflow

  1. Launch the CLI
  2. Configure settings (API URL, certificate, etc.)
  3. Select "Issuance"
  4. Submit a certificate request
  5. Monitor polling until issued
  6. Retrieve certificate and trust chain

Security Notes

  • Do not hardcode credentials in the script
  • Always use secure input prompts
  • Keep .pfx files protected
  • Avoid committing sensitive data to version control

Linux Version

This project mirrors the original Bash implementation:

  • Same feature set
  • Same menu structure
  • Same workflows

Key differences:

Linux Version Windows Version
Uses curl Uses PowerShell native HTTP
PEM + KEY PFX certificate
Bash script PowerShell script

Design Philosophy

This tool was built with a few principles in mind:

  • Keep it simple and readable
  • Avoid unnecessary abstractions
  • Maintain parity across platforms
  • Make debugging straightforward
  • Keep control in the hands of the operator

Use Cases

  • Internal tooling for certificate operations
  • API testing and validation
  • Automation workflows
  • DevOps integration (manual or scripted)
  • Learning and exploring Atlas API capabilities

License

MIT License

This project is open for the community to use, modify, and extend.

Contributing

Contributions are welcome.

If you plan to:

  • Extend functionality
  • Improve structure
  • Add new API flows

Feel free to open a PR or discussion.

Acknowledgment

Built to simplify interaction with the GlobalSign Atlas API and bring parity between Linux and Windows environments.

About

A Windows-native CLI tool for interacting with the GlobalSign Atlas API using PowerShell.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors