Ah, I missed Lucifer's post, sorry. I Read it now and I have to say that this is a standard I would rather support, since it looks like it would make writing the authentication scripts even easier, a proper RPC library provided.
Yeah, I don't like the abuse of error codes; it feels wrong to return a 404 or 401 and then actually give the user the information he requested anyway. I don't think any real world problems would come from this from, say, bots crawling our authentication sites; but problems in the other direction may very well happen. For example, there may be thousands of sites out there that, by coincidence, produce valid login responses for us simply by being accessible.
In the end, I don't care much about that part of the system; it's using the good old ?method=md5&name=z-man type of argument passing. That works, and I understand it. The other stuff, while I understand it too, sounds like overkill right now to me. Can I leave this for my two co-Triumviri to figure out? You're more web development people than I am.
If you want to have a go at it, the relevant code is in nAuthentification.cpp and nKrawallPrivate.cpp (historical reasons, the division is not structurally motivated, although nKrawall.h/cpp is meant to be network code free). The first function that gets called is nLoginProcess::FetchInfoFromAuthorityRemote(), which is supposed to fill the nLoginProcess::method member variable with a good hashing method for the password, and it also sanity checks the authority URI.
The second function is nKrawall::CheckScrambledPassword(). It gets the salt and the password hash the client sent and is supposed to fill the result data structure (mostly consisting of a success flag and an error message), and it contains authority and username, which are already set from the outside; they are modifyable and changes to them will get respected.
Apart from that bit, and other small things, the branch is finished. Of course, I went a bit overboard :
There is now an actual access level system, you can have admins of various types with various rights. Every console command has a minimal access level required to activate it, all configurable, of course. Admins can recruit other admins ad-hoc via /op (they'll have a lower level, that function replaces the earlier /pickup command) and revoke that with /deop, and you can modify access levels with /promote and /demote. That's actually stuff from DedCon.
The old MD5_PASSWORD commands are also gone; instead there are just two, LOCAL_USER and LOCAL_TEAM, defining generic local accounts for users and teams. Teams, naturally, get Team Member status once they log in. Admin access rights are now handled with the USER_LEVEL command, and you can assign admin rights to players who authenticate with a password server (although I would not recommend that). You can have reserved nicknames. You can also ban players based on their authentication name, since the one you put into the UI on the client is auto-transmitted to the servers, this may even be useful
Oh yeah, the UI. The clientside changes, about the only change on the branch that has an effect if --enable-armathentication is not active: You can enter your authentication name into your player profile, and there's an auto-login switch. If active, authentication happens automatically when you enter a server, you'll be prompted for your password, of course, unless you saved it. If the switch is off, you can also log in over a new item in the ingame menu, and you can of course log in with the /login chat command, which now either accepts a full authentication username (name@ for local accounts) or an authority, in which case you'll have to enter your username at the prompt.
Anything else? Oh yeah, the other change affecting everyone, but its' not yet committed because SVN seems to be down; I unified the various commands that act on players. Specifically, the console commands now also accept partial names, like /msg does, and they all use the same function now instead of the previous three. The console commands still accept a numeric user ID, there only has been a bugfix to toInt, which would return numbers in unexpected situations. And there was some chat handling refactoring, the place was a mess. Let's hope the changes merge well. I checked a bit, and it appears the only new chat function specific to the trunk is /help.
Todo:
- authentication server white/blacklists.
- basic MITM protection
- maybe make clientside recordings safe even when you log on with them, perhaps it is possible to randomize recorded keypresses in the critical areas.
- there was a RemoveColors call somewhere that seemed wrong.
- write docs on the wiki