source: trunk/LATMOS-Accounts/man/man8/latmos-accounts-base-sql.pod @ 1933

Last change on this file since 1933 was 1933, checked in by nanardon, 7 years ago

Add documentation about statistics

File size: 8.7 KB
Line 
1# $Id$
2
3=head1 DESCRIPTION
4
5=head1 SPECIFIC SETUP PARAMTERS
6
7=head2 db_conn
8
9The C<libpq> connection parameters, eg a semin colon separated paramaters
10containing the server, the database name, user and password, etc...
11
12=head2 no_pg_utf8
13
14If set disable utf8 flags from postgresql. You can try this parameter if you
15have issue with non ascii value from database
16
17=head2 remove_old_dpmt
18
19By default when the department is changed on a user account it remains in the
20department group as a secondary department.
21
22Setting C<remove_old_dpmt> to true in the config will force user removal from
23the group when department is changed.
24The user can still be added back later.
25
26=head1 FEATURES
27
28=head2 Object Aliases
29
30It is possible to create object being simple alias to another, like symbolic on
31UNIX filesystem or mail alias.
32
33Thoses aliases objects are always resolved when propagating into other base.
34The referenced object can be easilly change and all the data related will be
35propagated.
36
37Only alias for object type C<User> are supported at time.
38
39=head3 Usage Example:
40
41The typical exemple is for attribute C<manager> or attribute C<managedBy>.
42Instead setting them to C<John> you can create an alias C<Director> and when
43C<John> leave just change alias reference to C<Bill>.
44
45=head2 Network managment
46
47Link::Accounts can build automatically some part of your DNS or DHCP
48configuration.
49
50To do this you have to create a C<netzone> object. Such object need a type:
51
52=over 4
53
54=item dns: to build a DNS zone for classic domain
55
56=item reverse: for reverse IP address (168.192.in-addr.arpa)
57
58=item dhcp: ISC dscpd configuration for fixed address
59
60=item puppet: puppet configuration
61
62=back
63
64The way it works is quite simple, each zone will make the code to write a file
65you can include in your server configuration. The match is done by looking the
66zone IP address masks and the host IPs.
67
68For example someone having a zone named C<private.mydomain.com> having masks
69C<192.168.5.0/24>, and having an host named C<foo> with IP C<192.168.5.3> and
70another host C<bar> with IP C<192.168.13.78>. The zone built will look likes:
71
72    foo IN A 192.168.5.3
73
74As you can see this DNS zone is not valid: the goal of such feature is to make
75the repetive work for us, not to manage the full zone (even such feature could
76be possible). The repetitive work is declaring the hundred computers our users
77have.
78
79The output will be happend to a template have the name of the zone suffixed by
80C<.in>. You can put in this template evering about the zone declaration (SOA,
81NS, TXT...).
82
83=head2 User endcircuit
84
85The C<endcircuit> attribute contain the deadline for people to make
86admnistrative task when starting to work.
87If set this attribute take precedence to C<expire> attribute for computed
88attributes (C<accountExpires> for Active Directory).
89
90=head2 User Employment
91
92The employment object allow you to set time when you're user have a status. This
93allow through 'Employment' module for la-sync-manager to automate changes.
94
95The synchronized attributes are:
96
97=over 4
98
99=item C<company>
100
101=item C<employer>
102
103=item C<department>
104
105=item C<contratType>
106
107=item C<managerContact>
108
109=item C<expire>
110
111=item C<endcircuit>
112
113=back
114
115To avoid error when modifying user direclty when you're using employment those
116attribute become on user's side become read-only once an employment exists.
117
118You can change this beaviour using C<employment_lock_user> parameter:
119
120By default it is impossible to modify or create past employment. This behavior
121can be changed by settings C<allow_pasted_employment> parameter in base
122configuration.
123
124=over 4
125
126=item any (default)
127
128Any existing employment lock those attribute, you must
129create another employment to change user status or delete all employements for
130this user.
131
132=item always
133
134The user's attribute are always locked
135
136=item never
137
138The user's attribute are always locked
139
140=item active
141
142Thoses attributes are locked is any employment are still active (ie unfinished
143or coming later).
144
145=item attribute=value
146
147Thoses attributes are read-only if the C<attribute> given contains C<value>,
148C<*> allow to match any value.
149
150=back
151
152When active users become out of any employment all managed attribute are unset
153(except the expire attribute).
154
155A default value for each of this attribute can be set in configuration using
156parameter in form C<unemployment.ATTRIBUTE>. For example
157C<unemployment.contratType=external> will set any C<contratType> to C<external>
158when no employment apply to user anymore.
159
160Only active accounts are modified in this way.
161
162=head3 User endEmployment
163
164This attribute compute the next day the user will leave the company according
165the employment object registered.
166
167The parameter C<employment_delay> give the number of days to ignore when a hole
168exists between two employment.
169
170If no employment are found, if set the date given in C<unemployed_expire>
171database parameter is returned.
172
173=head3 User endStrictEmployment
174
175This attribute compute the next day the user will leave the company according
176the employment object registered.
177
178It does not take C<employment_delay> parameter into account.
179
180If no employment are found, if set the date given in C<unemployed_expire>
181database parameter is returned.
182
183=head3 User endLastEmployment
184
185This attribute return the very last end of all registered employment fr this
186user.
187
188=head3 User endCurrentEmployment
189
190The end of the employment matching current date.
191
192=head3 Account Expiration
193
194When using employment, account expiration are set to match employment. By
195default the expiration is set to C<endEmployment> value.
196
197This behaviour can be changed by setting C<expireOn> parameter into base
198definition:
199
200=over 4
201
202=item any of endCurrentEmployment, endEmployment, endStrictEmployment, endLastEmployment
203
204=item never
205
206The expire date is left unchanged and must managed manually.
207
208=back
209
210=head2 Group AutoMemberFilter
211
212Group objects contains users members by setting either C<members> or
213C<memberUID> attributes.
214
215Sometimes it can be usefull to have group automatically populated by arbitrary
216rules.
217
218This is possible by setting a filter in the C<autoMemberFilter> attribute,
219The filter format is the same the one used by L<la-search>, the attribute is
220multivaluable.
221
222So for example one can create an account automatically a group containing people
223having "Olivier" as first name:
224
225    autoMemberFilter: givenBame=Olivier
226
227A probably more usefull example is a group containing people from two others
228groups:
229
230    autoMemberFilter: memberOf=group1
231    autoMemberFilter: memberOf=group2
232
233The  C<members> or C<memberUID> attribute becomes read-only attribute once
234C<autoMemberFilter> attribute is set.
235
236=head2 Aliases AutoMemberFilter
237
238This attribute allow to create automatics dynamics aliases according filter
239rules exactly like L<Group AutoMemberFilter> works.
240
241The C<forward> attributes is automatically set with email address of selected
242user, user w/o email address are ignored.
243
244=head2 Group AutoFromSutype
245
246Group object can be tagged with the C<sutype> attribute.
247
248When C<autoFromSutype> is set the group member will be computed from member of
249all groups having C<sutype> set this value.
250
251The goal of this attribute is to setup magic group like with the
252C<autoMemberFilter> but working even a new group is created.
253
254=head2 Aliases AutoFromSutype
255
256This attribute allow to create automatics dynamics aliases according filter
257rules exactly like L<Group AutoFromSutype> works.
258
259The C<forward> attributes is automatically set with email address of selected
260user, user w/o email address are ignored.
261
262=head2 Statistics
263
264The application provide some statitics tools but they are only based on the
265current data inside the database and are unable to track delete data.
266
267To keep some mesurement you must use C<stat> objects to describe the data you
268want to track, and enable in L<la-sync-manager.ini> the C<Stats> module.
269
270Each attribute of C<Stat> object describe how data must but compute before being
271stored.
272
273=head3 Stat object Attributes
274
275=head4 description
276
277A label about this statistics object
278
279=head4 display
280
281IF set the statistic appear in the menu of the web interface
282
283=head4 otype
284
285The object type this stat is tracking, must be a supported object type
286
287=head4 filter
288
289One or multiple filter to limit the objects taking into account
290
291=head4 attribute
292
293The attribute fetch to compute data
294
295=head4 refFilter
296
297When the attribute reference another type of object this setting allow to
298filter to the matching referenced object.
299
300=head4 refAll
301
302When the attribute reference another type of object non exiting objects in
303the results appear as 0, otherwise they are ignored.
304
305=head4
306
307=head4 aggregateFunction
308
309An optionnal operation to do on the data:
310
311=over 4
312
313=item sum
314
315Make the sum of the result per item
316
317=item avg
318
319Make the average of the result per item
320
321=item count
322
323Count the number of item return
324
325=back
326
327=head4 delay
328
329The number of day between two run
330
Note: See TracBrowser for help on using the repository browser.