Showing
1 changed file
with
108 additions
and
7 deletions
| 1 | -# LDAP-Admin | |
| 1 | +# ldap-admin | |
| 2 | 2 | |
| 3 | -## abstract | |
| 3 | +A tool to manage users in an LDAP dictionary or a MySQL database. | |
| 4 | 4 | |
| 5 | -Some ruby code for LDAP directory management. | |
| 5 | +_unfinished_ | |
| 6 | 6 | |
| 7 | -## requires | |
| 7 | +## Synopsis | |
| 8 | 8 | |
| 9 | -ruby 1.8 | |
| 9 | +The DN's used in ``tester.rb`` are obviously not applicable for other sites. | |
| 10 | +Additionally they do not reflect the current structure used here at | |
| 11 | +**weird-web-workers.org**. | |
| 10 | 12 | |
| 11 | -## status | |
| 13 | +To test anything you need to have a directory and use fitting DN's for | |
| 14 | +testing. | |
| 12 | 15 | |
| 13 | -discontinued | |
| \ No newline at end of file | ||
| 16 | +## Description | |
| 17 | + | |
| 18 | +### What is there | |
| 19 | + | |
| 20 | + * Various data-models (user, group, mailAccount, mailALias, etc.) | |
| 21 | + * These might be stored in different storage backends | |
| 22 | + * These storage engines are queried with different query languages. | |
| 23 | + * The model specifies _which_ data is queried. | |
| 24 | + * The storage engine decides _how_ the data is queried. | |
| 25 | + | |
| 26 | +> **Conflict**: With ldap it is difficult to separate the _which_ from the | |
| 27 | +> _how_. | |
| 28 | +> | |
| 29 | +> **Possible solution: Some kind of factory that initializes the concrete | |
| 30 | +> database by the class of the model and the class of the storage engine. | |
| 31 | +> | |
| 32 | +> **Alternative**: Instead of a separate factory it might be feasable to | |
| 33 | +> create a generic database class with a method to create an instance by a | |
| 34 | +> given model. | |
| 35 | +> | |
| 36 | +> **Problem**: Then the database class has to know the initialization | |
| 37 | +> information for the associated model, which is an implementation detail | |
| 38 | +> of the model in fact. So this information should come from somewhere else | |
| 39 | +> but probably not from the model, because it probably also needs | |
| 40 | +> implementation details of the database class. | |
| 41 | +> | |
| 42 | +> **Maybe**: it is possible to do something by nameing conventions. But it | |
| 43 | +> might be cleaner to have a separate configuration file for each storage | |
| 44 | +> backend in which the necessary informations for the queries of the models | |
| 45 | +> can be configured. | |
| 46 | + | |
| 47 | +A yaml file for this might look like this: (ldap.yml) | |
| 48 | + | |
| 49 | + ldap: # => wenn es pro Datenbank ne eigenen datei gibt ist das nicht noetig | |
| 50 | + host: host.one.virtual | |
| 51 | + port: 389 | |
| 52 | + queries: | |
| 53 | + User: | |
| 54 | + baseDn: ou=user,o=system,dc=weird-web-workers,dc=org | |
| 55 | + filter: (objectClass=posixAccount) | |
| 56 | + Group: | |
| 57 | + baseDn: ou=group,o=system,dc=weird-web-workers,dc=org | |
| 58 | + filter: (objectClass=posixGroup) | |
| 59 | + | |
| 60 | + ... | |
| 61 | + | |
| 62 | +As an alternative of a single mapping file we could create one mapping file | |
| 63 | +for each mode / storage backend combination. These would be very small and | |
| 64 | +fast readable. | |
| 65 | + | |
| 66 | +Filesystem structure: | |
| 67 | + | |
| 68 | + model - user.rb | |
| 69 | + - group.rb | |
| 70 | + - site.rb | |
| 71 | + - mailalias_role.rb | |
| 72 | + - mailalias_person.rb | |
| 73 | + - mailaccount.rb | |
| 74 | + data - ldap.rb | |
| 75 | + data - config - ldap.yml | |
| 76 | + adapter - ldap.rb | |
| 77 | + - config - ldap - user.yml | |
| 78 | + - group.yml | |
| 79 | + - site.yml | |
| 80 | + - mailalias_role.yml | |
| 81 | + - mailalias_person.yml | |
| 82 | + - mailaccount.yml | |
| 83 | + | |
| 84 | +## Requirements | |
| 85 | + | |
| 86 | + * A running test dictionary or database | |
| 87 | + * Ruby | |
| 88 | + | |
| 89 | +## Dependencies | |
| 90 | + | |
| 91 | +unknown | |
| 92 | + | |
| 93 | +## Contributing | |
| 94 | + | |
| 95 | +Just email me. | |
| 96 | + | |
| 97 | +## License | |
| 98 | + | |
| 99 | + This program is free software: you can redistribute it and/or modify | |
| 100 | + it under the terms of the GNU General Public License as published by | |
| 101 | + the Free Software Foundation, either version 3 of the License, or | |
| 102 | + (at your option) any later version. | |
| 103 | + | |
| 104 | + This program is distributed in the hope that it will be useful, | |
| 105 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 106 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 107 | + GNU General Public License for more details. | |
| 108 | + | |
| 109 | + You should have received a copy of the GNU General Public License | |
| 110 | + along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 111 | + | |
| 112 | +## Author | |
| 113 | + | |
| 114 | +Georg Hopp <georg@steffers.org> | ... | ... |
Please
register
or
login
to post a comment