Issues enabling selfRegistration

Hello Passbolt community. We just updated to 3.10.0 and wanted to enable self registration but adding the lines in the config file breaks the instance.

plugin section in /etc/passbolt/passbolt.php:

    'passbolt' => [
        // GPG Configuration.
        // The keyring must to be owned and accessible by the webserver user.
        // Example: www-data user on Debian
        'plugins' => [
            'mobile' => [
                'enabled' => true
            ],
            'jwtAuthentication' => [
                'enabled' => true
            ],
            'selfRegistration' => [
                'enabled' => true
            ],
        ],

The error i got in nginx:

FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected ''enabled'' (T_CONSTANT_ENCAPSED_STRING), expecting ']' in /etc/passbolt/passbolt.php on line 81" while reading response header from upstream

I also got a waring about deprecated self registration public setting but I cant find it in my config:

 [WARN] The deprecated self registration public setting was found in /etc/passbolt/passbolt.php.
 [HELP] You may remove the "passbolt.registration.public" setting.

Ubuntu 20.04 LTS
Nginx 1.18
Passbolt 3.10.0 (pro)

Any help is appreciated. Thanks

Hello @angel.panayotov ,

The self registration plugin feature is enabled by default. You do not need to add any line to the passbolt.php file in relation to that.
The same goes by the way for mobile and jwtAuthentication.

Regarding the warning, have you checked in the app.php file?

@pabloelcolombiano Passbolt mobile app is here.. Beta testers needed! | by Maxence Zanardo | passbolt

Do articles like this get updated to reflect current configuration like you were saying? That was news to me.

1 Like

I think v3.5 is the Release which had the default config change. I think it would be helpful if in the Release notes it is mentioned whether there are any changes to the configuration. Sometimes the internal job descriptions are too vague to parse the impact.

2 Likes

@garrett I do not believe the blog posts get updated for changes like that. They tend to be a walk through specific to a point in time with the help site being updated regularly with changes.

As for the release notes, I did just go and double check and you seem to be correct about 3.5 being when this happened with the lines:

  • PB-13161 As LU I should be able to use passbolt with my Android mobile
  • PB-13161 As LU I should be able to use passbolt with my IOS mobile

Which as you point out are a bit vague. I’ll raise this with the rest of the team in case they don’t see it here as it is a good suggestion to point out when things go from needing to be enabled in the config to just enabled by default.

1 Like

Hello @pabloelcolombiano,

The mobile feature was not available in the UI until I add it to the plugins section.
I can confirm that mobile is working and i was able to attatch my Android phone to my PB account successfully.

Regarding the warning I also looked in app.php for self registration entries but i couldn’t find them.

Im confused because i see enabled functions in default.php but they do not appear unless added in passbolt.php
Do I still need passbolt.php as a configuration file or I need to switch to default.php or i need both of them?

Thanks in advance.

Hi @angel.panayotov ,

default.php should be kept and not modified.
passbolt.php is most probably required in your case (this depends on your setup). i would suggest to keep it. However you should not need the plugins section.

Could it be that the PASSBOLT_PLUGINS_MOBILE_ENABLED env variable is set to false, and you need to overwrite it in passbolt.php?

Could you eventually enable the self registration feature?

Hello @pabloelcolombiano,

I found that PASSBOLT_PLUGINS_MOBILE_ENABLED was set to false in default.php (in the dpkg version of the config it was set to enabled, not sure why it was changed on our local config)
I enabled it and Mobile plugin started working without the plugins section in passbolt.php
Here is how it looks now:

            'mobile' => [
                'enabled' => filter_var(env('PASSBOLT_PLUGINS_MOBILE_ENABLED', true), FILTER_VALIDATE_BOOLEAN)
            ],

I also enabled selfregistration by looking in dpkg version of default.php.
In that case is it good to keep the new dpkg version of the config file on every update?

However the mysterious warning about deprecated self registration setting still remains.
I looked in all the config files searched for the exact “passbolt.registration.public” setting butI couldnt find it.

Update: I managed to get rid of the deprecated registration warning by removing it from /etc/passbolt/default.php
It was also present in /etc/passbolt/passbolt.php but removing it there does not solve my issue. Now everything looks OK.
Thank you for the help guys. Cheers.

2 Likes

It was that way at one time, but it got changed a little more than a year ago: PB-13161 enable mobile and JWT per default · passbolt/passbolt_api@85bbe7c · GitHub