blesta / module-pterodactyl

Blesta API integration with Pterodactyl
MIT License
12 stars 7 forks source link

Blesta not properly creating pterodactyl login credentials #39

Closed WaffleThief123 closed 2 years ago

WaffleThief123 commented 4 years ago

Hey Blesta team, I've been working on getting everything set up correctly in my environment and all seems correct. I do have one issue though, it appears that Blesta, upon account creation and server provisioning in Pterodactly, does not create a password for the Pterodactyl User. Below is a db query against pterodactyl users for my "test" account. The user is created, but with a seemingly random (hashed) password that does not match the originally created password. The original password is 'Password' and works to log into blesta but does not function as a login into Pterodactyl.

+----+-------------+--------------------------------------+----------+-------------------------+------------+-----------+--------------------------------------------------------------+----------------+----------+------------+----------+-------------+-----------------------+----------+---------------------+---------------------+
| id | external_id | uuid                                 | username | email                   | name_first | name_last | password                                                     | remember_token | language | root_admin | use_totp | totp_secret | totp_authenticated_at | gravatar | created_at          | updated_at          |
+----+-------------+--------------------------------------+----------+-------------------------+------------+-----------+--------------------------------------------------------------+----------------+----------+------------+----------+-------------+-----------------------+----------+---------------------+---------------------+
|  7 | bl-5        | 80400e46-f03b-4ed5-8f54-615becb28f5b | bl_5     | email@gmail.com         | Mike       | Hunt      | $2y$10$ErG1TobtARCSpQiboISuEei2ikD03aj0JVYLJC3bfMBfDANKPybNy | NULL           | en       |          0 |        0 | NULL        | NULL                  |        1 | 2020-04-22 23:14:48 | 2020-04-22 23:14:48 |
+----+-------------+--------------------------------------+----------+-------------------------+------------+-----------+--------------------------------------------------------------+----------------+----------+------------+----------+-------------+-----------------------+----------+---------------------+---------------------+

So it does appear that account creation on Pterodactyl via blesta is half-broken. Please advise on a fix.

Pomdre commented 4 years ago

Hey, according to what i know it should be like that. The password is not the same as on the blesta nor the username. But think it would have been better if it was the same.

JReissmueller commented 4 years ago

You want us to use the Blesta password for the Pterodactyl account? The password is hashed, we would have no way of getting it to send it to Pterodactyl.

ckippen commented 4 years ago

You can edit the pterodactyl_service.php module file to not generate a password. Pterodactyl will send an email asking the user to create their own. This is how the WHMCS module handles it.

JReissmueller commented 4 years ago

If we did that then we wouldn't be able to save and display the password in Blesta. Which we currently do when you click on the service row in the services widget on the client profile.

ckippen commented 4 years ago

How are you passing that information to the client? There isn't a password tag, do you provide instructions in the Welcome email?

JReissmueller commented 4 years ago

The password itself is not available to the welcome email https://dev.blesta.com/browse/CORE-3659. But you certainly could include instruction for finding it in the welcome email.

ckippen commented 4 years ago

A password tag would be a major improvement. cPanel and DirectAdmin modules make it easy to provide login information in the welcome email. The password copied from Blesta adds a lot of spaces to the end and makes it seem invalid.