HEUAccess
Documentation on this page is intended for customers of HeroEngine managing their own server(s).
- See also UACCESS Protocol
HEUAccess is a "stub" solution to a licensee's authentication system. This program is a simple application that implements the authentication interface and provides a simple text-file based means of managing accounts. Ultimately, you will replace this with some other custom application that implements the authentication interface that binds this with your own billing and account management system.
The default location for the data files is in C:\heuacces\
.
Contents |
Server Configuration File
HEUAccess requires a configuration file which instructs the program on which IP and port to listen.
The file should be named server.cfg, and some example contents are:
GROUP=server LISTENIP=0.0.0.0 LISTENPORT=7561 END_GROUP
Adding Users
HEUAccess reads a text file to populate its list of valid users. The file contains lists of accounts and properties of those accounts. This is an example account:
ACCOUNT=ACCOUNT-NAME NAME=My Account Name SUBSCRIPTIONS=HE,OFFICE,OTHER AUTHORIZATIONS = _IsAllowedToUseHeroBlade,1,_IsAllowedToModifyScripts,1,_IsAllowedToUseRepositoryBrowser,1 PASSWORD=insecure END_ACCOUNT
To add a new account, put a new account section into the accounts.dat file. Then restart HEUAccess to resource the file.
Account Atributes
All attributes are followed by an '=' character and then the value. Spaces are not allowed
ACCOUNT This is the account name entered when logging in.
NAME The full name of the user the account is for.
SUBSCRIPTIONS List of product IDs that the account has access to.
AUTHORIZATIONS List of authorizations used by the engine, and by users, to allow or prohibit access to sections of functionality.
PASSWORD The plaintext password used when logging in.
END_ACCOUNT This keyword does not have a value. It ends the account entry.
Altering HEUAccess to Allow Test Accounts to Authenticate
- Open the solution \\<PerforceRoot>\HEUAccess\HEUAccess.sln
- Modify the HEUAccess.cs file
In function dataHasArrivedHandler(), find the section of code beginning with if (cmdType = "A" )
, and alter it as follows.
if(cmdType == "A") //Authenticate user { if (cmd[1].ToUpper().StartsWith("TEST")) { user.Send("A\t" + cmd[1] + "\tKEY\tABC123\t1\t" + cmd[1] + "\n"); return; } if(cmd.Length != 4) { user.Send("?"); return; }
Further in this function, add a code snipped after the section beginning with else if(msg.StartsWith("S\tN\t"))
else if(msg.StartsWith("S\tN\t")) //Check subscription { if (cmd[2].ToUpper().StartsWith("TEST")) { user.Send("S\t" + cmd[2] + "\tINTERNAL\n"); return; } string disabled = accounts.GetConfigValue(cmd[2], "DISABLED", true);
And finally, add a code snippet to return the subscription string required by the world to be tested, after the line else if(msg.StartsWith("S\tK\t"))
. You will need to change the 'HETEST' imbedded in this code snippet to the appropriate subscription string.
else if(msg.StartsWith("S\tK\t")) //Get all subscriptions on account { if (cmd[2].ToUpper().StartsWith("TEST")) { user.Send("S\t" + cmd[2] + "\tHETEST\t0\tSubscription for the testing world\n"); return; } string disabled = accounts.GetConfigValue(cmd[2], "DISABLED", true);
- Build HEUAccess
- Create a Config File
- run HEUaccess by logging into your Windows Server as the HeroEngine user
- reconfigure the uaccess transport configuration value on the testing world to point to the altered HEUaccess
Configuring a World to Use an Alternate HEUAccess
- Modify HEUAccess's configuration file (server.cfg) to have appropriate values for the LISTENIP and LISTENPORT parameters. If you are running two HEUAccesses on the same physical server you should make sure they utilize different ports.
GROUP=server LISTENIP=0.0.0.0 LISTENPORT=7561 END_GROUP
- Start up your new HEUAccess (could be done in a .bat file or part of startup etc)
- Modify Master Control's configuration file (1.cfg), typically located on the Windows HeroEngine Server Box in the path (C:\\Program Files\HeroEngine\FIRESTORMDAEMONS<GAME>\1.cfg)
- uaccessTransport to point to the proper location for your new uaccess
<FireStorm> <masterControlTransport>tcp:mastercontrol.eval.heroengine.net:62455</masterControlTransport> <minimumCycleTime>20</minimumCycleTime> <PostOfficeLogRate>200</PostOfficeLogRate> <defaultInactivityLimitMillis>2001000</defaultInactivityLimitMillis> <defaultWriteTimeoutMillis>60000</defaultWriteTimeoutMillis> <accesscontrolUsername>he_access@evaldb.heroengine.net/hedb.world</accesscontrolUsername> <accesscontrolPassword>password</accesscontrolPassword> <uaccessProductID>OFFICE</uaccessProductID> <uaccessTransport>tcp:localhost:7561</uaccessTransport> <serviceUsername>FS_SERVICE@evaldb.heroengine.net/hedb.world</serviceUsername> <servicePassword>password</servicePassword> </FireStorm>
- Modify the default Parameter for uaccessTransport to point to the appropriate address/port for your new HEUAccess
- Reset Master control to reload the new configs (/reset in Master Control Console's chat panel).
- Restart the Authenticator process (typically running on the Windows HeroEngine Server), cntrl-C and then continue so that it reloads the uaccessTransport configuration changes from Master Control