GPG verify fails (Other actions)

Hello,

Am doing a fresh install of our passbolt environment and I believe i might have found a bug in the newest version.

Using passbolt 2.3
on Ubuntu 16.04

./bin/cake passbolt healthcheck

     ____                  __          ____
    / __ \____  _____ ____/ /_  ____  / / /_
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /
 /_/    \__,_/____/____/_.___/\____/_/\__/

 Open source password manager for teams
---------------------------------------------------------------
 Healthcheck shell......Notice Error: Undefined variable: decryptedMessage2 in [/data/www/passbolt/src/Utility/Healthchecks/GpgHealthchecks.php, line 278]

2018-09-06 10:03:07 Notice: Notice (8): Undefined variable: decryptedMessage2 in [/data/www/passbolt/src/Utility/Healthchecks/GpgHealthchecks.php, line 278]


Notice Error: Undefined variable: decryptedMessage2 in [/data/www/passbolt/src/Utility/Healthchecks/GpgHealthchecks.php, line 279]

2018-09-06 10:03:07 Notice: Notice (8): Undefined variable: decryptedMessage2 in [/data/www/passbolt/src/Utility/Healthchecks/GpgHealthchecks.php, line 279]

                                                                                                                                     
---------------------------------------------------------------

 Environment

 [PASS] PHP version 7.0.30-0ubuntu0.16.04.1.
 [PASS] PCRE compiled with unicode support.
 [PASS] The temporary directory and its content are writable.
 [PASS] The public image directory and its content are writable.
 [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 https://passbolt.widgets.nl
 [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] 18 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 server gpg key is not the default one
 [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 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 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.
 [PASS] The private key can be used to sign a message.
 [PASS] The public and private keys can be used to encrypt and sign a message.
 [PASS] The private key can 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.

 Application configuration

 [PASS] Using latest passbolt version (2.3.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.

  2 error(s) found. Hang in there!

Running gpg from commandline works and shows key
www-data@web01:/data/www/passbolt$ gpg2 --list-keys --fingerprint
/var/www/.gnupg/pubring.gpg
---------------------------
pub rsa4096/72522DF4 2018-09-06 [SC]
Key fingerprint = 6166 XX
uid [ unknown] XXX
sub rsa4096/XXXX2018-09-06 [E]

www-data@web01:/data/www/passbolt$ gpg --list-keys --fingerprint
/var/www/.gnupg/pubring.gpg
---------------------------
pub   4096R/72522DF4 2018-09-06
      Key fingerprint = 6166 XXX
uid                  XXX
sub   4096R/XXXX2018-09-06

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

I wasn’t sure if I was messing up or not. So i did a full clean install of ubuntu and followed this tutorial step by step:

It ran into the same issue.

install steps. Because this is ubuntu 16.04 I have a few things that are different. They are listed below.

apt install phpmyadmin mysql-server
apt-get install make git-core composer unzip g++ linux-headers-amd64 -y
apt-get install make git-core composer unzip g++ -y
a2enmod rewrite
apt-get install php7.0 php7.0-cli php7.0-common libapache2-mod-php7.0 php7.0-json php7.0-readline php7.0-mysqlnd libonig4 libqdbm14 -y
apt-get install php7.0 php7.0-cli php7.0-common libapache2-mod-php7.0 php7.0-json php7.0-readline php7.0-mysqlnd  libqdbm14 -y
apt-get install libgpgme11-dev php7.0-gnupg -y
apt-get install libgpgme11-dev php-gnupg -y
systemctl restart apache2
nano /etc/apache2/sites-enabled/000-default.conf
nano /etc/hosts
cd /var/www
git clone https://github.com/passbolt/passbolt_api.git ./passbolt
apt-get install haveged -y
gpg --gen-key
gpg --armor --export 
gpg --armor --export 
chmod 640 /var/www/passbolt/config/gpg/serverkey*
chown www-data:www-data /var/www
sudo su -s /bin/bash -c "gpg --list-keys" www-data
chown -R  www-data:www-data /var/www/passbolt
cd /var/www/passbolt
systemctl restart apache2
su -s /bin/bash www-data
apt install php7.0-intl
apt install php7.0-curl
su -s /bin/bash www-data
gpg --list-keys --fingerprint
su -s /bin/bash www-data
apt install libonig2

linux-headers-amd64 >> default installed
php7.0-gnupg >> is called php-gnupg
libonig4 >> only version 2 is available

Hmm it seems that php-gnupg does not have the correct package to verify. The solution is as follows:

sudo apt remove php-gnupg
sudo pecl install gnupg
extension=gnupg.so >> php.ini

EDIT:

The timeline is a bit screwed up. The first post was a draft that I already wrote but never posted.

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.