├── www └── a │ ├── public │ ├── bg.jpg │ ├── img │ │ ├── bg.jpg │ │ ├── bg_blue.jpg │ │ ├── bg_mix.jpg │ │ ├── delete.png │ │ ├── graph.jpg │ │ ├── graph2.jpg │ │ ├── bg_brown.jpg │ │ ├── form_blue.gif │ │ ├── form_mix.gif │ │ ├── form_red.gif │ │ ├── icons │ │ │ ├── add.png │ │ │ ├── car.png │ │ │ ├── cog.png │ │ │ ├── rss.png │ │ │ ├── Thumbs.db │ │ │ ├── brick.png │ │ │ ├── bricks.png │ │ │ ├── cart.png │ │ │ ├── coins.png │ │ │ ├── expand.jpg │ │ │ ├── feed.png │ │ │ ├── folder.png │ │ │ ├── group.png │ │ │ ├── house.png │ │ │ ├── report.png │ │ │ ├── user.png │ │ │ ├── world.png │ │ │ ├── cart_add.png │ │ │ ├── page_add.png │ │ │ ├── user_add.png │ │ │ ├── arrow_down.png │ │ │ ├── arrow_left.gif │ │ │ ├── arrow_right.gif │ │ │ ├── brick_edit.png │ │ │ ├── bricks_gear.png │ │ │ ├── folder_page.png │ │ │ ├── magnifier.png │ │ │ ├── page_gear.png │ │ │ ├── report_link.png │ │ │ ├── user_delete.png │ │ │ ├── user_edit.png │ │ │ ├── color_swatch.png │ │ │ ├── folder_table.png │ │ │ ├── application_add.png │ │ │ ├── arrow_down_mini.gif │ │ │ ├── folder_page_add.png │ │ │ ├── page_white_edit.png │ │ │ ├── page_white_link.png │ │ │ ├── page_white_delete.png │ │ │ ├── page_white_text_width.png │ │ │ └── ui-anim_basic_16x16.gif │ │ ├── bg_menu_blue.jpg │ │ ├── bg_menu_mix.jpg │ │ ├── bg_menu_red.jpg │ │ ├── bootstrap │ │ │ ├── bg.jpg │ │ │ └── kindajean.png │ │ ├── form_brown.gif │ │ ├── form_green.gif │ │ ├── bg_light_green.jpg │ │ └── bg_menu_green.jpg │ ├── js │ │ ├── jquery.treeview │ │ │ ├── .gitignore │ │ │ ├── images │ │ │ │ ├── file.gif │ │ │ │ ├── minus.gif │ │ │ │ ├── plus.gif │ │ │ │ ├── folder.gif │ │ │ │ ├── ajax-loader.gif │ │ │ │ ├── treeview-red.gif │ │ │ │ ├── folder-closed.gif │ │ │ │ ├── treeview-black.gif │ │ │ │ ├── treeview-gray.gif │ │ │ │ ├── treeview-default.gif │ │ │ │ ├── treeview-red-line.gif │ │ │ │ ├── treeview-black-line.gif │ │ │ │ ├── treeview-famfamfam.gif │ │ │ │ ├── treeview-gray-line.gif │ │ │ │ ├── treeview-default-line.gif │ │ │ │ └── treeview-famfamfam-line.gif │ │ │ ├── todo │ │ │ ├── README.md │ │ │ ├── jquery.treeview.edit.js │ │ │ ├── changelog.txt │ │ │ ├── jquery.treeview.css │ │ │ └── jquery.treeview.async.js │ │ ├── bootstrap │ │ │ └── img │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ └── glyphicons-halflings-white.png │ │ └── jquery.backstretch.min.js │ └── css │ │ ├── ui-lightness │ │ └── images │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_228ef1_256x240.png │ │ │ ├── ui-icons_ef8c08_256x240.png │ │ │ ├── ui-icons_ffd27a_256x240.png │ │ │ ├── ui-icons_ffffff_256x240.png │ │ │ ├── ui-bg_flat_10_000000_40x100.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ │ │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png │ │ │ └── ui-bg_highlight-soft_75_ffe45c_1x100.png │ │ ├── admin.css │ │ ├── ie-sucks.css │ │ ├── switch.css │ │ ├── iepngfix.htc │ │ ├── theme.css │ │ ├── blue.css │ │ ├── theme3.css │ │ ├── theme2.css │ │ └── theme4.css │ └── assistant.php ├── maintenance ├── demo-install │ ├── roles │ │ ├── db │ │ │ ├── handlers │ │ │ │ └── main.yml │ │ │ ├── templates │ │ │ │ └── my.cnf.j2 │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── web │ │ │ ├── templates │ │ │ │ ├── index.php │ │ │ │ ├── .htaccess │ │ │ │ ├── auth-web.conf │ │ │ │ └── config.php │ │ │ ├── handlers │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── common │ │ │ ├── tasks │ │ │ │ └── main.yml │ │ │ └── handlers │ │ │ │ └── main.yml │ │ └── ldap │ │ │ └── tasks │ │ │ └── main.yml │ ├── site.yml │ ├── inventory.example │ ├── inventory.local │ └── README.md ├── bin │ ├── authqueue-start.sh │ └── doUtilMaintenance.php ├── test.php ├── generate-password.php ├── guest-password-reset.php └── schema │ └── data │ └── defaults.sql ├── .gitignore ├── site.example ├── bg.jpg ├── logo.png └── config.php ├── doc └── database │ ├── auth-database.mwb │ └── auth-database.pdf ├── lib ├── web │ ├── view │ │ ├── layout │ │ │ ├── Page │ │ │ │ ├── 403.inc │ │ │ │ ├── 500.inc │ │ │ │ ├── 404.inc │ │ │ │ └── home.inc │ │ │ ├── ActionQueue │ │ │ │ ├── log.inc │ │ │ │ └── view.inc │ │ │ ├── Utility │ │ │ │ └── home.inc │ │ │ ├── snippet │ │ │ │ ├── group_selector.php │ │ │ │ └── account_selector.php │ │ │ ├── Ou │ │ │ │ ├── rename.inc │ │ │ │ ├── create.inc │ │ │ │ └── move.inc │ │ │ ├── UserGroup │ │ │ │ ├── adduser.inc │ │ │ │ ├── addchild.inc │ │ │ │ ├── addparent.inc │ │ │ │ ├── rename.inc │ │ │ │ ├── create.inc │ │ │ │ └── move.inc │ │ │ ├── AccountOwner │ │ │ │ ├── addgroup.inc │ │ │ │ ├── rename.inc │ │ │ │ ├── move.inc │ │ │ │ └── pwreset.inc │ │ │ ├── Account │ │ │ │ └── rename.inc │ │ │ └── htmlLayout.inc │ │ ├── Page_view.php │ │ ├── ActionQueue_view.php │ │ ├── Utility_view.php │ │ ├── Ou_view.php │ │ ├── Account_view.php │ │ ├── AccountOwner_view.php │ │ └── UserGroup_view.php │ ├── login │ │ ├── form │ │ │ ├── reset-ok.inc │ │ │ ├── error.inc │ │ │ ├── assistant.inc │ │ │ ├── reset.inc │ │ │ ├── login.inc │ │ │ └── account.inc │ │ ├── snippet │ │ │ └── account_selector.php │ │ └── page.inc │ ├── controller │ │ ├── Utility_controller.php │ │ ├── ActionQueue_controller.php │ │ ├── Page_controller.php │ │ ├── Ou_controller.php │ │ └── Account_controller.php │ └── Web.php ├── util │ ├── AccountMerge_util │ │ ├── README.md │ │ └── layout │ │ │ └── main.inc │ ├── Cleanup_util │ │ └── README.md │ ├── Example_util │ │ ├── README.md │ │ ├── Example_util.php │ │ └── layout │ │ │ └── main.inc │ ├── util.php │ ├── Groupr_util │ │ ├── README.md │ │ ├── layout │ │ │ └── main.inc │ │ └── Groupr_util.php │ ├── SasStudent_util │ │ ├── README.md │ │ └── layout │ │ │ └── main.inc │ └── SimonTeacherYL_util │ │ └── README.md ├── misc │ ├── PasswordGen.php │ ├── Provisioning_Email.php │ ├── Database.php │ └── ReceiptPrinter.php ├── model │ ├── ListActionType_model.php │ ├── ListServiceType_model.php │ ├── AccountOwner_model.php │ ├── SubUserGroup_model.php │ ├── Ou_model.php │ ├── OwnerUserGroup_model.php │ ├── ListDomain_model.php │ └── ListServiceDomain_model.php └── Auth.php ├── .gitmodules ├── composer.json ├── .travis.yml └── README.md /www/a/public/bg.jpg: -------------------------------------------------------------------------------- 1 | ../../../site/bg.jpg -------------------------------------------------------------------------------- /maintenance/demo-install/roles/db/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | site/* 2 | .settings/* 3 | .buildpath 4 | *.bak 5 | vendor/ 6 | -------------------------------------------------------------------------------- /site.example/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/site.example/bg.jpg -------------------------------------------------------------------------------- /site.example/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/site.example/logo.png -------------------------------------------------------------------------------- /www/a/public/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/bg.jpg -------------------------------------------------------------------------------- /www/a/public/img/bg_blue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/bg_blue.jpg -------------------------------------------------------------------------------- /www/a/public/img/bg_mix.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/bg_mix.jpg -------------------------------------------------------------------------------- /www/a/public/img/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/delete.png -------------------------------------------------------------------------------- /www/a/public/img/graph.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/graph.jpg -------------------------------------------------------------------------------- /www/a/public/img/graph2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/graph2.jpg -------------------------------------------------------------------------------- /doc/database/auth-database.mwb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/doc/database/auth-database.mwb -------------------------------------------------------------------------------- /doc/database/auth-database.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/doc/database/auth-database.pdf -------------------------------------------------------------------------------- /maintenance/demo-install/roles/web/templates/index.php: -------------------------------------------------------------------------------- 1 | 403 Forbidden 2 |
You do not have permission to access this page.
3 | -------------------------------------------------------------------------------- /lib/web/view/layout/Page/500.inc: -------------------------------------------------------------------------------- 1 |Your request cannot be processed.
3 | -------------------------------------------------------------------------------- /www/a/public/img/bg_light_green.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/bg_light_green.jpg -------------------------------------------------------------------------------- /www/a/public/img/bg_menu_green.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/bg_menu_green.jpg -------------------------------------------------------------------------------- /www/a/public/img/icons/cart_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/cart_add.png -------------------------------------------------------------------------------- /www/a/public/img/icons/page_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/page_add.png -------------------------------------------------------------------------------- /www/a/public/img/icons/user_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/user_add.png -------------------------------------------------------------------------------- /maintenance/bin/authqueue-start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Launch and fork the queue program. 3 | ./authqueue.php > /dev/null & 4 | -------------------------------------------------------------------------------- /maintenance/demo-install/roles/db/templates/my.cnf.j2: -------------------------------------------------------------------------------- 1 | [client] 2 | user=root 3 | password={{ mysql_root_password }} 4 | -------------------------------------------------------------------------------- /www/a/public/img/icons/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/arrow_down.png -------------------------------------------------------------------------------- /www/a/public/img/icons/arrow_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/arrow_left.gif -------------------------------------------------------------------------------- /www/a/public/img/icons/arrow_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/arrow_right.gif -------------------------------------------------------------------------------- /www/a/public/img/icons/brick_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/brick_edit.png -------------------------------------------------------------------------------- /www/a/public/img/icons/bricks_gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/bricks_gear.png -------------------------------------------------------------------------------- /www/a/public/img/icons/folder_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/folder_page.png -------------------------------------------------------------------------------- /www/a/public/img/icons/magnifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/magnifier.png -------------------------------------------------------------------------------- /www/a/public/img/icons/page_gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/page_gear.png -------------------------------------------------------------------------------- /www/a/public/img/icons/report_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/report_link.png -------------------------------------------------------------------------------- /www/a/public/img/icons/user_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/user_delete.png -------------------------------------------------------------------------------- /www/a/public/img/icons/user_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/user_edit.png -------------------------------------------------------------------------------- /www/a/public/js/jquery.treeview/.gitignore: -------------------------------------------------------------------------------- 1 | build/dist 2 | docs 3 | .project 4 | *~ 5 | *.diff 6 | *.patch 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /www/a/public/img/bootstrap/kindajean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/bootstrap/kindajean.png -------------------------------------------------------------------------------- /www/a/public/img/icons/color_swatch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/color_swatch.png -------------------------------------------------------------------------------- /www/a/public/img/icons/folder_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/folder_table.png -------------------------------------------------------------------------------- /www/a/public/img/icons/application_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/application_add.png -------------------------------------------------------------------------------- /www/a/public/img/icons/arrow_down_mini.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/arrow_down_mini.gif -------------------------------------------------------------------------------- /www/a/public/img/icons/folder_page_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/folder_page_add.png -------------------------------------------------------------------------------- /www/a/public/img/icons/page_white_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/page_white_edit.png -------------------------------------------------------------------------------- /www/a/public/img/icons/page_white_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/page_white_link.png -------------------------------------------------------------------------------- /www/a/public/img/icons/page_white_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/page_white_delete.png -------------------------------------------------------------------------------- /www/a/public/img/icons/page_white_text_width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/page_white_text_width.png -------------------------------------------------------------------------------- /www/a/public/img/icons/ui-anim_basic_16x16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/img/icons/ui-anim_basic_16x16.gif -------------------------------------------------------------------------------- /www/a/public/js/jquery.treeview/images/file.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/js/jquery.treeview/images/file.gif -------------------------------------------------------------------------------- /www/a/public/js/jquery.treeview/images/minus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/js/jquery.treeview/images/minus.gif -------------------------------------------------------------------------------- /www/a/public/js/jquery.treeview/images/plus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/js/jquery.treeview/images/plus.gif -------------------------------------------------------------------------------- /www/a/public/js/jquery.treeview/images/folder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/Auth/HEAD/www/a/public/js/jquery.treeview/images/folder.gif -------------------------------------------------------------------------------- /lib/web/view/layout/Page/404.inc: -------------------------------------------------------------------------------- 1 |Weasles have eaten our network admin system.
4 |What are utilities?
9 |Utilities are simply special pages which add to the functionality of Auth.
10 |They can be written to contain extra logic for managing users in different ways, or for automating some tasks.
11 |"; 24 | } else { 25 | echo "
9 | What does this do? 10 |
11 |A brief description of the utility and its purpose. You may wish 12 | to use a definition list if there is special jargon involved:
13 |The "Hello World" feature says hello to the world
36 | 37 | "; ?> 38 |Changing the unit name affects every object in the organizational unit! If you rename a large unit, then you can expect issues to arise with authentication.
16 |You should only rename a unit if its current name is incorrect.
17 |An OU is a container where 16 | accounts and groups are kept. Unlike groups, a user can only be in 17 | one OU at a time.
18 |Adding a user here will give them the permissions of the group, and will cause them to receive group emails
11 |When you add a group here, everybody in that group will receive 11 | emails and inherit the permissions associated with the parent 12 | group.
13 |When you add this group to a parent group, everybody here will 11 | receive emails and inherit the permissions associated with the 12 | parent group, in addition to whatever they already have.
13 |If you add a user here, then they will be given the permissions 11 | of the group, and receive emails which are sent to the group.
12 |9 | What is the ActionQueue? 10 |
11 |Because this system manages multiple back-end account-keeping 12 | systems, it would be really slow to use if you had to wait for it 13 | all the time!
14 |While you are working, Auth puts together a "Todo" list with all 15 | the things you've changed, and applies the changes in its own time.
16 |You can find all sorts of extra detail in the ActionQueue log file."?> 17 |
The ActionQueue is empty.
Items are shown in approximate execution order:
"; 28 | echo "| Action | Service | Domain | Target | Date | Attempts |
|---|---|---|---|---|---|
| " . Web::escapeHTML($aq -> action_type) . " | " . 33 | "" . Web::escapeHTML($aq -> Service -> service_name) . " | " . 34 | "" . Web::escapeHTML($aq -> ListDomain -> domain_name) . " | " . 35 | "" . Web::escapeHTML($aq -> aq_target) . " | " . 36 | "" . Web::escapeHTML($aq -> aq_date) . " | " . 37 | "" . Web::escapeHTML($aq -> aq_attempts) . " | " . 38 | "
Changing a group alias will affect email routing, but all users will stay in the group. Note that aliases are limited to alphanumeric characters for technical reasons.
16 |Changing a user's name will update their full-name, as it is displayed in different places.
17 | 18 |Changing the user's login for a specific account (much more disruptive) is done by clicking on the account.
19 |Changing a login name will affect the user's ability to log in! Not only will they have to use a different username, but it will seriously break their windows profiles, and will confuse some email clients. This should only be done if absolutely necessary
16 |To correct Windows user profiles, you will need to edit the logon name stored in the registry.
17 |24 | What does this do? 25 |
26 |This utility is for batch resetting passwords for an entire group. Each member has their password reset and output in an excel/csv compatible format. 27 | 28 | This utility only resets the passwords of the direct members of the defined group and not that of members of any subgroups. 29 | 30 |
31 || Services | 44 |||
|---|---|---|
| Service | 47 |Login | 48 |Domain | 49 |
| ".web::escapeHTML($account -> Service -> service_name)." | "; 54 | echo "".web::escapeHTML($account -> account_login)." | "; 55 | echo "".web::escapeHTML($account -> account_domain)." | "; 56 | echo "
A group is a collection of users, used for security purposes. A user account can be in many different groups, and will receive email messages sent to the group address.
21 |Moving an organizational unit puts it under a different container. This could mean that it gets very different permissions to what it had before!
30 |22 | What is account merging? 23 |
24 |If a user has multiple existing accounts (on different services), 25 | then you probably want them to appear on the same page on Auth. 26 | This means that you can reset the login details, account 27 | information, and group membership details in one place.
28 |This utility exists to help you merge together multiple 29 | AccountOwner pages. To do this, they must not contain accounts on 30 | the same service!
31 |Accounts can only be merged if they are in the same Organization 48 | Unit, in no groups at all, and have the same name. The form below 49 | will help you find the accounts, and the 'Prepare' button will make 50 | these changes.
51 |After the Queue has emptied, you can then merge the accounts 52 | together, and add the new AccountOwner back to the correct User 53 | Groups!
54 | 55 || Select new: | 58 |60 | | 61 |
| Selected: | 65 |".web::escapeHTML($data['owners']).""; ?> 66 | | 67 |
| 72 | | |
".htmlentities($error)."
"; 47 | 48 | die(); 49 | } 50 | 51 | static public function redirect($to) { 52 | /* Run queue first if necessary */ 53 | ActionQueue_api::start(); 54 | 55 | /* Now redirect */ 56 | global $config; 57 | header('location: ' . $to); 58 | exit(0); 59 | } 60 | 61 | static public function constructURL($controller, $action, $arg, $fmt) { 62 | $config = self::$config; 63 | $part = array(); 64 | 65 | if(count($arg) == 1 && $action == $config['default']['action']) { 66 | /* We can abbreviate if there is only one argument and we are using the default view */ 67 | if($controller != $config['default']['controller'] ) { 68 | /* The controller isn't default, need to add that */ 69 | array_push($part, urlencode($arg[0])); 70 | array_unshift($part, urlencode($controller)); 71 | } else { 72 | /* default controller and action. Check for default args */ 73 | if($arg[0] != $config['default']['arg'][0]) { 74 | array_push($part, urlencode($arg[0])); 75 | } 76 | } 77 | } else { 78 | /* urlencode all arguments */ 79 | foreach($arg as $a) { 80 | array_push($part, urlencode($a)); 81 | } 82 | 83 | /* Nothing is default: add controller and view */ 84 | array_unshift($part, urlencode($controller), urlencode($action)); 85 | } 86 | 87 | /* Only add format suffix if the format is non-default (ie, strip .html) */ 88 | $fmt_suff = (($fmt != $config['default']['format'])? "." . urlencode($fmt) : ""); 89 | return $config['webroot'] . implode("/", $part) . $fmt_suff; 90 | } 91 | 92 | public static function escapeHTML($inp) { 93 | return htmlentities($inp, null, 'UTF-8'); 94 | } 95 | } 96 | 97 | ?> 98 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Auth Web [](https://travis-ci.org/mike42/Auth) 2 | 3 | Auth Web is a system to handle complex user account management setups through a simple web interface. 4 | 5 | The aim of this project is to give every user the impression that they have exactly one user account in the organisation, no matter how complex the underlying infrastructure is. It does this by allowing administrators to link user accounts on different systems that are controlled by the same person, so that the person's access can be managed from one place. Each time an action is performed, Auth Web will interact with the relevant systems asynchronously to bring them up to speed. 6 | 7 | The use cases for this sort of web application include: 8 | 9 | - manage access to systems that don't/can't authenticate centrally 10 | - set a user's password, display name, or group membership on all accounts at once 11 | - set up accounts according to updates to the staff database 12 | - add a web interface so that admins can reset passwords and unlock accounts on the go 13 | 14 | The system ships with plugins for: 15 | 16 | - LDAP (intended for UNIX or RADIUS accounts) 17 | - Microsoft Active Directory 18 | - Google Apps, via the Google Data REST API 19 | 20 | ## Requirements 21 | 22 | This code is intended to run on the following platforms: 23 | 24 | - The most recent stable release of Debian GNU/Linux 25 | - The most recent LTS release of Ubuntu GNU/Linux 26 | 27 | Required software: 28 | 29 | - MySQL or MariaDB server 30 | - Apache webserver 31 | - PHP 5.6, with plugins: php5-ldap php5-cli 32 | 33 | Optional software: 34 | 35 | - phpmyadmin, may be used to perform the database setup through the web 36 | - php5-curl, for the Google Apps service 37 | - php5-odbc and FreeTDS, for plugins which interact with Microsoft SQL Server 38 | 39 | ## Installation 40 | 41 | A standalone example setup is used for testing. Ansible will configure the app and database to manage an empty OpenLDAP domain. For notes on how to install this on a spare Debian-based machine, see the notes under `maintenance/demo-install/README.md`. 42 | 43 | ## Gotchas 44 | 45 | Web Auth does not know your LDAP schema, so by default it uses very basic data structures for groups and users. If you want to take advantage of extra LDAP features, then you should modify `ldap_service.php` to use the features in your schema. 46 | 47 | Auth will attempt to align users' group membership and account locations. If it is asked to synchronise two services that are very different, the results are currently quite messy. Ensure that you have done a trial run against a fake system 48 | 49 | ## Credits 50 | 51 | - The default login background is modified from [this image](http://commons.wikimedia.org/wiki/File:Great_Barrier_Reef_105_%285383117759%29.jpg) on Wikimedia Commons, CC2. 52 | - The Google API [PHP client](https://code.google.com/p/google-api-php-client/) is included, and is under the Apache License. 53 | -------------------------------------------------------------------------------- /www/a/assistant.php: -------------------------------------------------------------------------------- 1 | owner_id)) { 57 | throw new Exception("You do not have permission to log on to that account."); 58 | } 59 | if($account -> account_domain != $loginConf['assist']['domain_id']) { 60 | throw new Exception("You do not have permission to log on to that account."); 61 | } 62 | 63 | /* Figure out which account to log in as */ 64 | if(!$login_account = Account_model::get_by_service_owner_unique($loginConf['service_id'], $owner -> owner_id)) { 65 | throw new Exception("That account has no valid login for Auth, so can't log you in."); 66 | } 67 | $_SESSION['meta-auth']['account']['ldap_username'] = $login_account -> account_login; 68 | header('location: /account/'); 69 | exit(0); 70 | } catch(Exception $e) { 71 | $data['message'] = $e -> getMessage(); 72 | } 73 | } 74 | } 75 | 76 | showForm($form, $data); 77 | 78 | /** 79 | * Show a given form with this data 80 | */ 81 | function showForm($form, $data) { 82 | include(dirname(__FILE__).'/../../lib/web/login/page.inc'); 83 | } 84 | 85 | function search($term) { 86 | $results = Account_model::search($term); 87 | return $results; 88 | } 89 | ?> -------------------------------------------------------------------------------- /www/a/public/js/jquery.treeview/jquery.treeview.css: -------------------------------------------------------------------------------- 1 | .treeview, .treeview ul { 2 | padding: 0; 3 | margin: 0; 4 | list-style: none; 5 | } 6 | 7 | .treeview ul { 8 | background-color: white; 9 | margin-top: 4px; 10 | } 11 | 12 | .treeview .hitarea { 13 | background: url(images/treeview-default.gif) -64px -25px no-repeat; 14 | height: 16px; 15 | width: 16px; 16 | margin-left: -16px; 17 | float: left; 18 | cursor: pointer; 19 | } 20 | /* fix for IE6 */ 21 | * html .hitarea { 22 | display: inline; 23 | float:none; 24 | } 25 | 26 | .treeview li { 27 | margin: 0; 28 | padding: 3px 0pt 3px 16px; 29 | } 30 | 31 | .treeview a.selected { 32 | background-color: #eee; 33 | } 34 | 35 | #treecontrol { margin: 1em 0; display: none; } 36 | 37 | .treeview .hover { color: red; cursor: pointer; } 38 | 39 | .treeview li { background: url(images/treeview-default-line.gif) 0 0 no-repeat; } 40 | .treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; } 41 | 42 | .treeview .expandable-hitarea { background-position: -80px -3px; } 43 | 44 | .treeview li.last { background-position: 0 -1766px } 45 | .treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(images/treeview-default.gif); } 46 | .treeview li.lastCollapsable { background-position: 0 -111px } 47 | .treeview li.lastExpandable { background-position: -32px -67px } 48 | 49 | .treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; } 50 | 51 | .treeview-red li { background-image: url(images/treeview-red-line.gif); } 52 | .treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(images/treeview-red.gif); } 53 | 54 | .treeview-black li { background-image: url(images/treeview-black-line.gif); } 55 | .treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(images/treeview-black.gif); } 56 | 57 | .treeview-gray li { background-image: url(images/treeview-gray-line.gif); } 58 | .treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(images/treeview-gray.gif); } 59 | 60 | .treeview-famfamfam li { background-image: url(images/treeview-famfamfam-line.gif); } 61 | .treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(images/treeview-famfamfam.gif); } 62 | 63 | .treeview .placeholder { 64 | background: url(images/ajax-loader.gif) 0 0 no-repeat; 65 | height: 16px; 66 | width: 16px; 67 | display: block; 68 | } 69 | 70 | .filetree li { padding: 3px 0 2px 16px; } 71 | .filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; } 72 | .filetree span.folder { background: url(images/folder.gif) 0 0 no-repeat; } 73 | .filetree li.expandable span.folder { background: url(images/folder-closed.gif) 0 0 no-repeat; } 74 | .filetree span.file { background: url(images/file.gif) 0 0 no-repeat; } 75 | -------------------------------------------------------------------------------- /lib/misc/ReceiptPrinter.php: -------------------------------------------------------------------------------- 1 | setJustification(Escpos::JUSTIFY_CENTER); 25 | if(isset(self::$conf['logo']) && file_exists(self::$conf['logo'])) { 26 | try { 27 | /* Include top image if set & available */ 28 | $logofile = self::$conf['logo']; 29 | $ser = $logofile . ".ser"; 30 | if(file_exists($ser)) { 31 | $img = unserialize(file_get_contents($ser)); 32 | } else { 33 | $img = new EscposImage($logofile); 34 | @file_put_contents($ser, serialize($img)); // Attempt to cache 35 | } 36 | $printer -> bitImage($img); 37 | } catch (Exception $e) { 38 | trigger_error($e -> getMessage()); 39 | } 40 | } 41 | $printer -> setEmphasis(true); 42 | $printer -> text(self::$conf['header'] . "\n"); 43 | $printer -> setEmphasis(false); 44 | $printer -> feed(); 45 | $printer -> text("User Account Information\n"); 46 | $printer -> feed(2); 47 | $printer -> setJustification(Escpos::JUSTIFY_LEFT); 48 | 49 | /* User info */ 50 | $barcode = ""; 51 | $seen = array(); 52 | $printer -> text("User Account:\n " . $owner -> owner_firstname . " " . $owner -> owner_surname . "\n\n"); 53 | $printer -> text("Login name(s):\n"); 54 | foreach($owner -> list_Account as $acct) { 55 | if(!isset($seen[$acct -> account_login])) { 56 | $printer -> text(" " . $acct -> account_login . "\n"); 57 | $seen[$acct -> account_login] = true; 58 | if(is_numeric($acct -> account_login) && ($barcode == "" || strlen($acct -> account_login) < strlen($barcode))) { 59 | $barcode = $acct -> account_login; 60 | } 61 | } 62 | } 63 | $printer -> feed(); 64 | $printer -> text("Password:\n $password\n"); 65 | $printer -> feed(2); 66 | 67 | /* Footer */ 68 | $printer -> text(self::$conf['footer'] . "\n"); 69 | $printer -> feed(); 70 | 71 | /* Barcode */ 72 | if($barcode != "") { 73 | $printer -> setJustification(Escpos::JUSTIFY_CENTER); 74 | $printer -> barcode($barcode, Escpos::BARCODE_CODE39); 75 | $printer -> feed(); 76 | $printer -> text($barcode); 77 | $printer -> feed(1); 78 | $printer -> setJustification(Escpos::JUSTIFY_LEFT); 79 | } 80 | $printer -> cut(); 81 | $printer -> close(); 82 | } catch(Exception $e) { 83 | trigger_error($e -> getMessage()); // Should be logged some-place for troubleshooting. 84 | return false; 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /lib/web/view/layout/AccountOwner/move.inc: -------------------------------------------------------------------------------- 1 | 4 | 22 | 23 |You can relocate a user to a different Organzational Unit for 29 | housekeeping. This will not affect email distribution, but some 30 | basic permissions (such as the ability to log in or connect to the 31 | wifi) will be changed if you move a user between the top-level 32 | units.
33 |You can re-locate a group to a different organizational group for 30 | housekeeping. This will not affect distribution of email.
31 |What does this reset?
26 |This resets the password for each of the services that this user has an account on. The password must meet the constraints for all of those services in order to be valid.
27 |If you are trying to log in to something specific, then after this is set, you may wish to check the "Action Queue" to see whether the change has been applied to that service.
28 |20 | What does this do? 21 |
22 |This utility is responsible for sorting students into homerooms, 23 | and creating accounts automatically.
24 |It relies on correct data in the SAS student database.
25 |This will look for changes in SAS, but will not modify anything. 85 | It is a simple way to check that the plugin is set up correctly.
86 | Check 87 | 88 |This will look for changes in SAS, and update them in the 93 | AuthQueue.
94 | Update now 95 | 96 |