StrongDM Binary Verification

Last modified on September 13, 2024

Overview

StrongDM binary files can be verified using the Binary Verification endpoint or by checking the SHA-256 checksum values displayed in the Admin UI.

The Binary Verification endpoint uses a secure hash algorithm (SHA) that allows for increased file exchange security. Downloaded binary files for the StrongDM Desktop, CLI, and relays or gateways can be compared via the endpoint to confirm they are authentic.

This article describes how to use the endpoint to display a hash value that validates the downloaded binary is genuine without revealing the file contents. The endpoint can be reached at:

https://app.strongdm.com/sha

Query Parameters for Binary Verification

When calling the Binary Verification endpoint, you can pass several query parameters, such as os, arch, software, version, or variant. As in the following example, you can add these predefined strings to the base URL https://app.strongdm.com/sha.

https://app.strongdm.com/sha?os=darwin&arch=amd64&software=sdm-cli&version=33.57.0

For more information about each parameter, check the query parameter definitions table.

Query parameter definitions

The following table lists the query parameters that can be used with the Binary Verification endpoint. You can read more about their requirement status, usage, and possible values.

Query parameterRequirementDescriptionPossible values
osRequiredOperating systemdarwin, docker, linux, windows
archRequiredArchitectureamd64, arm64, universal, 386
redirectOptionalDirect download linktrue, false
softwareRequiredStrongDM CLI or desktop appsdm-cli, desktop
versionRequiredVersion number or your organization’s web domain value (copy value from Admin UI general settings)XX.YY.Z, <WEB_DOMAIN_VALUE>
variantOptionalBinary variantfull, relay, static

Query parameter combinations

You can combine query parameters in a number of ways when using the Binary Verification endpoint. To view acceptable combinations, see the following table.

SoftwareOSArchVariantDescription
sdm-clidarwinamd64
sdm-clidarwinarm64
sdm-clidockeramd64
sdm-clidockeramd64relayBinary is configured in a way to start a gateway or relay.
Default client variant starts the listener instead.
sdm-clilinuxamd64
sdm-clilinuxamd64staticBinary is statically compiled and works best with Alpine-based
Linux images based on musl libc. Default variant is dynamically compiled.
sdm-clilinuxarm64
sdm-cliwindows386
sdm-cliwindowsamd64
desktopdarwinuniversal
desktopdarwinuniversalfullBinary of the installer; default includes only the upgrade deltas
desktopwindows386
desktopwindows386fullBinary of the installer; default includes only the upgrade deltas

Usage Example

You can use the Binary Verification endpoint to validate any StrongDM binary. This particular example shows how to use the endpoint to validate the downloaded CLI binary. Note that depending on your distribution, your commands for downloading files, verifying checksums, and so forth may be different from the steps here.

  1. Get the download link to your binary file. See the Download & Install section of the Admin UI for all binaries. In this example, we are using curl to get the download link to the CLI binary for our production instance:

    curl https://app.strongdm.com/releases/cli/darwin
    

    In return, we get a link to a ZIP file with a SHA hash value:

    <a href="https://downloads.strongdm.com/builds/sdm-cli/34.65.0/darwin/amd64/AB5C20F504299A6509E00E67D160ECD6D092F4E9/sdmcli_34.65.0_darwin_amd64.zip">Temporary Redirect</a>.
    

    You can also use the upgrade path to get a download link to your CLI binary with a SHA hash value:

    curl 'https://app.strongdm.com/releases/upgrade?os=darwin&arch=amd64&software=sdm-cli&version=<VERSION_NUMBER>'
    

    The output for the previous command is similar to:

    {
       "url":"https://downloads.strongdm.com/builds/sdm-cli/34.65.0/darwin/amd64/AB5C20F504299A6509E00E67D160ECD6D092F4E9/sdmcli_34.65.0_darwin_amd64.zip",
       "version":"34.65.0",
       "size":16823838,
       "sha_1":"AB5C20F504299A6509E00E67D160ECD6D092F4E9",
       "sha256":"2676F838EACAE2EAA234D31C458D1B321F3C9EC46F7598DA72A70777F52E29ED",
       "sha512":"22E1599D741CF7E98E7008E01D630AAABCE9026C618B674B34C4DA8304F90ECB1863B20FEC01B1AACC02E70D1B83D7E5784C145E8084AB7394F4D375D8579C9C",
       "software":"sdm-cli",
       "os":"darwin",
       "arch":"amd64"
    }
    

    Alternatively, you can use the Release endpoint to get a download link with SHA hash values.

  2. Download the file:

    wget https://downloads.strongdm.com/builds/sdm-cli/34.65.0/darwin/amd64/AB5C20F504299A6509E00E67D160ECD6D092F4E9/sdmcli_34.65.0_darwin_amd64.zip
    
  3. Call the Binary Verification endpoint using your query parameters to get SHA hash values:

    curl 'https://app.strongdm.com/sha?os=darwin&arch=amd64&software=sdm-cli&version=34.65.0'
    

    This output is produced:

    {
       "sha1":"AB5C20F504299A6509E00E67D160ECD6D092F4E9",
       "sha256":"2676F838EACAE2EAA234D31C458D1B321F3C9EC46F7598DA72A70777F52E29ED",
       "sha512":"22E1599D741CF7E98E7008E01D630AAABCE9026C618B674B34C4DA8304F90ECB1863B20FEC01B1AACC02E70D1B83D7E5784C145E8084AB7394F4D375D8579C9C"
    }
    
  4. Verify the SHA checksums of the downloaded file. When the SHA hash values are returned, compare them to the SHA values returned in Step 3. If the checksums are identical, you know the downloaded file is a legitimate copy.

    $ sha512sum sdmcli_34.65.0_darwin_amd64.zip
    22E1599D741CF7E98E7008E01D630AAABCE9026C618B674B34C4DA8304F90ECB1863B20FEC01B1AACC02E70D1B83D7E5784C145E8084AB7394F4D375D8579C9C sdmcli_34.65.0_darwin_amd64.zip
    

    The following is an alternative way to verify the checksum:

    $ echo "22E1599D741CF7E98E7008E01D630AAABCE9026C618B674B34C4DA8304F90ECB1863B20FEC01B1AACC02E70D1B83D7E5784C145E8084AB7394F4D375D8579C9C sdmcli_34.65.0_darwin_amd64.zip" | sha512sum --check
    sdmcli_34.65.0_darwin_amd64.zip: OK
    
Top