New cool Midgard features

Posted on 2006-06-14 20:08:09 EEST.


PAM authentication

Midgard is able to authenticate users with PAM module for years.
But sometimes you can not make it more flexible. Let's say you use two or three virtual hosts for the same sitegroup. And to make life more difficult every host should use PAM module , but with different configuration. One should authenticate via LDAP , another one via Domain Controller and another one via passwd file ( yeah , I know last example is mad if you consider how Apache handles files permissions ;).
With Midgard virtual hosts you could use MidgardAuthType directive and set its parameter as "PAM". With new "soon to be released" 1.7.6 release you will be able to define PAM service name.

Service name is nothing more like filename located in pam conf.d directory. Usually it is `/etc/pam.d`.

a. Create pam service file 'midgard_active_directory'

auth  required /lib/security/pam_winbind.so

b. Configure vhost

MidgardAuthType PAM
MidgardPamFile midgard_active_directory

c. Restart Apache

Midgard Query Builder

With Midgard CVS HEAD you can query objects and objects' parameters and attachments. Paramaters and atachments are exceptions for Query Builder. The same as metadata is.

To add constraint for parameter use magic "parameter" word and dot followed by property name.

$qb = new MidgardQueryBuilder('midgard_topic');
$qb->add_constraint('parameter.domain', '=', "midcom");
$qb->add_constraint('attachment.name', '=', "xml.gif");
$qb->add_constraint('metadata.created', '>', "20010101");
$qb->add_constraint('up', '>', 0);
$qb->execute();

Configuration File

New unified configuration file now can be located in system /etc directory or just in user's home directory. Create config file:

~/.midgard/conf.d/my_config 


And load midgard application. Main configuration file will be ignored in such case.

Back

Layout Copyright © 2006 Finnish Teleservice Center Ltd Oy - Site Powered by Midgard CMS