LogoLogo
HomeBlogGitHubGet Started FreeLogin
Earthly 0.6
Earthly 0.6
  • 👋Introduction
  • 💻Installation
  • 🎓Learn the basics
    • Part 1: A simple Earthfile
    • Part 2: Outputs
    • Part 3: Adding dependencies With Caching
    • Part 4: Args
    • Part 5: Importing
    • Part 6: Using Docker In Earthly
    • Final words
  • ✅Best practices
  • 📖Docs
    • Guides
      • Authenticating Git and image registries
      • Target, artifact and command referencing
      • Build arguments and secrets
      • User-defined commands (UDCs)
      • Managing cache
      • Advanced local caching
      • Using Docker in Earthly
      • Integration Testing
      • Debugging techniques
      • Multi-platform builds
      • Podman
      • Configuring registries
        • AWS ECR
        • GCP Artifact Registry
        • Azure ACR
        • Self-signed certificates
      • Using the Earthly Docker Images
        • earthly/earthly
        • earthly/buildkitd
    • Remote runners
    • Remote caching
    • Earthfile reference
      • Builtin args
      • Excluding patterns
      • Version-specific features
    • The earthly command
    • Configuration reference
    • Examples
    • Misc
      • Alternative installation
      • Data collection
      • Definitions
      • Public key authentication
  • 🔧CI Integration
    • Overview
    • Use the Earthly CI Image
    • Build your own Earthly CI Image
    • Pull-Through Cache
    • Remote BuildKit
    • Vendor-Specific Guides
      • Jenkins
      • Circle CI
      • GitHub Actions
      • AWS CodeBuild
      • Kubernetes
      • Google Cloud Build
      • GitLab CI/CD
      • Woodpecker CI
  • ☁️ Earthly Cloud
    • Overview
    • Cloud secrets
    • Satellites
      • Managing Satellites
      • Using Satellites
Powered by GitBook
On this page
  • What is public-key authentication
  • How does earthly implement public-key authentication

Was this helpful?

Edit on GitHub
  1. Docs
  2. Misc

Public key authentication

PreviousDefinitionsNextOverview

Last updated 2 years ago

Was this helpful?

Earthly provides public-key based authentication (in addition to traditional username and password authentication). This guide details how it works.

What is public-key authentication

Public key authentication provides greater security compared to password authentication; it is achieved by using .

A user generates a pair of private and public keys; the public key is publicly distributed to anyone who wishes to send an encrypted message that only the holder of the private key can decrypt. It is important that you never share your private key, otherwise anyone could use it to access data that is only intended for you.

Similarly, it is possible to sign data using your private key -- any user who has your public key can use it to verify the message was signed by you (or anyone who has access to your private key).

For these reasons, it is crucial that your private key remains private -- as a result, earthly will never store, or transmit your private key.

How does earthly implement public-key authentication

Earthly accounts can be associated with any number of public keys (both ssh-rsa, and ssh-ed25519 public keys are supported). These public keys are stored on the earthly server, in a database that mimics the ~/.ssh/authorized_keys file one typically finds on a server.

The client first connects to the earthly server over a https connection; the client responds with a blob of data. The client then passes that blob of data to the process, which must be running on your local host. This connection occurs by using the local unix-socket as set by the SSH_AUTH_SOCK environment variable. The ssh-agent signs the blob of data, and returns the signature -- earthly will never read your private keys directly.

This signature is sent to the earthly server; if the signature can be verified using a registered public key, then the server responds with a which is used for the duration of your session.

📖
asymmetric cryptography
cryptographically-secure random
ssh-agent
JSON Web Token (JWT)