Overview

The first feature that this plugin brings is the ability to open or close and administrative session.

To create a new session, run the following command

signin username password

If you don't use the jmx command for 30 minutes, your session will expire and you'll have to login again.

To signout use.

signout

Registration process

  • An administrator grants a permit to a user that allows him to register/confirm a pending registration. The permit is only valid for some minutes.
    jmx permits.createPermit(john, 192.168.1.30, 10)
    . The above command will grant a permit for registration to the user john whos hostname is 192.168.1.30. The permit will be valid for 10 minutes. If you don't know the hostname, make a /whois request.
  • The user provides, in a private message, a username, password and email
  • register john password john.doe@gmail.com
  • After few minutes, he'll receive an email with detailed instructions to confirm his pending registration.
  • The user will then confirm the pending registration, in a private message, by calling the confirm command:
    confirm john tokenid-xxxxx-xxxxxxx
  • Upon successful registration the bot will send a private notice to the user.

Users administration

You can use the methods of the users object to manage users and roles:


[00:29] <The_Birdman> jmx describe users
[00:29] <jerkbot> MBean to perform users administration

[00:29] <The_Birdman> jmx methods users
[00:29] <jerkbot> addUser(java.lang.String username, java.lang.String password)
[00:29] <jerkbot> removeUser(java.lang.String username)
[00:29] <jerkbot> listUsers()
[00:29] <jerkbot> listRoles()
[00:29] <jerkbot> addRole(java.lang.String roleName)
[00:30] <jerkbot> rolesForUser(java.lang.String username)
[00:30] <jerkbot> addUserToRole(java.lang.String username, java.lang.String roleName)
[00:30] <jerkbot> removeUserFromRole(java.lang.String username, java.lang.String roleName)
[00:30] <jerkbot> removeRole(java.lang.String roleName)

[00:31] <The_Birdman> jmx users.listRoles()
[00:31] <jerkbot> 'Admin','SuperAdmin'
...