SuperUser
Good Fences Make Good Neighbors
A MySQL based player control that implements the concept of superuser, borrowed from Unix. Players are managed using a MySQL table. SuperUser requires both Logblock and Pex for a full implementation.
OPs as Players
SuperUser complements the typical permission-by-plugin security found on most servers very nicely with its automatic player handling and damage rollback capabilities.
This plugin doesn’t just hook into the robust PEX permission system, it uses the PEX api to manage the permission groups. It uses PEX to configure itself, by group.
By-Player vs. By-Plugin
While SuperUser may appear to be an added level of complexity to Bukkit security, it also has the potential of simplifying admin or moderator duties. It allows admins to standardize, and control what players are allowed to do in terms of Minecraft features, by player. For example, Creative servers often experiment with new plugins and I bet they wish they could safely let players be ops so they can try the plugins out. Maintaining a constantly changing permission system can be a bear.
Since SuperUser doesn't concern itself with the use of specific plugins it is in a good position to catch outlaw players that have found backdoor access. SU catches them and deals with them. SU can be an unsettling surprise for players getting complacent with their server cheats.
Super User
Superusers, from now on called supers, are the only players not monitored. Players may have specific permissions, by player, that override any existing permission system. For example, a player may be an op, but that does not mean he/she can fly, use tnt, ban, change gamemode, etc.. unless this plugin permits it. A super could op a player asking to be op'd and strip that player of all Minecraft capabilities at the same time.
Supers are defined as such on the SQL player record. I would never claim the system is undefeatable because that would just tempt fate. But SQL servers are routinely trusted to handle financial transactions, and are designed to be secured. That portion of security is in the server builder's hands, and the tool is mature and solid.
Bukkit Versioning
SuperUser does not go outside th Bukkit api. Therefore, it will not break every time Bukkit renames Minecraft classes.
Asynchronous MySQL
Care is taken to run MySQL processing off the Bukkit/Minecraft thread. Theoretically, this plugin can have very little impact on general server performance, while doing a lot in terms of automatically managing players. Of course, the SQL server is often run on a separate machine, further relieving the Bukkit server of overhead. This is often called scaleability. The bulk of SQL referencing is by record id, the primary table index. This is the most effecient way to access SQL records, and requires no searching. This is like referencing an array value by index, instead of searching the arrray. It also happens to be blinking fast, requiring very little work.
Player Cache
This plugin employs a detailed player cache making it possible to service its listeners very quickly without the need to wait for SQL requests. This is done asynchronously whenever possible. Players are always cached while online, and flushed on quit. The player cached is periodically flushed to the table in the background, off the main thread. It may also be flushed on command, using the 'dirty' field. SuperUser was designed to be managed by a web app as well as console, and player.
Offenses
There are different categories of offenses such as felony, breach, trespass, harm, damage, etc... that are tallied when incurred. Offending players are clearly warned after an offense and reminded of how many warnings received. When a defined threshold of warnings is reached for a particular offence the player is moved to what is called the guest area, stripped of all permissions, and tarpitted. Guest players are not allowed to go beyond a defined radius from a defined location. Guests don't have editing privileges, nor chat access. Guests have only one command, and that is '/ask'. This is a line of communication only to supers, and must have a 10 second delay between uses. Guest'ing a player, for all practical purposes, is as good as banning a player, but without all the negative implications.
System kicked, or guest'ed players are reset and given another chance after 24 hours, unless banned.
Jail
SuperUser jail is defined by location and radius like the guest area but in effect works the opposite. Instead of containing players, it is designed to eventually let them out, hopefully rehabilitated. The /va_setjail command is used to define the jail location; the radius is set in ‘config.yml’. A player may be sent to jail from the console or as a super privileged player using ‘/jail <player> [minutes/default:10]’. The intrinsic jail command name is /va_jail, but SU responds to /jail and should override any plugin using the same command name, as well as penalize any non-super trying to use the command.
A jailed player retains his/her rank, but is relocated to jail and put and kept in survival mode until release. Jail birds, like guests, have only one command, and that is the time delayed '/ask'. It communicates only with supers. Release occurs when the term expires as defined from command, or when the jailed player leaves (escapes) the defined jail radius. A jailed player may still get system kicked if warnings are not heeded. It is assumed that a player is jailed for a reason that may involve griefing, so any work done since login is automatically rolled back upon incarceration, and again upon release or quit to restore the jail area.
Registration
SuperUser does use a non-invasive registration and login process designed to slow down hackers and provide a moderate level of security to an off-line server. Players only need to /register once, and /login only when their ip address has changed.
Commands
This Command List is directly from 'plugin.yml' and document the available commands. Player control may be done directly in the sql table. Use 'f' or '0' or 'n' for false and 't or '1', or 'y' for true. Use partial group names. Change the 'dirty' field to anything but 'false' and SuperUser will validate and implement the changes if it is for a live player. Type 'flush' in the dirty field to signal SuperUser to flush it's player cache out to database. This is designed for a user interface such as a web interface.
Command Confirm
The command confirmation I refined on my Postal plugin is employed on this plugin. This means that you only need to type enough characters of a player's name to uniquely indicate the name, and SuperUser will complete it for you. You will be given a chance to confirm it with a single'/'. SuperUser will try to uniquely complete on live players first before digging into the off-line players, unless it is a live player only command.
Stealth
The super field takes a true or false as expected, and also will accept 'stealth'. 'stealth' indicates not only super user status, but complete invisibility as well. Stealth supers do not register in the tabbed player list, nor are they announce at join, quit or death. They are not there, you see.... (actually, if you don't 'see', even better)
Player Tracker
Complementing the stealth capabilities is a powerful player tracker available only to supers. It uses the compass and a HUD reporter driven by the new Scoreboard api. Backwards compatibility is maintained by conventional messaging if the Scoreboard class is not detected. Super gets a compass needle maintaining a lock on the moving subject. The HUD reporter maintains distance and elevation statistics. There is no problem finding players with this tool. It is also good for teamwork. Two or more supers working together can maintain locks on each other so they always know exactly where each other is.
Rollback
Logblock is used to automatically rollback changes made by a player that ended up being kicked by the system or a super. Logblock also implements player settings that define whether their work is saved. For example, if a player's 'save_wrk' setting is 'false' Logblock will rollback the player's work since login when the player quits. Logblock is also used to maintain the defined jail and guest areas.
Getting Started
1) Put va_superuser.jar into your plugin folder and start the server, then stop it.
2) Edit 'config.yml' in the va_superuser directory to configure MySQL. The settings are straight forward for a normal MySQL instalation, and beyond the scope of this step description.
3) Re-start the server and enter 'va_update' at the console to populate the player table with all the players on the server. Or, have the player to be super join and quit to create just that record.
4) Use the 'rank' command from the console to make that player a super using the PEX group used for admins:
rank <player> <group> super
5) Join the game as this super and register. Go to a location where you would like new users to spawn and enter '/va_setguest'. This area is used to cool off misbehaving players as well as, used for a pre-login processing. The radius is defined in 'config.yml' and may only be edited by a super.
-
View User Profile
-
Send Message
Posted Apr 20, 2013@mcfacilitator
Can you not even use bash?
-
View User Profile
-
Send Message
Posted Apr 20, 2013Version 0.04
PERMIT command implemented, both console and player.
/permit (without args) lists all the perm names.
/permit <player> lists color coded settings for the specified player.
/permit <player> <perm_name> y/n sets the permission.
This command as well as the other player management commands may be used for either online or offline players. The setting takes place immediately. If you turn off flying on a live player while the player is flying, the player will fall out of the sky.
As with all SuperUser commands, only minimal typing is required, SU will complete the parameters when possible as well as provide a confirmation step before invocation.
This command completes what is necessary to manage the details of the SuperUser plugin without the need for a table editor. So, while the SQL table is probably the best feature of this plugin, dealing with it directly is optional.
-
View User Profile
-
Send Message
Posted Apr 20, 2013@Aleroh
I prefer to try to work through the bugs right here for all to see and to stay up to date on. You can just give me a link to a pastebin, but before you do that it is worth trying the .04 version I just put into the Bukkit approval queue.
This should work on Spigot. I haven't tested it on it yet, but I will make sure it works on that important platform.
-
View User Profile
-
Send Message
Posted Apr 19, 2013@mcfacilitator
Awesome, thanks for the quick reply! I'm looking to release my server to the public soon and instead of a straight up whitelist this makes more sense to me. Having this plugin clear any damage and escorting players to a cool down area is pretty darn neat.
I've looked into several Authentication plugins but by far this makes the most sense!
Any place we can submit bugs or error reports? Tried this on my mirror server last night and had a nullpointer exception. Using latest Spigot build #797.
-
View User Profile
-
Send Message
Posted Apr 19, 2013@Aleroh
All the current work is right here and Bukkit staff have been approving cuts in a reasonable timeframe. I am able to get urgent fixes out in a responsible way making it clear they are not Bukkit approved. Of course, I don't expect a plugin that uses MySQL and is dependent on two other no-nonsense plugins: Logblock and PEX, to be casually thrown into the plugins folder.
There are a few more commands I need to finish up, notably the /permit command and I will change the status to 'release'. A table editor like Navcat provides a nice spreadsheet type view of the players. Players can be manipulated from there as well, completely outside of Bukkit. This is something that should be replaced with a web based app.
-
View User Profile
-
Send Message
Posted Apr 19, 2013I'm REALLY interested in this plugin. Any dev builds we can try?
-
View User Profile
-
Send Message
Posted Apr 13, 2013@algo160
I'm ok with the name. The plugin not only stops players from playing with tnt, it escorts them off the server if its warnings aren't heeded. Further, it cleans up after good players gone bad and puts everything back together. And that is just one of it's minor responsibilities. Protecting and promoting penguins is what it does.
-
View User Profile
-
Send Message
Posted Apr 13, 2013sudo -S rm SuperUser_plugin | echo Bukkit
Try to guess what that does.....
-
View User Profile
-
Send Message
Posted Apr 13, 2013Tux the linux penguin is angry! Tux thinks this has nothing to do with his permissions system and requests its renamed!
-
View User Profile
-
Send Message
Posted Apr 13, 2013Welcome to the gutsy folks trying this plugin out at this early stage. I will support the plugin right here in this comment area.
It is not quite as green as I suggest, but this beta designation doesn't last very long, and I feel like milking it a little bit. Its the only beta I have. It was originally designed to be completely controled and configured directly through the SQL table, and is fully functional this way. The newer console and player control is not yet complete and that is why it deserves a beta designation.
I did notice that the version up has a broken feature, and that is the 'we_ok' player flag. This is the field that controls access to commands begining with two forward slashes, World Edit commands. It is already fixed. I need to complete the /rank command so that this plugin may be implemented without the need for a table editor. That will happen shortly.
Next is the /permit command, essential to fine tuning player permission details. Try the /reset and /guest commands to see how easy it is going to be to control players. The default values for reset will be moved out to config.yml shortly as well.
And again, Welcome!