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
So I’ve been trying to install this on FreeBSD. Most of the installation went smoothly, but I keep running into the dreadful “The OpenPGP key can not be used to encrypt” error (error details below).
{
"code": 400,
"body": {
"gpgkey": {
"armored_key": "The OpenPGP key can not be used to encrypt."
}
}
}
I’ve already ruled out NTP as a problem, as well as a number of other things. Even unsecure[_private].key
results in this error. I’ve looked at every single post I could find on this topic (mostly on this forum), but have yet to arrive to a solution.
I’ve tried different types of keys, and all sorts of other things, to no avail (which reminds me: the tutorial is broken for newer GPG versions, as they now default to elliptic curve cryptography).
The issue happens after bin/cake passbolt install
, when I’m trying to create a new user via the URL it returns.
Thanks!
System information:
$ uname -a
FreeBSD passbolt 12.4-RELEASE-p1 FreeBSD 12.4-RELEASE-p1 GENERIC amd64
# (list of relevant PHP packages)
$ pkg info -q | grep '^php' | xargs
php82-8.2.7 php82-composer2-2.5.8 php82-ctype-8.2.7 php82-curl-8.2.7 php82-dom-8.2.7 php82-extensions-1.0 php82-fileinfo-8.2.7 php82-filter-8.2.7 php82-gd-8.2.7 php82-iconv-8.2.7 php82-intl-8.2.7 php82-ldap-8.2.7 php82-mbstring-8.2.7 php82-opcache-8.2.7 php82-pdo-8.2.7 php82-pdo_mysql-8.2.7 php82-pdo_sqlite-8.2.7 php82-pear-1.10.13 php82-pear-Console_CommandLine-1.2.2 php82-pear-Crypt_GPG-1.6.7 php82-pecl-gnupg-1.5.1 php82-phar-8.2.7 php82-posix-8.2.7 php82-session-8.2.7 php82-simplexml-8.2.7 php82-sqlite3-8.2.7 php82-tokenizer-8.2.7 php82-xml-8.2.7 php82-xmlreader-8.2.7 php82-xmlwriter-8.2.7 php82-xsl-8.2.7 php82-zlib-8.2.7
$ gpg --version
gpg (GnuPG) 2.3.8
libgcrypt 1.9.4
Copyright (C) 2021 Free Software Foundation, Inc.
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /var/db/www/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
AEAD: EAX, OCB
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
Output of healthcheck:
Environment
[PASS] PHP version 8.2.7.
[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 https://passbolt.stdrand.com
[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] 30 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/db/www/.gnupg.
[PASS] The directory /var/db/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 /usr/local/www/passbolt/config/passbolt.php and readable.
[PASS] The private key file is defined in /usr/local/www/passbolt/config/passbolt.php and readable.
[PASS] The server key fingerprint matches the one defined in /usr/local/www/passbolt/config/passbolt.php.
[PASS] The server public key defined in the /usr/local/www/passbolt/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.
[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.
[PASS] The private key can be used to decrypt and verify a message.
[PASS] The public key can 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 (4.0.2).
[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.
[INFO] The Self Registration plugin is enabled.
[INFO] Registration is closed, only administrators can add users.
[PASS] The deprecated self registration public setting was not found in /usr/local/www/passbolt/config/passbolt.php.
[WARN] Host availability checking is disabled.
[HELP] Make sure this instance is not publicly available on the internet.
[HELP] Or set the PASSBOLT_EMAIL_VALIDATE_MX environment variable to true.
[HELP] Or set passbolt.email.validate.mx to true in /usr/local/www/passbolt/config/passbolt.php.
[PASS] Serving the compiled version of the javascript app.
[WARN] Some email notifications are disabled by the administrator.
JWT Authentication
[PASS] The JWT Authentication plugin is enabled
[PASS] The /usr/local/www/passbolt/config/jwt/ directory is not writable.
[PASS] A valid JWT key pair was found
SMTP Settings
[PASS] The SMTP Settings plugin is enabled.
[PASS] SMTP Settings coherent. You may send a test email to validate them.
[WARN] The SMTP Settings source is: /usr/local/www/passbolt/config/passbolt.php.
[HELP] It is recommended to set the SMTP Settings in the database through the administration section.
[WARN] The SMTP Settings plugin endpoints are enabled.
[HELP] It is recommended to disable the plugin endpoints.
[HELP] Set the PASSBOLT_SECURITY_SMTP_SETTINGS_ENDPOINTS_DISABLED environment variable to true.
[HELP] Or set passbolt.security.smtpSettings.endpointsDisabled to true in /usr/local/www/passbolt/config/passbolt.php.
[PASS] No error found. Nice one sparky!
Relevant portion of error.log
:
Request URL: /setup/complete/<snip UUID>
Client IP: <snip IP>
2023-06-21 13:48:23 error: [App\Error\Exception\CustomValidationException] The OpenPGP key can not be used to encrypt. in /usr/local/www/passbolt/src/Service/Setup/SetupCompleteService.php on line 93
Stack Trace:
- /usr/local/www/passbolt/src/Service/Setup/SetupCompleteService.php:52
- /usr/local/www/passbolt/src/Controller/Setup/SetupCompleteController.php:63
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Controller/Controller.php:547
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php:139
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php:114
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/BaseApplication.php:320
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:86
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Middleware/SecurityHeadersMiddleware.php:255
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/src/Middleware/HttpProxyMiddleware.php:50
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php:138
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/plugins/PassboltCe/JwtAuthentication/src/Middleware/JwtCsrfDetectionMiddleware.php:55
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/src/Middleware/GpgAuthHeadersMiddleware.php:40
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/plugins/PassboltCe/Locale/src/Middleware/LocaleMiddleware.php:47
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/plugins/PassboltCe/MultiFactorAuthentication/src/Middleware/InjectMfaFormMiddleware.php:67
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/plugins/PassboltCe/MultiFactorAuthentication/src/Middleware/MfaRequiredCheckMiddleware.php:82
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/vendor/cakephp/authentication/src/Middleware/AuthenticationMiddleware.php:124
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/plugins/PassboltCe/JwtAuthentication/src/Middleware/JwtDestroySessionMiddleware.php:43
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/src/Middleware/SessionAuthPreventDeletedUsersMiddleware.php:46
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Middleware/BodyParserMiddleware.php:172
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/src/Middleware/SessionPreventExtensionMiddleware.php:66
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/src/Middleware/ApiVersionMiddleware.php:46
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/plugins/PassboltCe/JwtAuthentication/src/Middleware/JwtRouteFilterMiddleware.php:47
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/plugins/PassboltCe/JwtAuthentication/src/Middleware/JwtAuthDetectionMiddleware.php:58
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php:186
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php:68
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php:131
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/src/Middleware/ContentSecurityPolicyMiddleware.php:39
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/src/Middleware/ContainerInjectorMiddleware.php:54
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:82
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Runner.php:67
- /usr/local/www/passbolt/vendor/cakephp/cakephp/src/Http/Server.php:90
- /usr/local/www/passbolt/webroot/index.php:40