#1 2019-08-27 10:04:22

muhamadtood
Member
Registered: 2019-08-27

LDAP Questions

QUESTION #1:
I need to schedule the ldapimport.groovy script to run at least weekly or more. From what I understand you use the schedulescript command to do this, but all of the examples show a *.rs script.  Can I schedule a *.groovy script using this command or does it have to be a *.rs script. Do I need to rename the script? Your thoughts?
HERE IS WHAT IT SAYS ON THE WEBSITE
Using the scheduler to refresh users periodically To keep ReportServer's user database in sync with your company directory you would probably like to run the script automatically from time to time. To do this, you can use the scheduleScript terminal command.

QUESTION #2:
On the LDAP instructions page on your website it says the following (see below).. Do you have any examples of how to do this in the hookldappam.groovy script. I could not find any searching the internet. Any help you could give would greatly be appreciated.
HERE IS WHAT IT SAYS ON THE WEBSITE
Automatically fetch/refresh a user's corresponding user object on login Additionally to periodic updates you might want to refresh a user's object whenever s/he tries to log in. This can easily be achieved by modifying the hookldappam script and adding the required functionality.

QUESTION #3:
What log does the output go (log file name and path) from all of these groovy scripts. I cannot find it anywhere. That would be really helpful to us to make sure these groovy scripts are running properly that are in the onstartup.d folder (i.e. Add support for databases, hookldappam, et….

Offline

#2 2019-08-28 07:01:36

eduardo
Administrator
Registered: 2016-11-01
Website

Re: LDAP Questions

Hi muhamadtood,

1. The scripts can be .groovy scripts. We will change this on our website.

2. Do you mean examples on periodic updates refreshing the user's object? You can find this in the ldapimport.groovy script.
If you mean refreshing a user's object whenever trying to log in: we don't currently have an example of this, but you can take a look at PAMs: https://reportserver.net/en/tutorials/t … stom-auth/
Here, you can catch the user trying to log in. You can then refresh the info from your LDAP installation.

3. For script output, check this example script:

import java.util.logging.Level;
import java.util.logging.Logger;
  
logger = Logger.getLogger(getClass().getName());
LOG_PREFIX = "getlogginginfo "; // optional
  
logger.log(Level.SEVERE, LOG_PREFIX + "=== START getLoggingInfo =========\n");
tout.println("=== START getLoggingInfo =========");
  
logger.log(Level.ALL, LOG_PREFIX + "ALL Message!");
logger.log(Level.CONFIG, LOG_PREFIX + "CONFIG Message!");
logger.log(Level.FINE, LOG_PREFIX + "FINE Message!");
logger.log(Level.FINER, LOG_PREFIX + "FINER Message!");
logger.log(Level.FINEST, LOG_PREFIX + "FINEST Message!");
logger.log(Level.INFO, LOG_PREFIX + "INFO Message!");
logger.log(Level.WARNING, LOG_PREFIX + "WARN Message!");
logger.log(Level.SEVERE, LOG_PREFIX + "SEVERE Message!");
       
tout.println("=== END getLoggingInfo =========");
logger.log(Level.SEVERE, LOG_PREFIX + "=== END getLoggingInfo =========");

You can set your logging level here (on a standard bitnami installation.. on a manual installation, look for logging-rs.properties):
c:\bitnami\reportserverenterprise-3.0.8\apps\reportserver\reportserver-conf\logging-rs.properties

.level = FINEST
net.datenwerke.level = INFO

You can find your logs in your tomcat logs directory. Look for reportserver.log files in a standard bitnami installation. In a manual installation, check catalina.out or similar logs.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB