cconard96 / jamf

JAMF Plugin for GLPI
GNU General Public License v2.0
6 stars 5 forks source link

[2.2.0] - Problem with import #87

Closed y0rune closed 7 months ago

y0rune commented 2 years ago

Describe the bug In my case the import it is not working. I tired with another version of that plugin the import worked but the merge not. So I decided to get the newest version. I am sure that when I wrote password in the previous version (2.1.0) the password after wrote looked longer. But to be honest I do not know it can be cause it.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Settings -> Automatic Actions -> importJamf
  2. Click on 'Execute'

Logs

[2021-11-18 20:15:01] glpiphplog.CRITICAL:   *** Uncaught Exception SodiumException: public nonce size should be SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES bytes in /var/www/html/glpi
/inc/toolbox.class.php at line 293
  Backtrace :
  inc/toolbox.class.php:293                          sodium_crypto_aead_xchacha20poly1305_ietf_decrypt()
  plugins/jamf/inc/connection.class.php:40           Toolbox::sodiumDecrypt()
  plugins/jamf/inc/apiclassic.class.php:47           PluginJamfConnection->__construct()
  plugins/jamf/inc/apiclassic.class.php:192          PluginJamfAPIClassic::get()
  plugins/jamf/inc/mobilesync.class.php:646          PluginJamfAPIClassic::getItems()
  plugins/jamf/inc/cron.class.php:56                 PluginJamfMobileSync::discover()
  inc/crontask.class.php:847                         PluginJamfCron::cronImportJamf()
  front/crontask.form.php:49                         CronTask::launch()
  [root@glpi glpi$] php bin/console glpi:security:change_key
Found 2 field(s) and 4 configuration entries requiring migration.
Do you want to continue ? [Yes/no]yes

In toolbox.class.php line 293:
 public nonce size should be SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES bytes
glpi:security:change_key

When I tried command php bin/console glpi:security:change_key with disabled jamf it works. I found that solution on the glpi forum but it is not working for my case :(

System Specifications (please complete the following information):

cconard96 commented 2 years ago

The best thing I can suggest is to try a newer version of GLPI if possible and then to also re-enter your JSS password in the config page.