LDAP schema editing on the fly - ldap

Is it possible in any of the existing LDAP servers to edit a schema in one of the editors available? Like JXplorer, Apache Directory Studio, LDAP Admin?
I tried with OpenLDAP and all of the above tools (I run the server with -F option) but it looks like it's not possible to modify schema - add new attributes, add descriptions etc.
I would be grateful if any of you have some experience with this.
Cheers

Some LDAP servers allow (authorized users) to change the schema by sending LDAP modify operation affecting the so-called subschema subentry directly, but not OpenLDAP.
In OpenLDAP you have two possible configuration methods:
Static file configuration usually with schema files being simply included (aka slapd.conf) which requires slapd to be restarted to make configuration changes effective
Dynamic configuration backend back-config (aka cn=config) for which you can also define ACLs restricting access to your LDAP admins
The dynamic configuration method allows to tweak the schema via LDAP making it effective without server-restart. But you have to modify the multiple LDAP entries in sub-tree cn=schema,cn=config which you can do with any generic LDAP client.
Since schema descriptions usually reference other schema descriptions the order is important. Standard LDAP does not know about order of entries beneath an entry or order of attribute values. Therefore OpenLDAP implements an extension specified in draft-chu-ldap-xordered.

Related

Trying to connect ldap users two or more subdomains to nifi

I have setup three node secure NIFI cluster and integrated with LDAP for user login .
my doubts
In login-identity-providers.xml can we add multiple USER Search Base of ldap.(i tried by adding multiple usersearchbase but failed)
In LDAP user search should happen on multiple sub domains eg : DC=example1,dc=example,dc=com
DC=example2,dc=example,dc=com
on User-search-base in login-identity-providers.xml
TO achieve mutitenancy in ldap what is the configuration changes we need to make in identity provider.xml
tenant1 user should access process group define for tenant 1 itself and its not access for tenant2 users
From what I can tell, AND Assuming you are using Microsoft Active Directory if you use:
FOLLOW
It may work.
We also sometimes might use the Global Catalog (as then there are no referrals)
I also am guessing that the "empty" parameters should be removed (but I do NOT know how NIFI works).
I would suggest you also do tests with a LDAP Browser to make sure you know what your LDAP tree looks like. We use Apache Studio, but there are others.
More data on if it is Microsoft Active Directory and refer to https://stackoverflow.com/help/how-to-ask

where can i find "pwdAccountLockedTime" in Apache-DS LDAP?

I do right-click and choose "Fetch->Fetch operational attributes" but there is no pwdAccountLockedTime in attribute list. Where can i find pwdAccountLockedTime?
The Apache information is windows Apache Directory Studio(Version: 2.0.0.v20161101-M12)
EDIT : ads-pwdAccountLockedTime hinted that you use Apache Directory Server, the documentation to configure password policy is here
You have to add the objectClass ads-passwordPolicy to be able to use the attributes on your entry
--
Apache Directory Studio is just a client which fetches informations from a directory.
If you want to see the attribute, then the directory must have it stored.
If you get "Warning! According to the schema attribute ads-pwdAccountLockedTime is not allowed." it's probably because you did not include the schema needed for the password policy to work properly or simply did not enabled the password policy (assuming you're using OpenLDAP)
To do so, you need to enabled the ppolicy overlay and configure it correctly, which requires you to add the ppolicy.schema.
See : http://www.openldap.org/doc/admin24/overlays.html and http://www.zytrax.com/books/ldap/ch6/ppolicy.html

What is the difference between LDAP schema and LDIF?

Setting up an LDAP server I have to import a couple of schemas, for example eduPerson. There is an LDIF file issued by the developers, that says:
# This LDIF file can be used to add to add the eduPerson schema to
# an OpenLDAP server > 2.4 that uses the new configuration format.
# Put this file to /etc/ldap/schema/ and then execute the following
# comand to add this schema:
# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/eduperson.ldif
On the other hand, I've heard an LDAP administrator that he imports a schema by including it into the LDAP config (e.g. /etc/openldap/slapd.conf) and restarting the LDAP demon.
So from what I've researched, it seems to me that including the schema is the proper way and LDIF is rather used for importing data – not the schema itself. Is that correct? What are the differences between both and when should I use each of them?
LDIF is a standard text format to represent LDAP operation or data.
Most directory servers uses LDIF for persisting some of their configuration, especially Schema, but LDIF can be used for other purpose such as Adding, Importing, Exporting, Modifying data.
Most of the schema definitions from different standards and products are distributed in LDIF files. How to load these files to the server is not defined in the LDAP specification and thus server defined.
You question seems to be specific to OpenLDAP, and the answer may vary depending on the version of OpenLDAP.

Securing a resource in Web Server

I have a file (or set of files under a directory) published on my web server. Each of this resource needs to be access-protected based on the user's credentials and authority.
The authorization details are stored in a DB, so I need to make a call to the Java code in application server to determine the access.
Everytime the user hits this particular path in the webserver, I need to ensure s/he has access to the requested resource by, ensuring he is logged in and has the necessary priveleges to access this resource.
The webserver is apache - Can you please point me to the settings in apache that allows me to secure resource access using the above logic?
Thanks for the suggestions to correct the Tag and the Question!:
My Web Server is Apache HTTPD
Agree that this is not a Java Question: The only reason why I am bringing the Java perspective, is that I am most likely going to use some Java POJOs to go and check for user authorization for a particular directory that is stored in the DB - That is unless there is a trick in the apache httpd configuration that goes and checks the DB automatically - something similar to the one that is pointed out here...At the end of the it, I need to check if a particular user (authenticated previously by the Single Sign On Server (Sun access manager)) has access to a particular directory (user mapping to directory stored in the DB) and protect the resources under the directory accordingly.
Please let me know if that clarifies.
i am not sure why this is tagged with java - unless your db structure is VERY sepcific, you might able to get it done with apache authz and authn:
http://httpd.apache.org/docs/2.2/mod/mod_authn_dbd.html
or, for an ovierview:
http://httpd.apache.org/docs/2.2/howto/auth.html

openldap ACL for namingContext

I am trying to block access to our openldap's namingContexts. The openldap server hosts directories for several DNs, and we don not want anyone from being able to identify which DNs are being hosted by the server.
I understand that namingContext is an operational attribute and part of the rootDSE. Obviously, ldap clients need access to some entries of the rootDSE in order to operate properly.
On the other hand, it looks like rootDSE entries are also subject to ACL.
The question is whether the namingContext attributes are required to be publicly readable in order for a client to connect to the server, or whether the namingContext attributes can be restricted. If the later, what would be a suitable ACL for this? We use openldap.
The following access control:
access to attrs="namingContexts" by * none
denies access to namingContexts.