Code Monkey home page Code Monkey logo

fusiondirectory / fusiondirectory-plugins Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 14.0 83.02 MB

FusionDirectory is a modern, efficient and secure Identity Management (IAM) solution.

Home Page: http://www.fusiondirectory.org

License: GNU General Public License v2.0

PHP 96.90% CSS 0.03% Smarty 2.77% JavaScript 0.30%
acl api api-rest iam identity identity-management infra ldap ldap-client ldap-server php php7 register rest-api tasks templates trigger user-management webservice workflow

fusiondirectory-plugins's Introduction

FusionDirectory

FusionDirectory provides a solution to daily management of data stored in an LDAP directory. Becoming the cornerstone of the information system, the corporate directory becomes more complex offering more data and managing more infrastructure services.

This interface is simple and can be used to delegate fully or partly the data management to non-specialists.

Features

  • Users, groups, mail, sudo, ssh, systems, services management, dhcp, dns

  • Complex Roles Management :

    • ACLs are only used by FusionDirectory and are not intrusive to other applications using the directory server.
    • ACLs allow fine grained control to who can do what into FusionDirectory
    • ACLs can be assigned to roles. We may have a role
      • User : it can connect to FusionDirectory with his login / password to change is data only when permitted by the admin.
      • Local administrator : this role will be able to manage users and groups and also a branch.
      • global administrator : this role has the right to do everything.
      • human resources : this role can only create users from template to optimize the flow of arrival of new people.
  • Access to multiple LDAP trees

  • FusionDirectory Triggers

    • FusionDirectory incorporates a series of triggers that can launch a specific action based on a task FusionDirectory must run.
    • These triggers are associated with a content type (LDAP user, group, server, password, service (etc. ..) and the triggering action (create, edit, delete, change password … )
    • This system is very useful when certain actions should be followed on arrival or departure of a person in the company For example, when creating a user, a script generation form can be executed automatically with information from the LDAP server.
    • This can be useful for generating badges with photo, a form of access to the canteen or sending an email to warn of the actual arrival of the person.
    • This system is also convenient when we want to deploy the account of that person on an application does not support LDAP (FusionDirectory can also transmit the password) Another example is when a user leaves, you must:
    • archive and delete his mailbox
    • archive and remove its network space
    • delete him from third party applications not connected to LDAP.
    • All of this can be easily done by shell scripts (at least in UNIX environment) and run automatically after the suppression of the person by the administrator in FusionDirectory
  • The interaction with non-LDAP applications

FusionDirectory stores information of a service or a server on an LDAP server. How about when this service does not have the opportunity to interact with LDAP?

This question can be solved by creating:

  • LDAP schema suitable for application to the LDAP server
  • A plugin for its management in FusionDirectory with the simple plugin api
  • An Argonaut module for the client installed on the server

Installation and upgrade of FusionDirectory

The installation and upgrade information is available on Install FusionDirectory

Migration to FusionDirectory

To migrate an existing LDAP tree, you've to do all steps Install FusionDirectory, plus some modifications:

  • FusionDirectory only shows users that have the objectClass inetOrgPerson

  • FusionDirectory only recognizes subtrees (or departments in FusionDirectory's view of things) that have the objectClass gosaDepartment. You can hide subtrees from FusionDirectory by not putting this objectClass inside.

The FusionDirectory setup may be used to do these migrations, but it is not meant to work in every possible circumstance. Please be carefull when using it on productive system.

That should be all. Entries should be visible in FusionDirectory now. Be aware that if your naming policy of user cn's differs from the way FusionDirectory handles it, the entries get rewritten to a FusionDirectory style dn.

Get help

Community support

There are a couple ways you can try to get help.You can also join the #fusiondirectory IRC channel at libera.chat.

Professional support

Professional support is provided through of subscription.

We have two type of subscription :

The subscription provides access to FusionDirectory's stable enterprise repository, providing reliable software updates and security enhancements, as well as technical help and support.

Choose the plan that's right for you. Our subscriptions are flexible and scalable according to your needs

The subscription period is one year from the date of purchase and gives you access to the extensive infrastructure of enterprise-class software and services.

IRC Etiquette

  • If we don't answer right away then just hang out in the channel. Someone will eventually write back to you as it just means we are away from keyboard, working on something else, or in a different timezone than you.

  • You should treat IRC as what it is: asynchronous chat. Sure the messages can be instant but in most channels people are in different time zones. At times chat replies can be in excess of 24hrs.

Best practice badge

CII Best Practices

Crowfunding

If you like us and want to send us a small contribution you can use the following crowfunding services

License

FusionDirectory is GPL 2 License.

fusiondirectory-plugins's People

Contributors

animtim avatar bilbo-the-hobbit avatar cedrange avatar coudot avatar mcmic avatar plinss avatar schmittner avatar soisik avatar tdockx avatar thexa4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fusiondirectory-plugins's Issues

Impossible to install the mail plugin

Hello,
me and my friends are creating an association to provide free hosting,
and we are very happy to use your solution.
However, we need a proper mailbox for our users.
I tried to follow your tutorial, i.e. setting up the systems plugin,
then the mail plugin, but it crashes the server as a result...
We use Debian stable, on a dedicated VM.
Once the two plugins installed, I literally cannot start any service,
the VM is barely accessible, and the LDAP is not working anymore.

Did I miss something? Is there any way I could hope to find the bug?

Thank you!

Dovecot & Cyrus plugins store master password in unprotected cleartext attribute

Describe the bug
After configuring either plugin, I notice the master usename and password for the service are stored in an unprotected LDAP attribute, and there is no indication to the user about this fact.

With a standard LDAP configuration, anybody can retrieve these passwords, even without binding to the directory:

$ ldapsearch -x | egrep 'fd(Dovecot|Cyrus)Password:'

fdDovecotPassword: ***
fdCyrusPassword: ***

This is a huge security risk, and should be clearly documented and warned about in the UI. Plus, it is not clear to me what is the actual purpose of this master account access (seems to be only to verify the mail account exists?) and there is no way to disable this functionality, short of removing the plugin(s).

SSH plugin: locked user can connect

Hello,

Still using Debian Jessie, configured with fusiondirectory repo :
deb http://repos.fusiondirectory.org/debian-jessie jessie main
Version installed is 1.0.9.1-1.
Plugin SSH installed and fusiondirectory-plugin-ssh-schema installed/inserted on my SLAPD server.

I use a ssh-ldap-pubkey script on my servers to connect using public key authentication.
When I lock a user in fusiondirectory, he can still connect to the server using his private key (no more sudo possible).

I think the way the user is locked is by adding a "! " to the encrypted password, so the ssh keys are not impacted...
It could be OK to do the same thing on all the sshPublicKey attributes of the account ?
ex : ssh-rsa !AAAAB3NzaC1yc2EAAAADAQABAAABAQD....

Or adding a keyword (diabled ?) at the begining of the key ?
ex: disabled-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD....

Regards,

Invitations misshandle base

Describe the bug
When a public form with a non-root creation base is used by an invitation that isn't stored on root, the two bases are combined resulting in an (usually) invalid root, causing the form to error. If base is left as an altered field in the public form, it is either similarly not handled correctly, or is ignored entirely, I was not able to verify which in my troubleshooting. It does seem that if you leave the invitation at root, but set a non-root value for the creation base for the public form, it will initially create the user and their registration at the creation base defined in the public form, but then move it to root when you confirm the user.

To Reproduce

  1. Create a public form with a creation base other than root
  2. Create an invitation that uses that public form and store it somewhere other than root
  3. Send that invitation to yourself and fill in the form
  4. Assuming the resultant mess of combined base doesn't exist in your directory, the form will fail

Expected behavior
My initial assumption was that the registration and user would be created at the creation base defined in the public form, and would then be moved to the base of the invitation after the registration was confirmed. Failing that, I would expect one or the other value to be respected, and I would expect a value set by an altered field in the public form to overwrite either, since combining them in this way will rarely if ever create a valid base.

Desktop (please complete the following information):

  • OS: Windows
  • PHP: php 7.4
  • PHP provenance: Debian
  • Browser Observed in Chrome and Firefox

**Plugin with the defect

  • Plugin: public forms, invitations

Additional context
For now my workaround is to leave the creation base in the public form at root, since this allows the system to function, however it is not ideal, considering Fusion Directory's account locks are not true account locks, anything else that attempts to authenticate directly against the LDAP server will allow the account to be used, the only way to truly prevent an account from being used before it is approved is to either make sure it has no privileges at all (by not giving it any group memberships) or by removing it from the search base other applications use to find accounts. Either way, it undermines the usefulness of the account approval process.

Dashboard broken with ppolicy plugin

Describe the bug

Cannot open the dashboard on a FusionDirectory (version 1.3) installation with the ppolicy plugin installed:

Fatal error:  Uncaught FusionDirectoryException: Could not find ACL for attribute "mail" in /usr/share/fusiondirectory/include/class_objects.inc:89
Stack trace:
#0 /usr/share/fusiondirectory/plugins/addons/dashboard/class_dashBoardPPolicy.inc(113): objects::ls()
#1 /usr/share/fusiondirectory/plugins/addons/dashboard/class_dashBoardPPolicy.inc(70): dashboardPpolicy->compute_accounts_info()
#2 /usr/share/fusiondirectory/include/simpleplugin/class_simpleTabs.inc(92): dashboardPpolicy->__construct()
#3 /usr/share/fusiondirectory/plugins/addons/dashboard/tabs_dashBoard.inc(25): simpleTabs->__construct()
#4 /usr/share/fusiondirectory/include/class_objects.inc(279): tabs_dashboard->__construct()
#5 /usr/share/fusiondirectory/include/simpleplugin/class_simplePlugin.inc(2054): objects::open()
#6 /usr/share/fusiondirectory/plugins/addons/dashboard/main.inc(21): simplePlugin::mainInc()
#7 /usr/share/fusiondirectory/html/main.php(284): require('/usr/share/fusi...')
#8 {main}
thrown in /usr/share/fusiondirectory/include/class_objects.inc on line 89

To Reproduce

Steps to reproduce the behavior:

  1. install FusionDirectory,
  2. install the ppolicy plugin,
  3. log in to the web interface,
  4. open the dashboard from the reporting section of the web interface,
  5. see error.

Expected behavior

The dashboard is shown.

Server

  • OS: Devuan GNU/Linux
  • PHP: PHP 7.4.28
  • PHP provenance: original Devuan

**Plugin with the defect

  • Plugin: ppolicy

Additional context

Workarounds:

  1. Install the FusionDirectory mail plugin;
  2. Comment out this line:

LDAP-Plugin: Adding a host under systems and under a specific subnet breaks

Adding a host under systems and under a specific subnet breaks with

PHP Fatal error: Uncaught TypeError: Argument 4 passed to DhcpHostsAttribute::postLdapSave() must be of the type array, string given, called in
/usr/share/fusiondirectory/plugins/admin/systems/class_dhcpSystem.inc on line 405 and defined in /usr/share/fusiondirectory/plugins/admin/systems/class_dhcpSystem.inc:159\nStack trace:\n#0 /usr/share/fusiondirectory/plugins/admin/systems/class_dhcpSystem.inc(405): DhcpHostsAttribute->postLdapSave(Object(ldapMultiplexer), false, false, '10.168.1.20', '10.168.1.20', false, '00:02:d1:08:05:...', '00:02:d1:08:05:...')\n#1 /usr/share/fusiondirectory/include/simpleplugin/class_simplePlugin.inc(1226): dhcpSystem->ldap_save()\n#2 /usr/share/fusiondirectory/include/simpleplugin/class_simpleTabs.inc(430): simplePlugin->save()\n#3 /usr/share/fusiondirectory/include/simpleplugin/class_simpleManagement.inc(828): simpleTabs->save()\n#4 /usr/share/fusiondirectory/include/simpleplugin/class_simpleManagement.inc(945): simpleManagement->applyChanges('apply', Array, Array)\n#5 /usr/share/fusiondirectory/includ in /usr/share/fusiondirectory/plugins/admin/systems/class_dhcpSystem.inc on line 159, referer: http://10.0.173.187/main.php?plug=81

Unable to add catchall alternative mail address in mail plugin

I'm using postfix and need to set catchall email aliases.

In the Users > Mail > Alternative adddresses I need to set values like "@example.com", however when saving I get the error: "The field 'Alternative addresses' contains invalid characters! ". It doesn't appear to accept the leading '@', however this is what postfix needs to setup a catchall address.

Impossible to install the IPAM plugin

Followed directions from here.
It appears that the documentation is referencing non-existent packages. (at least in Debian Buster, which I tried)

With regards to naming conventions, shouldn't the schema package "fusiondirectory-plugin-ipam-fd.schema" be "fusiondirectory-plugin-ipam-fd-schema" instead? Kinda looks like a typo to me.

Irrelevant, but why is Debian Buster still on fusiondirectory 1.2.3-4? Wasn't 1.3 released nearly two years ago?

Many problems with mail plugins

Hi,

A customer of mine has a postfix + spamassassin + dovecot + pigeonhole system using a custom LDAP schema and scripts to manage it. I am in the process of evaluating FD to see if this would solve some of our admin problems, but this is proving very challenging.

This is all using packages from Debian buster (stable), except for FusionDirectory, for which I am using the Debian bullseye (testing) packages.

After days of reading documentation and code, I still can't understand the relationship between the various mail plugins, what exact functionality each one gives, and how to make FD work as I want. This is not a great report, because I am not even sure what the bug(s) are. It is about lack of documentation, implementation problems, and missing functionality. I am close to discarding the idea of using FD completely, and going back to manual LDAP administration.

Some of the problems I have encountered:

  • In the services configuration, it is never clear what hostname is used for connections: the system hostname, one of its IP addresses, or the hostname defined in the service itself.
    • It is also not evident why it is mandatory to define IP addresses, when I have DNS for that.
  • In the user mail settings, if there are two or more mail services (generic, dovecot or cyrus) within the same server, they all show as a single entry. I can't choose which actual service to use.
    • It is also not clear why does FD need to connect to the service at that point, which is giving me failures all the time as I try to debug this.
  • It seems that at some point there was some decent sieve support, and it is still announced in FD description. But after many attempts, it seems it is only used by the cyrus plugin, and only to set a vacation message, without allowing the user to customise the script. Is there any other way? Can I use sieve with dovecot?
  • I still do not understand what is the advantage of configuring a dovecot service over a generic imap service. What does the plugin do? The documentation for most plugins is nonexistant.
  • I have not found any authoritative documentation of how to link postfix and dovecot to FD. So far I had to guess from the PHP code, but that is not easy to follow either.
  • I still don't fully understand what the "Account identification attribute" and "Mail user template" settings are for. I have only seen them used to connect to the IMAP server, but the documentation and contextual help seem to indicate that they are used for account creation.

I am looking for answers to these questions, but more importantly, I think these should all be documented and the weird behaviours fixed.

Can't add SSH ed25519 keys

I noticed that the web interface sanity checks were refusing my ed25519 elliptic curve ssh keys.

Simply changing line 25 in fusiondirectory-plugins/ssh/personal/ssh/class_sshAccount.inc

from:
protected $format = '/^([-[:alnum:]=",.]+\s+)?(disabled-)?(ssh-(dss|rsa)|ecdsa-sha2-nistp\d{3})\s+([[:alnum:]+\/.=]+)(\s+([[:graph:][:space:]]+))?\s*$/';

to:
protected $format = '/^([-[:alnum:]=",.]+\s+)?(disabled-)?(ssh-(dss|rsa|ed25519)|ecdsa-sha2-nistp\d{3})\s+([[:alnum:]+\/.=]+)(\s+([[:graph:][:space:]]+))?\s*$/';

allowed me to fix the problem. Maybe consider adding it to a next release?

Prevent admin from changing passwords

Hello,
I'm using fusiondirectory with the ppolicy plugin, and I was wondering if it's possible to prevent the admin from changing passwords of other users.
I would like only to rely on the recovery method.
Thanks

SSH plugin: error while adding keys with space(s) in comment

Hello,

Using Debian Jessie, configured with fusiondirectory repo :
deb http://repos.fusiondirectory.org/debian-jessie jessie main
Version installed is 1.0.9.1-1.
Plugin SSH installed and fusiondirectory-plugin-ssh-schema installed/inserted on my SLAPD server.

When adding SSH public key to user, if the comment contains one or more space(s), fusiondirectory raises an error : "Unknown public key format!".

Seems to be a problem with the regexp matching key format.
Patch joined.

By the way, \s matches spaces, tabulations, cariage return, new line, vertical tabulation. This can produce bug with this regexp...
fusiondirectory-ssh.patch.zip

Unclear where to report bugs

Hi,

The main FD page seems to indicate that bug reports should be posted here, but then I see that most reports are in gitlab, and that the only report open here did not get any attention for weeks.

Then, I can't register in gitlab to open a bug report. One of dozens of broken links I have found today: https://register.fusiondirectory.org/

To make things worse, it seems that there is a third bug tracker (redmine), but I can't find its location anywhere.

LDAP Import/Export plugin can't work with STARTTLS (over 389 port)

Seems that LDAP Import/Export plugin can't work with STARTTLS (over 389 port).

start_tls_failed

I am using next config:

<?xml version="1.0"?>
<conf>
  <!-- Main section **********************************************************
       The main section defines global settings, which might be overridden by
       each location definition inside.

       For more information about the configuration parameters, take a look at
       the FusionDirectory.conf(5) manual page.
  -->
  <main default="default"
        logging="TRUE"
        displayErrors="FALSE"
        forceSSL="FALSE"
        templateCompileDirectory="/var/spool/fusiondirectory/"
        debugLevel="0"
    >

    <!-- Location definition -->
    <location name="default"
        ldapTLS="TRUE"
    >
        <referral URI="ldap://localhost:389/dc=lalala,dc=com"
                        adminDn="cn=admin,dc=lalala,dc=com"
                        adminPassword="p@ssw0rd" />
    </location>
  </main>
</conf>

And through FD I can add/remove/view/etc users using STARTTLS.

Add Google Scholar as social handler in 'Personal' plugin

Along the lines of #29, it would be nice to be able to add a Google Scholar author identity, which many researchers have. Since you already offer ORCID, I assume that this would be interesting as well.

According to Wikidata:

  • Base URL is https://scholar.google.com/citations?user=AUTHOR_ID
  • Regex for the AUTHOR_ID is [-_0-9A-Za-z]{12}

Thanks for your great work.

Add GitHub as social handler in 'Personal' plugin

It would be nice to be able to add a GitHub identity. Adding the following class to personal/personal/personal/class_socialHandlers.inc should do the trick:

class socialHandler_github extends socialHandler
{
  static function getName ()
  {
    return _('GitHub');
  }

  protected $baseurl = 'https://github.com';
}

Dialog issue in DHCP plugin

I'm having an issue where if I open a DHCP service right after I create it, then expand "Global options" the dialog goes blank with no way to input any data.

I should mention this is in Debian Wheezy.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.