So the issue is that since we're using Cemetech as an authentication server, and the game as a whole runs on different user hosted servers, we have 3 different client-server models operating that need to interact without compromising Cemetech login information or compromising the security of SAX or allowing unauthenticated individuals to use the name of registered usernames.
TBG servers connect to Cemetech, and receive a server id (public identification) and server key (private authentication). They must send a heartbeat at LEAST every 180 seconds so that Cemetech is aware of their presence. Players log in and receive a session id (just like they normally would if they were signing in to the forum). When they connect to a server they send both their username and a hashed copy of their SID. The server runs these by Cemetech, along with it's own key+id (for identification) and if it's a valid pair, adds it to a database table of users connected to each server (allowing chat messages involving that user/server pair to be sent to SAX), and reports back to the server on whether or not the username/hashed-SID combo was valid. If it was INVALID, then the server disconnects the user with a message telling them they must be logged in to Cemetech to play. Otherwise it just adds them to the game and sends it's server id for use in chat scripts. Notice that the player and server do not have to trust each other with any information that could be used to impersonate the other in interactions with Cemetech. Likewise Cemetech doesn't have to trust the players or the servers with any information other than validating or invalidating each query.
The last step of this is to add unauthenticated fallbacks for the cases when Cemetech is down (use the Garage Games master server + Torque's messaging capabilities instead of SAX) or to allow unauthenticated LAN play.[/i]
TBG servers connect to Cemetech, and receive a server id (public identification) and server key (private authentication). They must send a heartbeat at LEAST every 180 seconds so that Cemetech is aware of their presence. Players log in and receive a session id (just like they normally would if they were signing in to the forum). When they connect to a server they send both their username and a hashed copy of their SID. The server runs these by Cemetech, along with it's own key+id (for identification) and if it's a valid pair, adds it to a database table of users connected to each server (allowing chat messages involving that user/server pair to be sent to SAX), and reports back to the server on whether or not the username/hashed-SID combo was valid. If it was INVALID, then the server disconnects the user with a message telling them they must be logged in to Cemetech to play. Otherwise it just adds them to the game and sends it's server id for use in chat scripts. Notice that the player and server do not have to trust each other with any information that could be used to impersonate the other in interactions with Cemetech. Likewise Cemetech doesn't have to trust the players or the servers with any information other than validating or invalidating each query.
The last step of this is to add unauthenticated fallbacks for the cases when Cemetech is down (use the Garage Games master server + Torque's messaging capabilities instead of SAX) or to allow unauthenticated LAN play.[/i]