GPG key problems

Checklist
I have read intro post: About the Installation Issues category
I have read the tutorials, help and searched for similar issues
I provide relevant information about my server (component names and versions, etc.)
I provide a copy of my logs and healthcheck
I describe the steps I have taken to trouble shoot the problem
I describe the steps on how to reproduce the issue

  1. Provide your system information:
    – Server operating system name and version: Ubuntu 22.04
    – Web server name and version: Apache 2.4.52
    – Database server name and version: MariaDB 10.6.7-MariaDB-2ubuntu1
    – Php version: 8.1.8
    – Passbolt version: 3.6.0
  2. Provide a copy of your healthcheck running as the web server user
    / __ ____ _____ / / ____ / / /
    / /
    / / __ `/ / / __ / __ / / _/
    / / // ( |
    ) /
    / / /
    / / / /
    /
    / _
    ,
    /
    //./_//__/

Open source password manager for teams

Healthcheck shell…Deprecated Error: Return type of OpenPGP_Message::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
In [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 382]

2022-07-20 19:15:36 notice: Deprecated (8192): Return type of OpenPGP_Message::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 382]
Deprecated Error: Return type of OpenPGP_Message::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
In [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 388]

2022-07-20 19:15:36 notice: Deprecated (8192): Return type of OpenPGP_Message::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 388]
Deprecated Error: Return type of OpenPGP_Message::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
In [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 392]

2022-07-20 19:15:36 notice: Deprecated (8192): Return type of OpenPGP_Message::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 392]
Deprecated Error: Return type of OpenPGP_Message::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
In [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 396]

2022-07-20 19:15:36 notice: Deprecated (8192): Return type of OpenPGP_Message::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 396]
Deprecated Error: Return type of OpenPGP_Message::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
In [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 400]

2022-07-20 19:15:36 notice: Deprecated (8192): Return type of OpenPGP_Message::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 400]
Deprecated Error: Return type of OpenPGP_CompressedDataPacket::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
In [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 1681]

2022-07-20 19:15:36 notice: Deprecated (8192): Return type of OpenPGP_CompressedDataPacket::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 1681]
Deprecated Error: Return type of OpenPGP_CompressedDataPacket::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
In [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 1687]

2022-07-20 19:15:36 notice: Deprecated (8192): Return type of OpenPGP_CompressedDataPacket::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 1687]
Deprecated Error: Return type of OpenPGP_CompressedDataPacket::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
In [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 1691]

2022-07-20 19:15:36 notice: Deprecated (8192): Return type of OpenPGP_CompressedDataPacket::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 1691]
Deprecated Error: Return type of OpenPGP_CompressedDataPacket::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
In [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 1695]

2022-07-20 19:15:36 notice: Deprecated (8192): Return type of OpenPGP_CompressedDataPacket::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 1695]
Deprecated Error: Return type of OpenPGP_CompressedDataPacket::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
In [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 1699]

2022-07-20 19:15:36 notice: Deprecated (8192): Return type of OpenPGP_CompressedDataPacket::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in [/var/www/passbolt/vendor/singpolyma/openpgp-php/lib/openpgp.php, line 1699]

Environment

[PASS] PHP version 8.1.8.
[PASS] PCRE compiled with unicode support.
[PASS] The temporary directory and its content are writable and not executable.
[PASS] The logs directory and its content are writable.
[PASS] GD or Imagick extension is installed.
[PASS] Intl extension is installed.
[PASS] Mbstring extension is installed.

Config files

[PASS] The application config file is present
[PASS] The passbolt config file is present

Core config

[PASS] Debug mode is off.
[PASS] Cache is working.
[PASS] Unique value set for security.salt
[PASS] Full base url is set to <>
[PASS] App.fullBaseUrl validation OK.
[PASS] /healthcheck/status is reachable.

SSL Certificate

[PASS] SSL peer certificate validates
[PASS] Hostname is matching in SSL certificate.
[PASS] Not using a self-signed certificate

Database

[PASS] The application is able to connect to the database
[PASS] 26 tables found
[PASS] Some default content is present
[PASS] The database schema up to date.

GPG Configuration

[PASS] PHP GPG Module is installed and loaded.
[PASS] The environment variable GNUPGHOME is set to /var/www/.gnupg.
[PASS] The directory /var/www/.gnupg containing the keyring is writable by the webserver user.
[PASS] The server OpenPGP key is not the default one
[PASS] The public key file is defined in config/passbolt.php and readable.
[PASS] The private key file is defined in config/passbolt.php and readable.
[PASS] The server key fingerprint matches the one defined in config/passbolt.php.
[PASS] The server public key defined in the config/passbolt.php (or environment variables) is in the keyring.
[PASS] There is a valid email id defined for the server key.
[PASS] The public key can be used to encrypt a message.
[FAIL] The private key cannot be used to sign a message
[HELP] Make sure that the server private key is valid and that there is no passphrase.
[HELP] Make sure you imported the private server key in the keyring of the webserver user.
[HELP] you can try:
[HELP] sudo su -s /bin/bash -c “gpg --home /var/www/.gnupg --import /var/www/passbolt/config/gpg/serverkey_private.asc” www-data
[FAIL] The public and private keys cannot be used to encrypt and sign a message
[FAIL] The private key cannot be used to decrypt a message
[FAIL] The private key cannot be used to decrypt and verify a message
[FAIL] The public key cannot be used to verify a signature.
[PASS] The server public key format is Gopengpg compatible.
[PASS] The server private key format is Gopengpg compatible.

Application configuration

[PASS] Using latest passbolt version (3.6.0).
[PASS] Passbolt is configured to force SSL use.
[PASS] App.fullBaseUrl is set to HTTPS.
[PASS] Selenium API endpoints are disabled.
[PASS] Search engine robots are told not to index content.
[PASS] Registration is closed, only administrators can add users.
[PASS] Serving the compiled version of the javascript app
[PASS] All email notifications will be sent.

JWT Authentication

[PASS] The JWT Authentication plugin is enabled
[PASS] The /var/www/passbolt/config/jwt/ directory is not writable.
[PASS] A valid JWT key pair was found

[FAIL] 5 error(s) found. Hang in there!
3. Describe the problem thoroughly with as much details as possible so that people can reproduce the issues.
– I’ve followed the tutorial found on this link: https://www.howtoforge.com/install-and-configure-passbolt-password-manager-on-ubuntu-2004/
I’ve searched the community forum for answers and while I’ve found a couple of similar topics, none of the mentioned fixes worked for me so I decided to post.
I’ve tried generating new keys, I’ve checked the ownership of all the files and folders, I’ve tried removing the keys from the keyring and re-importing them. I’ve tried deleting the keyring and recreating it, nothing has helped so far.

Everything else gets a pass but the keys and I’m going crazy trying to figure out what’s wrong.

Thanks in advance!

Hi @Vination Welcome to the forum!

The official guide is here Passbolt Help | Install Passbolt CE on Ubuntu 20.04

I think you will see some differences in the versions, but the official guide is tested and will work.