theforeman / foreman_fog_proxmox

Foreman plugin to add Proxmox compute resource based on fog-proxmox gem
GNU General Public License v3.0
105 stars 30 forks source link

Unexpected error message when configuring ComputeRessource with invalid user token #217

Open neomilium opened 2 years ago

neomilium commented 2 years ago

Describe the bug During the creation or modification of a Compute Ressource, after selecting the user token auth method and filling all fields with invalid token, I tested connection with the provided button. It replied an Proxmox version Unknown is not semver suitable error.

To Reproduce Steps to reproduce the behavior:

  1. Go to Compute Resources, create or modify an existing one
  2. Set authentication method to User token
  3. Fill form with invalid user token
  4. Use the Test connection button
  5. See error:
Unable to save
ERF42-4050 [Foreman::Exception]: Proxmox version Unknown is not semver suitable

Expected behavior Raise an error about invalid credentials.

inetshell commented 1 year ago

I'm also getting this issue. I tested with the following versions:

@tristanrobert I'm thinking about sponsor your project if it's still alive.

inetshell commented 1 year ago

I just tried using "access ticket" instead of token and worked for PROXMOX 6.4-15 and 7.3-3.

tristanrobert commented 1 year ago

I have a few time now to work on it. Sponsor would help me to get more time. Thank you. I am working on v0.15.0. I have already fixed some major bugs. I test it and again and again before merging very soon.

pdolinic commented 1 year ago

I can confirm this bug, you can just use the 2nd option of access_ticket for a workaround as of now.

1) Firstly create a real Linux root_user (Proxmox won't do that for you)(your_new_root_user), then -> add that Linux user to Proxmox(your_new_root_user@pam), then (assuming you you want to grant maximum permissions for testing without worring about security) 3) Go to datacenter -> permissions -> add -> user permissions and add: path \ , user: your_new_root_user@pam, Role: Administrator , Propagate checked