Certificate issues since moving FOG from Ubuntu to Fedora.
-
@Hanz lol. @Jbob can you please elaborate?
-
Per Jbob I ran the following cmd on fog database to clear security tokens.
UPDATE hosts SET hostPubKey="", hostSecToken="", hostSecTime="0000-00-00 00:00:00";
I also reset encryption data from Web UI on all hosts (which I assume does the same things from different angles)
This seemed to work, as of now my VM host is working correctly (although it has not been up and running as long as my work comp)
BUT
My work computer which has been left on, has gone from “Authentication Authenticated” back to “Invalid host certificate” and “Invalid Security Token”I restarted the service on the VM in order to force the update to 9.7 from 9.6 and it went through the process without a hitch, through reboots and all. Im running it all day today to see if I can find the point it fails (if it does).
-
@Hanz said:
Per Jbob I ran the following cmd on fog database to clear security tokens.
UPDATE hosts SET hostPubKey="", hostSecToken="", hostSecTime="0000-00-00 00:00:00";
I also reset encryption data from Web UI on all hosts (which I assume does the same things from different angles)
This seemed to work, as of now my VM host is working correctly (although it has not been up and running as long as my work comp)
BUT
My work computer which has been left on, has gone from “Authentication Authenticated” back to “Invalid host certificate” and “Invalid Security Token”I restarted the service on the VM in order to force the update to 9.7 from 9.6 and it went through the process without a hitch, through reboots and all. Im running it all day today to see if I can find the point it fails (if it does).
Added to WiKi: https://wiki.fogproject.org/wiki/index.php/FOG_Client
-
This is a copy of my log on the machine I mentioned that keeps losing security token somehow…at the 1:35 pm mark it shows invalid host certificate, but an Authentication Authenticated statement…
On the next checkin ~ 2:36 it goes to invalid host certificate, invalid security token.
I reset encryption data (again) and restarted service on the local computer @ the 6:00 mark and the final shows it going back to Authentication Authenticated upon restart of the service. (sorry for the uploaded log, but it wouldn’t let me post just the copied code this time.)
This is next checkin
------------------------------------------------------------------------------ ----------------------------------TaskReboot---------------------------------- ------------------------------------------------------------------------------ 11/15/2015 7:03 PM Client-Info Version: 0.9.7 11/15/2015 7:03 PM TaskReboot Running... 11/15/2015 7:03 PM Middleware::Communication URL: http://10.72.3.50/fog/service/servicemodule-active.php?moduleid=taskreboot&mac=B4:99:BA:E9:B8:B8|0A:00:27:00:00:00|CC:52:AF:87:F3:DA||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1 11/15/2015 7:03 PM Middleware::Communication Response: Success 11/15/2015 7:03 PM Middleware::Communication URL: http://10.72.3.50/fog/service/jobs.php?mac=B4:99:BA:E9:B8:B8|0A:00:27:00:00:00|CC:52:AF:87:F3:DA||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1 11/15/2015 7:03 PM Middleware::Communication Response: Invalid host certificate 11/15/2015 7:03 PM Middleware::Communication URL: http://10.72.3.50/fog/management/other/ssl/srvpublic.crt 11/15/2015 7:03 PM Data::RSA FOG Server CA cert found 11/15/2015 7:03 PM Middleware::Authentication Cert OK 11/15/2015 7:03 PM Middleware::Communication POST URL: http://10.72.3.50/fog/management/index.php?sub=authorize 11/15/2015 7:03 PM Middleware::Communication Response: Success 11/15/2015 7:03 PM Middleware::Authentication Authenticated 11/15/2015 7:03 PM Middleware::Communication URL: http://10.72.3.50/fog/service/jobs.php?mac=B4:99:BA:E9:B8:B8|0A:00:27:00:00:00|CC:52:AF:87:F3:DA||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1&newService=1 11/15/2015 7:03 PM Middleware::Communication Response: No jobs ------------------------------------------------------------------------------```
-
@Wayne-Workman After clearing all security tokens for hosts, my database shows all hosts with no tokens…When are these tokens supposed to recreate themselves, as it looks like none are being recreated which may be why my clients keep saying invalid host certificate. I don’t know who creates them or when for that matter, but it doesn’t seem to be happening.
-
Fog automatically creates the token during the authentication sequence. Ihc is a signifier to the client that a new aes key needs to be generated. If the aes key and security token are blank the server creates a security token for the client and the client creates its own aes key. The server stores the aes key with the host for a specified period of time (30 minutes for now) and resets the key to null if the expired time occurs. When the key expires the client will receive the ihc (invalid host certificate) and it knows it needs to generate a new aes key. During every authentication sequence, as spawned when ihc is met, (after initial connect) the client sends what it knows is the current security token. As long as this matches what the server knows is true, a new security token is generated and sent to the client and the server stores the newly generated aes key for the host.
-
@Tom-Elliott As of now I have no hosts with any security tokens or pubkeys associated, this is after resetting them Friday. Some have been running all weekend. All I have under /opt/fog/snapins/ssl is a file named fog.csr. The client doesn’t seem to be creating new aes keys, seeing as how they’re all “expired”/blank on server. Am I getting that right ?
-
@Hanz if you run:
ls -lhart /opt/fog/snapins/ssl
do you see a.srvprivate.key
? -
@Tom-Elliott yes
-
@Hanz sorry didn’t realize it was a hidden file when Wayne Workman showed me where they were.
-
@Tom-Elliott below is the output from said command. Curious about the permissions for the … as it usually is owned by root I thought.
[bcs@fog-server ~]$ ls -lhart /opt/fog/snapins/ssl total 16K drwsrwsrwx 2 fog apache 4.0K Oct 16 09:25 . drwsrwsr-x 4 fog apache 4.0K Nov 15 19:34 .. -rwxrwxrwx 1 fog apache 3.2K Nov 15 23:35 .srvprivate.key -rwxrwxrwx 1 fog apache 1.6K Nov 15 23:35 fog.csr
Currently running 5368
-
@Hanz the permissions on my fog server are:
-rw-r--r-- 1 fog apache 1586 May 27 11:31 fog.csr -rw-r--r-- 1 fog apache 3243 May 27 11:31 .srvprivate.key
-
UPDATE: Per SVN 5374 tokens are being created correctly… Thank you @Tom-Elliott !!!