سؤال

Here is the scenario:

I have several CIFS partitions which AD-based users can mount and use to access their files etc.

Now we have a requirement to expose this to users via Java-based Web application. So ideally when the users log in; he/she should be able to see which all CIFS partitions he has access to. This would mean that that Java application should be able to query Active Directory server via LDAP or such to identify which all CIFS partitions are available and the respective ACLs.

So the question is:

  1. Can we use LDAP(Java-based library) to query AD to find out which users can access which CIFS shares?
  2. Is there any other way to do so from a Java application?
هل كانت مفيدة؟

المحلول

There's no builtin way to publish CIFS partitions, or their respective ACLs, to AD. So you need to publish it yourself. There's basically two options:

  1. Publish it in AD. This requires extending the schema, i.e. creating a cIFSPartition class with two attributes, path and users. You would then have to find a Java library that can perform LDAP queries (I see a lot of questions about Spring LDAP here). You would probably need to make a webpage to help create and manage these cIFSPartition objects.

  2. Store it on the webserver. You have lots of options here, like a text file or database. This way, you don't have to worry about LDAP.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top