go-pbolt

module
v0.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: MIT

README ΒΆ

go-pbolt

pbolt logo

Fast, robust Go SDK and client library compatible with Passbolt.

Go Reference go-pbolt-cli


⚑ Overview

go-pbolt is a Go client SDK to interact with Passbolt, an open-source password manager for teams. Both Passbolt Community and Pro server editions are supported.

There is also a companion CLI tool: go-pbolt-cli.

This module is divided into two primary packages:

  • api: Low-level client providing direct access to the Passbolt REST API endpoints.
  • helper: High-level convenience functions executing multi-step cryptographic and administrative workflows (e.g. creating/decrypting resources, sharing passwords with users/groups, resolving folders).

πŸ”’ API Compatibility

The Go module is designed to work with current Passbolt API versions.

[!IMPORTANT] Compatibility is continuously tested against Passbolt API 5.6.1 and later.


πŸ’» Installation

go get github.com/pbolt-dev/go-pbolt

πŸ’‘ Quick Example

package main

import (
	"context"
	"fmt"

	"github.com/pbolt-dev/go-pbolt/api"
	"github.com/pbolt-dev/go-pbolt/helper"
)

const (
	address      = "https://passbolt.example.com"
	userPassword = "yourStrongPassword"
	userPrivateKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
...
-----END PGP PRIVATE KEY BLOCK-----`
)

func main() {
	ctx := context.TODO()

	client, err := api.NewClient(nil, "", address, userPrivateKey, userPassword)
	if err != nil {
		panic(err)
	}

	if err := client.Login(ctx); err != nil {
		panic(err)
	}
	defer client.Logout(ctx)
	fmt.Println("Successfully authenticated with Passbolt server!")

	// Create a new password resource
	resourceID, err := helper.CreateResource(
		ctx,
		client,
		"",                   // Folder ID (empty for root)
		"Database Server",   // Name
		"dbuser",            // Username
		"https://db.local",  // URI
		"s3cur3P@ssw0rd",    // Password
		"Production primary database credentials",
	)
	if err != nil {
		panic(err)
	}
	fmt.Printf("Created resource ID: %s\n", resourceID)
}

βš–οΈ Trademark Notice

Passbolt is a registered trademark of Passbolt SA. pbolt is an independent community project and is not affiliated with, endorsed by, or sponsored by Passbolt SA.


πŸ“„ License

This project is licensed under the MIT License.

Directories ΒΆ

Path Synopsis
Package api provides a low-level client for the Passbolt API.
Package api provides a low-level client for the Passbolt API.
Package helper provides high-level operations for the Passbolt API.
Package helper provides high-level operations for the Passbolt API.
internal
e2e/server
Package server runs a throwaway Passbolt in Docker for integration tests.
Package server runs a throwaway Passbolt in Docker for integration tests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL