Skip to content

Remote Administration Client

Joshua Hertlein edited this page Aug 1, 2013 · 9 revisions

This feature is still under development and is not yet available to use.

Overview

Since v2.3.0, MCTowns includes the MCT Remote Admin Client, a cross-platform (GNU/Linux, Windows, Mac) desktop application.to manage your towns without logging in to Minecraft. It also lets you view the MCTowns configuration settings, and view towns, territories, plots, and players in a cleaner fashion than can be done in-game.

Getting Started

Download

The client can be downloaded from the BukkitDev file listing.

Installation

There is none. Similar to minecraft.exe or minecraft.jar that you download from minecraft.net, just double-click the file and it'll launch. A .desktop file is also available for GNU/Linux.

Key Generation

  1. Click the System Users icon to open the Identity Manager
  2. Click the New Identity button to cause the New Identity Generation panel to appear.
  3. Enter your minecraft username in the "Key Pair Username" field
  4. Leave the Key Length as-is (2048 bits).
  5. Click Go to generate a new identity.
  6. Click Export in the top-middle of the window.
  7. Navigate to your desktop (or wherever you want) and click "Export". This creates a file that is the "public" half of your identity. Get this file to your server owner somehow (copy+paste the contents into chat, email it, upload it to a file-sharing site... whatever you need to do.)
  8. Close the identity manager window.

Connecting

Now, just type in the name of your server and click the green connect button. There you go!

Setting Up the Server

  1. Open the MCTowns plugin config file and set remoteAdminServerEnabled: false to be remoteAdminServerEnabled: true.
  2. Restart your minecraft server.
  3. Allow traffic (in and out) on port 3333 (or whatever port you specify in the MCTowns config) through your firewall/NAT system.
  4. For each player who will be allowed to use the client, tell them to follow the "Getting Started" steps to generate an identity file. You should place this file in .../plugins/MCTowns/auth_keys/.
  5. Optionally, edit the file and set their group: attribute to whatever permission group you want them to be in. See below under "Configuring Remote Permissions" for more information about groups and permissions. By default, they will be able to look at everything, but change nothing.
  6. No need to restart the server. Just tell the user it's okay to connect now.

Configuring Remote Permissions

The Remote Administration Daemon is independent of normal Bukkit permissions. Instead, it uses its own (very simple!) permissions system. It is groups-based.

Easiest Method

The remote permission system is simple-yet-flexible. However, if you don't want to mess with this too much, the defaults should work fine for just about everyone!

NOTICE: IT IS IMPORTANT THAT YOU CHECK WHICH GROUP IS LISTED IN ANY IDENTITY (.pub) FILE YOU ARE ADDING TO THE AUTHORIZED KEYS DIRECTORY. IT'S TOTALLY POSSIBLE FOR A PLAYER TO EDIT THEIR FILE BEFORE THEY GIVE IT TO YOU, AND SET THEIR GROUP TO "admin" EVEN THOUGH THE DEFAULT IS "default".

(If it tells you anything about how important it was that you read the above notice, I actually held down Shift instead of just hitting Caps Lock in an attempt to convey how important it is to check which group an identity file says it's in before you add it.)

You won't need to mess with group definitions at all, so ignore the file .../plugins/MCTowns/remote-config.yml You just need to change the groups players are in.

  • If you just want a player to be able to look, you don't have to do anything beyond add their identity to the .../plugins/MCTowns/auth_keys/ directory. Their file should read group: default

  • If you want a mayor to be able to do his mayor-stuff from the remote client, add his identity file, then edit it and change group: default to be group: mayor. He's now able to see everything, but only edit his own towns.

  • If you want a player to be able to edit everything (i.e. you've probably also given him the mct.admin permission node), add his identity file and edit it to change group: default to be group: admin.

Groups

In .../plugins/MCTowns/remote-config.yml you will define groups, give them a type, a parent group, and a list of actions they are allowed to run. There are sane defaults that are generated on first run that you can either leave as-is, or study and modify to your own liking.

Users

The directory .../plugins/MCTowns/auth_keys/ (the same place you added the .pub files for your users' identities) is the sole place where remote users settings are stored. The files will, by default, be generated with the identity being in the permission group "default" (and if the group field is left blank or not there at all, they'll be put in the group "default" anyway). You may edit this file and set the "group" attribute to be any group defined in remote-config.yml.

Default Setup

As was mentioned before, sane defaults will be generated upon the plugin's first run. If you change nothing (don't make custom groups or change the groups users are in), users will be able to see everything, but modify nothing.

There are three default groups:

  • default - see everything, change nothing
  • mayor - see everything, change towns, territories and plots they are the mayor of
  • admin - see everything, change everything, and can manage identities on the remote server (add/remove)

Set users group accordingly.

Custom Permission Groups

You should be able to infer a lot by studying the default remote-config.yml, but there are a few subtleties. The first one is group "types."

You can define a group to be either a "resident" group, a "mayor" group, or an "admin" group. Note that, while these are also the names of the default groups, that's just a coincidence. Name your groups whatever the heck you want, so long as it's valid YAML. However, group types cannot be whatever the heck you want them to be. They must either be resident, mayor, or admin.

Here's what the types do:

  • resident - If a member is in the resident group, even if they are authorized to modify a town, they won't be able to even if they are its mayor. Note, this doesn't mean you should just willy-nilly give everyone UPDATE_TOWN or MODIFY_TOWN powers. That's just asking for trouble.
  • mayor - Regardless of what actions the group is authorized to do, members of a "mayor" group can only ever modify towns, territories, and plots of which they are the mayor.
  • admin - Regardless of what actions the group is authorized to do, members of an "admin" group can always modify any towns, territory, or plot that they can see.

The second subtlety is that there must ALWAYS be a group named "default". If you don't define one, one will be made internally (won't appear in the config) with no permissions and type "resident". This is important because remember, if you don't specify a group in an identity file, it'll be in the "default" group.

List of Remote Actions

These will go under the authorized: field in remote-config.yml in YAML list format. Refer to the default remote-config.yml for an example.

  • KEY_EXCHANGE
  • TERMINATE_SESSION
  • GET_TOWN_VIEW
  • GET_TOWN_LIST
  • GET_TERRITORY_VIEW
  • GET_TERRITORY_LIST
  • GET_PLOT_VIEW
  • GET_IDENTITY_LIST
  • GET_META_VIEW
  • GET_PLAYER_LIST
  • GET_VIEW_FOR_PLAYER
  • GET_PLOTS_LIST
  • UPDATE_TOWN
  • CREATE_TOWN
  • DELETE_TOWN
  • MODIFY_TOWN_MEMBERSHIP
  • MODIFY_TOWN_ASSISTANTS
  • CREATE_TERRITORY
  • DELETE_TERRITORY
  • MODIFY_TERRITORY_MEMBERSHIP
  • UPDATE_PLOT
  • MODIFY_PLOT_MEMBERSHIP
  • CREATE_PLOT
  • DELETE_PLOT
  • UPDATE_CONFIG
  • ADD_IDENTITY
  • DELETE_IDENTITY

Clone this wiki locally