Versions in this module Expand all Collapse all v0 v0.9.0 Nov 10, 2026 Changes in this version type Client + func (c *Client) DeleteOrganizationSettings(ctx context.Context, plugin, settingsID string) error + func (c *Client) DisableUser(ctx context.Context, userID string) error + func (c *Client) EnableUser(ctx context.Context, userID string) error + func (c *Client) GetGroupWithOptions(ctx context.Context, groupID string, opts *GetGroupsOptions) (*Group, error) + func (c *Client) GetOrganizationSettings(ctx context.Context, plugin string) (json.RawMessage, error) + func (c *Client) GetUserWithOptions(ctx context.Context, userID string, opts *GetUserOptions) (*User, error) + func (c *Client) RecoverUser(ctx context.Context, username string) error + func (c *Client) SetOrganizationSettings(ctx context.Context, plugin string, settings json.RawMessage) (json.RawMessage, error) + type GetUserOptions struct + ContainSCIMEntry bool type GetUsersOptions + ContainIsMFAEnabled bool + ContainSCIMEntry bool + FilterIsMFAEnabled *bool type GroupJoinData + func (m *GroupJoinData) UnmarshalJSON(data []byte) error + func (m GroupJoinData) HasRoleInformation() bool type GroupMembership + func (m *GroupMembership) UnmarshalJSON(data []byte) error + func (m GroupMembership) HasRoleInformation() bool type GroupUser + func (g *GroupUser) UnmarshalJSON(data []byte) error + type OrganizationSettingsPlugin struct + Deletable bool + DeleteRequiresID bool + Name string + Readable bool + Writable bool + func OrganizationSettingsPlugins() []OrganizationSettingsPlugin type User + IsMFAEnabled *bool + ScimEntry json.RawMessage v0.8.5 Nov 10, 2026 Changes in this version + const ForeignModelTypesComment + const ForeignModelTypesFolder + const ForeignModelTypesResource + const ForeignModelTypesSecret + const ForeignModelTypesTag + const PassboltObjectTypeResourceMetadata + const PassboltObjectTypeSecretData + const UserLocaleENUK + var ErrAPIResponseErrorStatusCode = errors.New("error API JSON Response Status") + var ErrAPIResponseUnknownStatusCode = errors.New("unknown API JSON Response Status") + var ErrEmptyAuthToken = errors.New("got empty X-GPGAuth-User-Auth-Token header") + var ErrInvalidUUID = errors.New("UUID is not in valid format") + var ErrMFACallbackMissing = errors.New("MFA callback is not defined") + var ErrMFAFailed = errors.New("MFA challenge failed") + var ErrMetadataKeyNotFound = errors.New("metadata key not found") + var ErrNoMetadataPrivateKey = errors.New("no metadata private key for user") + var ErrNoPrivateKey = errors.New("client has no user private key") + var ErrResourceTypeNotFound = errors.New("resource type not found") + var ErrSchemaUnavailable = errors.New("no schema available for resource type") + var ErrSessionNotFound = errors.New("cannot find session cookie") + var ResourceSchemas = loadResourceSchemas() + func DenyAdditionalProperties(section map[string]any, allowExtra ...string) + func FormatSessionKey(sk *crypto.SessionKey) string + func GetPrivateKeyFromArmor(privateKey string, passphrase []byte) (*crypto.Key, error) + func HasResourceSchema(slug string) bool + type APIError struct + Body string + Message string + StatusCode int + func (e *APIError) Error() string + func (e *APIError) Is(target error) bool + type APIHeader struct + Action string + Code int + ID string + Message string + Servertime int + Status string + URL string + type APIResponse struct + Body json.RawMessage + Header APIHeader + type ARO struct + func (a *ARO) UnmarshalJSON(data []byte) error + func (a ARO) MarshalJSON() ([]byte, error) + type AuthenticationToken struct + Token string + type Avatar struct + Adapter string + Created *Time + Extension string + Filename string + Filesize int + ForeignKey string + Hash string + ID string + MimeType string + Model string + Modified *Time + Path string + URL *URL + UserID string + type Client struct + Debug bool + MFACallback func(ctx context.Context, c *Client, res *APIResponse) (http.Cookie, error) + MetadataKeyUpdatedCallback func(ctx context.Context, trusted bool, fingerprint string, signTime time.Time) error + func NewClient(httpClient *http.Client, ...) (*Client, error) + func (c *Client) AddPendingSessionKey(foreignModel ForeignModelTypes, foreignID string, ...) + func (c *Client) CheckSession(ctx context.Context) bool + func (c *Client) ClearCache() + func (c *Client) ClearMetadataKeysCache() + func (c *Client) ClearResourceTypesCache() + func (c *Client) ClearSessionKeyCache() + func (c *Client) CreateComment(ctx context.Context, resourceID string, comment Comment) (*Comment, error) + func (c *Client) CreateFavorite(ctx context.Context, resourceID string) (*Favorite, error) + func (c *Client) CreateFolder(ctx context.Context, folder Folder) (*Folder, error) + func (c *Client) CreateGroup(ctx context.Context, group Group) (*Group, error) + func (c *Client) CreateResource(ctx context.Context, resource Resource) (*Resource, error) + func (c *Client) CreateSessionKeysBundle(ctx context.Context, encryptedData string) (*MetadataSessionKey, error) + func (c *Client) CreateUser(ctx context.Context, user User) (*User, error) + func (c *Client) DecryptMessage(armoredCiphertext string) (string, error) + func (c *Client) DecryptMessageWithPrivateKeyAndReturnSessionKey(privateKey *crypto.Key, armoredCiphertext string) (string, *crypto.SessionKey, error) + func (c *Client) DecryptMessageWithSessionKey(sessionKey *crypto.SessionKey, ciphertextArmored string) (string, error) + func (c *Client) DecryptMetadata(metadataKey *crypto.Key, armoredCiphertext string) (string, error) + func (c *Client) DecryptMetadataWithKeyID(metadataKeyID string, metadataKey *crypto.Key, armoredCiphertext string) (string, error) + func (c *Client) DecryptMetadataWithResourceID(resourceID, metadataKeyID string, metadataKey *crypto.Key, ...) (string, error) + func (c *Client) DecryptSecretWithResourceID(resourceID string, armoredCiphertext string) (string, error) + func (c *Client) DeleteComment(ctx context.Context, commentID string) error + func (c *Client) DeleteFavorite(ctx context.Context, favoriteID string) error + func (c *Client) DeleteFolder(ctx context.Context, folderID string) error + func (c *Client) DeleteGroup(ctx context.Context, groupID string) error + func (c *Client) DeleteResource(ctx context.Context, resourceID string) error + func (c *Client) DeleteSessionKey(ctx context.Context, sessionKeyID string) error + func (c *Client) DeleteUser(ctx context.Context, userID string) error + func (c *Client) DeleteUserDryrun(ctx context.Context, userID string) error + func (c *Client) DoCustomRequest(ctx context.Context, method, path, version string, body any, opts any) (*APIResponse, error) + func (c *Client) DoCustomRequestAndReturnRawResponse(ctx context.Context, method, path, version string, body any, opts any) (*http.Response, *APIResponse, error) + func (c *Client) DoCustomRequestAndReturnRawResponseV5(ctx context.Context, method, path string, body any, opts any) (*http.Response, *APIResponse, error) + func (c *Client) DoCustomRequestV5(ctx context.Context, method, path string, body any, opts any) (*APIResponse, error) + func (c *Client) EncryptMessage(message string) (string, error) + func (c *Client) EncryptMessageWithKey(publicKey *crypto.Key, message string) (string, error) + func (c *Client) EncryptMessageWithKeyAndSigner(publicKey *crypto.Key, extraSigningKey *crypto.Key, message string) (string, error) + func (c *Client) EncryptMessageWithPublicKey(publickey, message string) (string, error) + func (c *Client) EncryptMetadata(metadataKey *crypto.Key, data string) (string, error) + func (c *Client) EncryptMetadataWithKeyType(metadataKey *crypto.Key, keyType MetadataKeyType, data string) (string, error) + func (c *Client) FetchAndCacheSessionKeys(ctx context.Context) (int, error) + func (c *Client) GetComments(ctx context.Context, resourceID string, opts *GetCommentsOptions) ([]Comment, error) + func (c *Client) GetDecryptedMetadataKeyCached(ctx context.Context, id string) (*crypto.Key, error) + func (c *Client) GetFolder(ctx context.Context, folderID string, opts *GetFolderOptions) (*Folder, error) + func (c *Client) GetFolders(ctx context.Context, opts *GetFoldersOptions) ([]Folder, error) + func (c *Client) GetGPGKey(ctx context.Context, gpgkeyID string) (*GPGKey, error) + func (c *Client) GetGPGKeys(ctx context.Context, opts *GetGPGKeysOptions) ([]GPGKey, error) + func (c *Client) GetGroup(ctx context.Context, groupID string) (*Group, error) + func (c *Client) GetGroups(ctx context.Context, opts *GetGroupsOptions) ([]Group, error) + func (c *Client) GetHealthCheckStatus(ctx context.Context) (string, error) + func (c *Client) GetMe(ctx context.Context) (*User, error) + func (c *Client) GetMetadataKey(ctx context.Context, personal bool) (string, MetadataKeyType, *crypto.Key, error) + func (c *Client) GetMetadataKeyByID(ctx context.Context, id string) (*crypto.Key, error) + func (c *Client) GetMetadataKeys(ctx context.Context, opts *GetMetadataKeysOptions) ([]MetadataKey, error) + func (c *Client) GetMetadataKeysCached(ctx context.Context) ([]MetadataKey, error) + func (c *Client) GetMetadataSessionKeys(ctx context.Context) ([]MetadataSessionKey, error) + func (c *Client) GetPGPHandle() *crypto.PGPHandle + func (c *Client) GetPasswordExpirySettings() PasswordExpirySettings + func (c *Client) GetPendingSessionKeys() []*PendingSessionKey + func (c *Client) GetPendingSessionKeysCount() int + func (c *Client) GetPublicKey(ctx context.Context) (string, string, error) + func (c *Client) GetResource(ctx context.Context, resourceID string) (*Resource, error) + func (c *Client) GetResourcePermissions(ctx context.Context, resourceID string) ([]Permission, error) + func (c *Client) GetResourceType(ctx context.Context, typeID string) (*ResourceType, error) + func (c *Client) GetResourceTypeBySlugCached(ctx context.Context, slug string) (*ResourceType, error) + func (c *Client) GetResourceTypeCached(ctx context.Context, typeID string) (*ResourceType, error) + func (c *Client) GetResourceTypes(ctx context.Context, opts *GetResourceTypesOptions) ([]ResourceType, error) + func (c *Client) GetResourceTypesCached(ctx context.Context) ([]ResourceType, error) + func (c *Client) GetResources(ctx context.Context, opts *GetResourcesOptions) ([]Resource, error) + func (c *Client) GetRoles(ctx context.Context) ([]Role, error) + func (c *Client) GetSecret(ctx context.Context, resourceID string) (*Secret, error) + func (c *Client) GetServerMetadataKeySettings(ctx context.Context) (*MetadataKeySettings, error) + func (c *Client) GetServerMetadataTypeSettings(ctx context.Context) (*MetadataTypeSettings, error) + func (c *Client) GetServerSettings(ctx context.Context) (*ServerSettingsResponse, error) + func (c *Client) GetSessionKeyByMetadataKeyID(metadataKeyID string) *crypto.SessionKey + func (c *Client) GetSessionKeyByResourceID(resourceID string) *crypto.SessionKey + func (c *Client) GetTrustedMetadatakeyFingerprint() *string + func (c *Client) GetUser(ctx context.Context, userID string) (*User, error) + func (c *Client) GetUserID() string + func (c *Client) GetUserPrivateKeyCopy() (*crypto.Key, error) + func (c *Client) GetUsers(ctx context.Context, opts *GetUsersOptions) ([]User, error) + func (c *Client) Login(ctx context.Context) error + func (c *Client) Logout(ctx context.Context) error + func (c *Client) MetadataKeySettings() MetadataKeySettings + func (c *Client) MetadataTypeSettings() MetadataTypeSettings + func (c *Client) MoveFolder(ctx context.Context, folderID, folderParentID string) error + func (c *Client) MoveResource(ctx context.Context, resourceID, folderParentID string) error + func (c *Client) PerformHealthCheck(ctx context.Context) (json.RawMessage, error) + func (c *Client) PreDecryptAllMetadataPrivateKeys(ctx context.Context) (int, error) + func (c *Client) PreFetchCaches(ctx context.Context) (sessionCount, metadataKeyCount int, err error) + func (c *Client) SavePendingSessionKeys(ctx context.Context) (int, error) + func (c *Client) SearchAROs(ctx context.Context, opts SearchAROsOptions) ([]ARO, error) + func (c *Client) SetSessionKeyByMetadataKeyID(metadataKeyID string, sessionKey *crypto.SessionKey) + func (c *Client) SetSessionKeyByResourceID(resourceID string, sessionKey *crypto.SessionKey) + func (c *Client) SetTrustedMetadatakeyFingerprint(fingerprint string, signTime time.Time) + func (c *Client) SetupComplete(ctx context.Context, userID string, request SetupCompleteRequest) error + func (c *Client) SetupInstall(ctx context.Context, userID, token string) (*SetupInstallResponse, error) + func (c *Client) SetupServerVerification(ctx context.Context) (string, string, error) + func (c *Client) ShareFolder(ctx context.Context, folderID string, permissions []Permission) error + func (c *Client) ShareResource(ctx context.Context, resourceID string, shareRequest ResourceShareRequest) error + func (c *Client) SimulateShareResource(ctx context.Context, resourceID string, shareRequest ResourceShareRequest) (*ResourceShareSimulationResult, error) + func (c *Client) UpdateComment(ctx context.Context, commentID string, comment Comment) (*Comment, error) + func (c *Client) UpdateFolder(ctx context.Context, folderID string, folder Folder) (*Folder, error) + func (c *Client) UpdateGroup(ctx context.Context, groupID string, update GroupUpdate) (*Group, error) + func (c *Client) UpdateGroupDryRun(ctx context.Context, groupID string, update GroupUpdate) (*UpdateGroupDryRunResult, error) + func (c *Client) UpdateResource(ctx context.Context, resourceID string, resource Resource) (*Resource, error) + func (c *Client) UpdateSessionKeysBundle(ctx context.Context, bundleID string, encryptedData string, modified Time) (*MetadataSessionKey, error) + func (c *Client) UpdateUser(ctx context.Context, userID string, user User) (*User, error) + func (c *Client) VerifyServer(ctx context.Context, token, encToken string) error + type Comment struct + Children []Comment + Content string + Created *Time + CreatedBy string + Description string + ForeignKey string + ForeignModel string + ID string + Modified *Time + ModifiedBy string + ParentID string + UserID string + type Favorite struct + Created *Time + ForeignKey string + ForeignModel string + ID string + Modified *Time + type Folder struct + ChildrenFolders []Folder + ChildrenResources []Resource + Created *Time + CreatedBy string + FolderParentID string + ID string + Modified *Time + ModifiedBy string + Name string + Permissions []Permission + Personal bool + type ForeignModelTypes string + func (s ForeignModelTypes) IsValid() bool + type GPGAuth struct + KeyID string + Token string + type GPGKey struct + ArmoredKey string + Bits int + Created *Time + Deleted bool + Expires *Time + Fingerprint string + ID string + KeyCreated *Time + KeyID string + Modified *Time + Type string + UID string + UserID string + type GPGVerify struct + KeyID string + Token string + type GPGVerifyContainer struct + Req GPGVerify + type GetCommentsOptions struct + ContainCreator bool + ContainModifier bool + type GetFolderOptions struct + ContainChildrenFolders bool + ContainChildrenResources bool + ContainCreator bool + ContainCreatorProfile bool + ContainModiferProfile bool + ContainModifier bool + ContainPermission bool + ContainPermissionGroup bool + ContainPermissionUserProfile bool + ContainPermissions bool + type GetFoldersOptions struct + ContainChildrenFolders bool + ContainChildrenResources bool + ContainCreator bool + ContainCreatorProfile bool + ContainModiferProfile bool + ContainModifier bool + ContainPermission bool + ContainPermissionGroup bool + ContainPermissionUserProfile bool + ContainPermissions bool + FilterHasID []string + FilterHasParent []string + FilterSearch string + type GetGPGKeysOptions struct + FilterModifiedAfter int + type GetGroupsOptions struct + ContainGroupsUsers bool + ContainGroupsUsersUser bool + ContainGroupsUsersUserGPGKey bool + ContainGroupsUsersUserProfile bool + ContainModifier bool + ContainModifierProfile bool + ContainMyGroupUser bool + ContainUsers bool + FilterHasManagers []string + FilterHasUsers []string + type GetMetadataKeysOptions struct + ContainMetadataPrivateKeys bool + FilterDeleted bool + FilterExpired bool + type GetResourceTypesOptions struct + type GetResourcesOptions struct + ContainCreator bool + ContainFavorites bool + ContainModifier bool + ContainPermissions bool + ContainPermissionsGroup bool + ContainPermissionsUserProfile bool + ContainResourceType bool + ContainSecret bool + ContainTags bool + FilterHasID []string + FilterHasParent []string + FilterHasTag string + FilterIsFavorite bool + FilterIsOwnedByMe bool + FilterIsSharedWithGroup string + FilterIsSharedWithMe bool + MetadataKeyType MetadataKeyType + type GetUsersOptions struct + ContainLastLoggedIn bool + FilterHasAccess []string + FilterHasGroup []string + FilterIsAdmin bool + FilterSearch string + MissingMetadataKeyIDs bool + type Group struct + Created *Time + CreatedBy string + Deleted bool + GroupUsers []GroupMembership + ID string + Modified *Time + ModifiedBy string + Name string + UserCount int + Users []GroupUser + type GroupJoinData struct + Created *Time + GroupID string + ID string + IsAdmin bool + UserID string + type GroupMembership struct + Created *Time + Delete bool + GroupID string + ID string + IsAdmin bool + User User + UserID string + type GroupSecret struct + Secret []Secret + type GroupUpdate struct + GroupChanges []GroupMembership + Name string + Secrets []Secret + type GroupUser struct + JoinData GroupJoinData + type Login struct + Auth *GPGAuth + type MFAChallenge struct + Provider MFAProviders + type MFAChallengeResponse struct + TOTP string + type MFAProviders struct + TOTP string + type MetadataKey struct + ArmoredKey string + Created Time + CreatedBy *string + Fingerprint string + ID string + MetadataPrivateKeys []MetadataPrivateKey + Modified Time + ModifiedBy *string + type MetadataKeySettings struct + AllowUsageOfPersonalKeys bool + AllowZeroKnowledgeKeyShare bool + type MetadataKeyType string + const MetadataKeyTypeSharedKey + const MetadataKeyTypeUserKey + func (s MetadataKeyType) IsValid() bool + type MetadataPrivateKey struct + Created Time + CreatedBy *string + Data string + DataSignedByCurrentUser *Time + ID string + MetadataKeyID string + Modified Time + ModifiedBy *string + UserID *string + type MetadataPrivateKeyData struct + ArmoredKey string + Domain string + Fingerprint string + ObjectType string + Passphrase string + Signed Time + type MetadataSessionKey struct + Created Time + Data string + ID string + Modified Time + UserID string + type MetadataSessionKeyData struct + ObjectType string + SessionKeys []MetadataSessionKeyDataElement + type MetadataSessionKeyDataElement struct + ForeignID string + ForeignModel ForeignModelTypes + Modified Time + SessionKey string + type MetadataTypeSettings struct + AllowCreationOfV4Comments bool + AllowCreationOfV4Folders bool + AllowCreationOfV4Resources bool + AllowCreationOfV4Tags bool + AllowCreationOfV5Comments bool + AllowCreationOfV5Folders bool + AllowCreationOfV5Resources bool + AllowCreationOfV5Tags bool + AllowV4V5Downgrade bool + AllowV4V5Upgrade bool + DefaultCommentType PassboltAPIVersionType + DefaultFolderType PassboltAPIVersionType + DefaultResourceType PassboltAPIVersionType + DefaultTagType PassboltAPIVersionType + type PassboltAPIVersionType string + const PassboltAPIVersionTypeV4 + const PassboltAPIVersionTypeV5 + func (s PassboltAPIVersionType) IsValid() bool + type PasswordExpirySettings struct + AutomaticExpiry bool + AutomaticUpdate bool + Created time.Time + CreatedBy string + DefaultExpiryPeriod int + ExpiryNotificationPeriod int + ID string + Modified time.Time + ModifiedBy string + PolicyOverride bool + type PendingSessionKey struct + ForeignID string + ForeignModel ForeignModelTypes + Modified Time + SessionKey string + type Permission struct + ACO string + ACOForeignKey string + ARO string + AROForeignKey string + Created *Time + Delete bool + ID string + IsNew bool + Modified *Time + Type int + type Profile struct + Avatar *Avatar + Created *Time + FirstName string + ID string + LastName string + Modified *Time + UserID string + type PublicKeyReponse struct + Fingerprint string + Keydata string + type Resource struct + Created *Time + CreatedBy string + Creator *User + Deleted bool + Description string + Expired *Time + Favorite *Favorite + FolderParentID string + ID string + Metadata string + MetadataKeyID string + MetadataKeyType MetadataKeyType + Modified *Time + ModifiedBy string + Modifier *User + Name string + Permission *Permission + ResourceType ResourceType + ResourceTypeID string + Secrets []Secret + Tags []Tag + URI string + Username string + type ResourceShareRequest struct + Permissions []Permission + Secrets []Secret + type ResourceShareSimulationChange struct + User ResourceShareSimulationUser + type ResourceShareSimulationChanges struct + Added []ResourceShareSimulationChange + Removed []ResourceShareSimulationChange + type ResourceShareSimulationResult struct + Changes ResourceShareSimulationChanges + type ResourceShareSimulationUser struct + ID string + type ResourceType struct + Created *Time + Definition json.RawMessage + Description string + ID string + Modified *Time + Slug string + func (rt *ResourceType) HasMetadataField(field string) bool + func (rt *ResourceType) HasSecretField(field string) bool + func (rt *ResourceType) IsSecretString() bool + func (rt *ResourceType) IsV5() bool + func (rt *ResourceType) Schema() (*ResourceTypeSchema, error) + type ResourceTypeSchema struct + Resource map[string]any + Secret map[string]any + type Role struct + Avatar Avatar + Created *Time + CreatedBy string + Deleted bool + DeletedBy string + Description string + ID string + Modified *Time + ModifiedBy string + Name string + type SearchAROsOptions struct + FilterSearch string + type Secret struct + Created *Time + Data string + ID string + Modified *Time + ResourceID string + UserID string + type SecretDataTOTP struct + Algorithm string + Digits int + Period int + SecretKey string + type SecretDataTypePasswordAndDescription struct + Description string + Password string + type SecretDataTypePasswordDescriptionTOTP struct + Description string + Password string + TOTP SecretDataTOTP + type SecretDataTypeTOTP struct + TOTP SecretDataTOTP + type SecretDataTypeV5Default struct + Description string + ObjectType string + Password string + ResourceTypeID string + type SecretDataTypeV5DefaultWithTOTP struct + Description string + ObjectType string + Password string + ResourceTypeID string + TOTP SecretDataTOTP + type SecretDataTypeV5PasswordString string + type SecretDataTypeV5TOTPStandalone struct + ObjectType string + ResourceTypeID string + TOTP SecretDataTOTP + type ServerPassboltPluginSettings struct + Enabled bool + Version string + type ServerPassboltSettings struct + Plugins map[string]ServerPassboltPluginSettings + func (ps *ServerPassboltSettings) IsPluginEnabled(name string) bool + type ServerSettingsResponse struct + Passbolt ServerPassboltSettings + type SetupCompleteRequest struct + AuthenticationToken AuthenticationToken + GPGKey GPGKey + User User + type SetupInstallResponse struct + type Tag struct + ID string + IsShared bool + Slug string + type Time struct + func (t *Time) UnmarshalJSON(buf []byte) error + func (t Time) MarshalJSON() ([]byte, error) + type URL struct + Medium string + Small string + type UpdateGroupDryRun struct + Secrets []GroupSecret + SecretsNeeded []UpdateGroupSecretsNeededContainer + type UpdateGroupDryRunResult struct + DryRun UpdateGroupDryRun + type UpdateGroupDryRunSecretsNeeded struct + ResourceID string + UserID string + type UpdateGroupSecretsNeededContainer struct + Secret UpdateGroupDryRunSecretsNeeded + type User struct + Active bool + Created *Time + Deleted bool + Description string + Disabled *Time + Favorite *Favorite + GPGKey *GPGKey + GroupsUsers []GroupMembership + ID string + LastLoggedIn string + Locale string + MissingMetadataKeyIDs []string + Modified *Time + Profile *Profile + Role *Role + RoleID string + Username string