JasperReports Server Security Guide
JasperReports Server Security Guide
SECURITY GUIDE
RELEASE 6.1
http://www.jaspersoft.com
Copyright 2005-2015, TIBCO Software Inc. All rights reserved. Printed in the U.S.A. TIBCO, the TIBCO
logo, TIBCO Jaspersoft, the TIBCO Jaspersoft logo, TIBCO Jaspersoft iReport Designer, TIBCO JasperReports
Library, TIBCO JasperReports Server, TIBCO Jaspersoft OLAP, TIBCO Jaspersoft Studio, and TIBCO Jaspersoft
ETL are trademarks and/or registered trademarks of TIBCO Software Inc. in the United States and in
jurisdictions throughout the world. All other company and product names are or may be trade names or
trademarks of their respective owners.
This is version 0515-JSP61-01 of the JasperReports Server Security Guide.
TABLE OF CONTENTS
Chapter 1 Introduction to JasperReports Server
2.1 Authentication
2.2 Authorization Overview
Chapter 3 Application Security
3.1 Encrypting Passwords in Configuration Files
3.1.1 Encrypting Configuration Passwords on Tomcat (or Spring tcServer)
3.1.2 Encrypting Configuration Passwords on Enterprise Servers
3.1.3 Encrypting Additional Properties in default_master.properties
3.1.4 Password Encryption for External Authentication
3.1.5 Encryption Options
3.2 Configuring CSRF Prevention
3.3 Configuring Input Validation
3.3.1 Customizing Security Error Messages
3.3.2 Editing Input Validation Rules
3.3.3 Creating Validator Expressions
3.3.4 Validating New Input Parameters
3.3.5 Query Validation
3.3.6 Further Configuration
3.4 Restricting File Uploads
3.5 Hiding Stack Trace Messages
3.6 Defining a Cross-Domain Policy for Flash
3.7 Enabling SSL in Tomcat
3.7.1 Setting Up an SSL Certificate
3.7.2 Enabling SSL in the Web Server
3.7.3 Configuring JasperReports Server to Use Only SSL
3.8 Disabling Unused HTTP Verbs
3.9 Setting the Secure Flag on Cookies
3.10 Setting httpOnly for Cookies
3.10.1 Setting httpOnly for Tomcat 7
3.10.2 Setting httpOnly for Tomcat 6
3.11 Protection Domain Infrastructure in Tomcat
7
8
11
12
12
13
13
15
17
18
18
19
20
21
22
22
23
24
26
26
27
27
28
29
29
30
31
31
32
32
32
33
34
35
37
37
38
38
38
39
39
40
42
42
43
43
43
45
45
47
48
48
49
50
50
51
51
52
52
53
53
54
55
56
57
57
59
60
62
62
66
Glossary
69
Index
79
CHAPTER 1
Easily create new reports based on views designed in an intuitive, web-based, drag and drop Ad Hoc
Editor.
Efficiently and securely manage many reports.
Interact with reports, including sorting, changing formatting, entering parameters, and drilling on data.
Schedule reports for distribution through email and storage in the repository.
Arrange reports and web content to create appealing, data-rich Jaspersoft Dashboards that quickly convey
business trends.
For business intelligence users, Jaspersoft offers TIBCO Jaspersoft OLAP, an optional component of
JasperReports Server, controlled by license and described in its own user guide.
While the Ad Hoc Editor lets users create simple reports, more complex reports can be created outside of the
server. You can either use TIBCO Jaspersoft Studio or manually write JRXML code to create a report that
can be run in the server. We recommend that you use Jaspersoft Studio unless you have a thorough
understanding of the JasperReports file structure.
You can use the following sources of information to extend your knowledge of JasperReports Server:
Our core documentation describes how to install, administer, and use JasperReports Server. Core
documentation is available as PDFs in the docs folder of your JasperReports Server installation. You can
also access PDF and HTML versions of these guides online from the Documentation section of the
Jaspersoft Community website.
Our Ultimate Guides document advanced features and configuration. They also include best practice
recommendations and numerous examples. These guides are available online in PDFand HTML from the
Documentation section of the Jaspersoft Community website.
Our Online Learning Portal lets you learn at your own pace, and covers topics for developers, system
administrators, business users, and data integration users. The Portal is available online from Professional
Services section of our website.
Our free samples, which are installed with JasperReports, Jaspersoft Studio, and JasperReports Server, are
documented online. The samples documentation can be found on our community website.
JasperReports Server is a component of both a community project and commercial offerings. Each integrates the
standard features such as security, scheduling, a web services interface, and much more for running and sharing
reports. Commercial editions provide additional features, including Ad Hoc charts, flash charts, dashboards,
Domains, auditing, and a multi-organization architecture for hosting large BI deployments.
CHAPTER 2
JasperReports Server ensures that people can access only the data they're allowed to see. The settings that define
organizations, users, roles, and repository resources work together to provide complete access control that
includes:
Authentication Restricts access to identified users and protects that access with passwords. Defines roles
for grouping users and assigning permissions.
Authorization Controls access to repository objects, pages, and menus based on users and roles.
Data level security (commercial version only) Defines row and column level permissions to access your
data. Row and column level permissions can be defined and enforced in Domains.
Administrators must keep security in mind at all times when managing organizations, user, roles, and resources,
because the security settings behind each of these rely on the others.
This chapter contains the following sections:
2.1
Authentication
Authorization Overview
Authentication
The first part of security is to define user accounts and secure them with passwords to give each user an identity
within JasperReports Server. The server stores user definitions, including encrypted passwords, in a private
database. Administrators create, modify, and delete user accounts through the administrator pages, as described
in the JasperReports Server Administrator Guide.
JasperReports Server also implements roles for creating groups or classes of users with similar permissions. A
user can belong to any number of roles and have the privileges of each The server stores role definition in its
private database, and administrators create, modify, and delete roles through the administrator pages, as
described in the JasperReports Server Administrator Guide.
JasperReports Server relies on the open source Spring security framework; it has many configurable options for:
External authentication services such as LDAP (used by Microsoft Active Directory and Novell eDirectory)
Single sign-on using JA-SIG's Central Authentication Service (CAS)
Java Authentication and Authorization Service (JAAS)
Container security (Tomcat, Jetty)
SiteMinder
Anonymous user access (disabled by default)
The Spring framework is readily extensible to integrate with custom and commercial authentication services and
transports.
Authentication occurs by default through the web user interface, forcing login, and/or through HTTP Basic
authentication for web services, such as Jaspersoft Studio and for XML/A traffic. The server can automatically
synchronize with an external authentication service. External users dont need to be created manually in the
server first. Both users and roles are created automatically in the server from their definitions in an external
authentication service. For an overview of the authentication system and details about external authentication,
see the JasperReports Server Authentication Cookbook.
2.2
Authorization Overview
With a users identity and roles established, JasperReports Server controls the users access in these ways:
Menu options and
pages
The menus appear in JasperReports Server UI depending on the users roles. For
example, only users with the administrator role can see the Manage menu and
access the administrator pages. By modifying the servers configuration, you can
modify access to menus, menu items, and individual pages. Refer to the
JasperReports Server Source Build Guide and JasperReports Server Ultimate
Guide for more information.
Organization scope
Resource permissions
Administrators can define access permissions on every folder and resource in the
repository. You can define permissions for every role and every user, or leave them
undefined to be inherited from the parent folder. For example, user may have readwrite access to a folder where they create reports, but the administrator can also
create shared reports in the same folder that are set to read-only. The possible
permissions are: no access, execute only, read-only, read-delete, read-write-delete,
and administer (see "Repository Administration"in the JasperReports Server
Administrator Guide).
Permissions are enforced when accessing any resource whether directly through
the repository interface, indirectly when called from a report, or programmatically
through the web services. A user's access to resources is limited by the permissions
defined in the user's roles.
Administrator privileges
Data-level security
Data-level security determines the data that can be retrieved and viewed in a report,
based on the username and roles of the user running the report. For example, a
management report could allow any user to see the management hierarchy,
managers would see the salary information for their direct employees, and only
human resource managers would see all salary values.
Data-level security in Domains is explained in the JasperReports Server User
Guide. Data-level security through OLAP views is covered in the Jaspersoft OLAP
User Guide.
Note: This type of security is available only in the commercial edition of
JasperReports Server.
Profile attributes
10
CHAPTER 3
APPLICATION SECURITY
This chapter describes the configuration settings that protect JasperReports Server and its users from
unauthorized access. The configuration properties appear in two locations:
Some properties must be configured during the installation and deployment phase, before users access the
server. These settings are configured through files used by the installation scripts. These settings are
available only when performing a WAR file installation.
Properties you can configure after installation are located in files in various folders. Configuration file paths
are relative to the <js-install> directory, which is the root of your JasperReports Server installation. To
change the configuration, edit these files then restart the server.
Because the locations of files described in this chapter vary with your application server, the paths specified in
this chapter are relative to the deployed WAR file for the application. For example, the applicationContext.xml
file is shown as residing in the WEB-INF folder. If you use the Tomcat application server bundled with the
installer, the default path to this location is:
C:\Program Files\jasperreports-server-6.1\apache-tomcat\webapps\jasperserver-pro\WEB-INF
Use caution when editing the properties described in this chapter. Inadvertent changes may cause
unexpected errors throughout JasperReports Server that may be difficult to troubleshoot. Before
changing any files, back them up to a location outside of your JasperReports Server installation.
Do not modify settings not described in the documentation. Even though some settings may appear
straightforward, values other than the default may not work properly and may cause errors.
11
3.1
The password for the mail server used by the scheduler (quartz.mail.sender.password)
The password for LDAP external authentication.
Passwords in configuration files are encrypted during JasperReports Server installation. If the installation
deploys to the Tomcat application server, the database password is also automatically encrypted in the JNDI
configuration (in the file context.xml).
Full password security cannot be guaranteed from within JasperReports Server. A user with sufficient
privileges and knowledge of JasperReports Server can gain access to the encryption keys and the
configuration passwords. While you could require a password on every server restart, this is impractical
for most users. The only practical way to guarantee password security is through backup and restriction
of access to the keystore property file.
3.1.1
Depending on the database you use, copy the installation configuration file as usual:
from:<js-install>/buildomatic/sample_conf/<database>_master.properties
to:<js-install>/buildomatic/default_master.properties
2.
3.
4.
The plain text passwords in default_master.properties are overwritten with their encrypted equivalents.
There is no warning when you run js-install with encrypt=true.
b.
c.
12
you may need to add the following to your Tomcat service start properties:
-Duser.home=c:\Users\<TomcatUser>
3.1.2
Deploy JasperReports Server to your enterprise server as specified in the JasperReports Server Installation
Guide. The resulting JasperReports Server instance will have unencrypted JNDI data source passwords. If
you want to encrypt these passwords, refer to your application server's documentation.
2.
After the server has been successfully configured, encrypt the JasperReports Server configuration files as
follows:
a.
b.
Run the target js-ant refresh-config. This will remove and recreate all the configuration files
without deploying them to the application server. Now the buildomatic files will have the database
passwords encrypted. You should still be able to execute import/export or other scripts.
Do not run js-install or js-ant deploy-webapp-pro. These commands will overwrite the WAR file
created in step 1 and render the server data sources inaccessible. If you need to redeploy the WAR file,
reset the database password(s) to plain text in your default_master.properties and start again with step 1.
3.1.3
13
The use of the ${...} syntax tells you that report.scheduler.mail.sender.password is most likely
defined via the propertyConfigurer bean. Search through the propertyConfigurer locations to verify. This
property is defined in /WEB-INF/js.quartz.properties as follows:
report.scheduler.mail.sender.password=${quartz.mail.sender.password}.
Once you've verified that the quartz.mail.sender.password property can be encrypted using defaultmaster.properties, you set up encryption before installation as follows:
1.
14
2.
3.
4.
3.1.4
5.
Configure and install your JasperReports Server WAR installation as described in the JasperReports Server
Installation Guide.
6.
The values referenced by the ${...} format are defined in the js.externalAuth.properties file and imported into
Spring context via the propertyConfigurer. For example, the LDAP properties are defined in
js.externalAuth.properties as follows:
external.ldap.url=${external.ldapUrl}
external.ldap.username=${external.ldapDn}
external.ldap.password=${external.ldapPassword}
The ${...} syntax again references other configuration properties that must be set in default_master.properties
before installation or upgrade. The following example shows the syntax of the properties in the default_
master.properties file:
external.ldapUrl=ldap://hostname:389/dc=example,dc=com
external.ldapDn=cn=Administrator,dc=example,dc=com
external.ldapPassword=password
To encrypt the password property, set the following values in default_master.properties before installation or
upgrade:
external.ldapPassword=cleartextpassword
...
15
encrypt=true
propsToEncrypt=dbPassword, external.ldapPassword
During the installation process, the password value in default_master.properties and its reference in
js.externalAuth.properties are overwritten with the encrypted value.
If your external authentication is configured to create organizations for external users, and you're using
JasperReports Server 6.0, or later, there is another password to encrypt. When external authentication creates an
organization, it uses the information in ExternalTenantSetupUser of the externalTenantSetupProcessor
bean to create the organization administrator.
<bean class="com.jaspersoft.jasperserver.multipleTenancy.security.externalAuth.processors.
MTAbstractExternalProcessor.ExternalTenantSetupUser">
<property name="username" value="${new.tenant.user.name.1}"/>
<property name="fullName" value="${new.tenant.user.fullname.1}"/>
<property name="password" value="${new.tenant.user.password.1}"/>
<property name="emailAddress" value="${new.tenant.user.email.1}"/>
<property name="roleSet">
<set>
<value>ROLE_ADMINISTRATOR</value>
<value>ROLE_USER</value>
</set>
</property>
</bean>
The values referenced by the ${...} format are defined in the js.config.properties file as follows:
## New tenant creation: user config
new.tenant.user.name.1=jasperadmin
new.tenant.user.fullname.1=jasperadmin
...
new.tenant.user.password.1=jasperadmin
new.tenant.user.email.1=
The default values for new tenant (organization) administrators in js.config.properties apply only to
external authentication. They do not apply to organizations created by administrators through the UI or
REST interface.
During the installation process, the password value in default_master.properties and its reference in
js.config.properties are overwritten with the encrypted value.
16
3.1.5
Encryption Options
In buildomatic installation scripts, the passwords are symmetrically encrypted: the same secret key is used for
both encryption and decryption. The key and its containing keystore file are randomly generated on each
machine during the first JasperReports Server installation. All subsequent JasperReports Server installations on
the same server rely on the same keystore; they don't regenerate the key.
The keystore is an encrypted file used to securely store secret keys. JasperReports Server uses keystore properties
to access the keystore. Both the keystore and keystore properties files are created by default in the user home
directory. Alternatively, before running js-install, you can specify different locations for the keystore and
keystore properties files via the environmental variables ks and ksp.
By default, database passwords are encrypted with the AES-128 algorithm in Cipher Block Chaining mode with
PKCS5 padding. The AES algorithm is the current industry encryption standard. You can choose to modify the
encryption strength by choosing either a different algorithm, a longer secret key size (for example AES-256), or
a different encryption mode.
Edit the following properties in your default_master.properties and set these options. If a property is commented
out, the default is used:
Property
Description
Default
build.key.algo
AES
build.key.size
128 (bits)
To increase the key size, if it has not been done before, you might have
to install "Unlimited Strength Jurisdiction Policy Files" from the Oracle
site for your Java version. To install the files, download US_export_
policy.jar and local_policy.jar. AFTER backing up the old files, extract
the jars into %JAVA_HOME%/jre/lib/security directory.
Alternatively, you may download one of the reputable providers such as
Bouncy Castle (ships with JasperReports Server). You would need to
add the Bouncy Castle provider to the list in
%JAVA_HOME%/jre/lib/security/java.security file:
security.provider.<seq number>=
org.bouncycastle.jce.provider.BouncyCastleProvider
enc.transformation
AES/CBC
/PKCS5
Padding
enc.block.size
The size of the block that's encrypted. Encrypted text can contain many
blocks. Usually the block is changed together with the encryption
algorithm.
16 (bytes)
propsToEncrypt
dbPassword
17
3.2
In the default configuration of the server, CSRF prevention is active. We recommend leaving this setting
unchanged:
CSRF Prevention
Configuration File
.../WEB-INF/classes/esapi/security-config.properties
3.3
Property
Value
Description
security.validation.csrf.on
true <default>
false
Parameter names and values can't have tags (< and >). If your business data contains tags, you need to
update the security configuration to allow them.
SQL queries should start with SELECT and have no comments. Multiple queries separated by semi-colons
(;) are also prohibited. If your reports or Domains have such queries, you need to either change them or
update the security configuration to allow them.
If users see recurring errors, administrators can examine logs to determine what input is not allowed. Preferably,
users should modify their input to remove special characters that are security risks. If that's not feasible,
administrators can configure the security framework to modify security rules or turn off the security restrictions,
based on their perceived threat level.
Input validation rules were added to comply with security guidelines for web applications. Turning off
input validation or modifying the validation rules may make the server more vulnerable to web attacks.
18
File
Contents
<js-webapp>/WEB-INF/classes/esapi/securityconfig.properties
<js-webapp>/WEB-INF/bundles/security.properties
<js-webapp>/WEBINF/classes/esapi/security.properties
<js-webapp>/WEBINF/classes/esapi/validation.properties
Input validation is based on UTF-8 encoded input. Make sure your application server is configured
for UTF-8 URIs as described in the JasperReports Server Administrator Guide
Input validation is enabled by default when installing JasperReports Server. To turn off one or more of the
protection features:
Input Validation
Configuration File
.../WEB-INF/classes/esapi/security-config.properties
Property
Value
Description
security.validation.input.on
true <default>
false
security.validation.sql.on
true <default>
false
3.3.1
19
Value
message.validation.input
message.validation.sql
Set these properties to messages and error codes that match the rest of your application. The goal is to display a
message that attackers will not recognize as a security error, yet one that administrators can uniquely identify in
the logs.
If you translate your application into other languages, be sure to create a locale-specific copy of this file and
translate these messages as well.
3.3.2
Allowed characters are determined by a regular expression called a validator. Validators are named regular
expressions that can be used in any number of input validation rules. Although one validator can be used in
several rules, each validation rule should be as specific as possible to the allowable input.
The predefined input validation rules in JasperReports Server are designed to allow all data and normal user
input, while blocking potential attacks on the server. If your data or your user input causes security errors (false
positives), you may choose to modify the input validation rules to allow your input.
1.
Locate the "SECURITY FAILURE" message in your logs. For more information about logs, see
"Configuring System Logs" in the JasperReports Server Administrator Guide. The log message contains the
name of the parameter and context where the parameter was used.
2.
3.
Locate the parameter name and context. For example, this is the input validation rule for the entities
parameter on the Manage Roles page:
entities=Alpha,AlphaNumPunctuation,5000,true,entities-Manage_Roles_context
20
<parameter>=<nameValidator>,[!]<valueValidator>,<charLimit>,<blankAllowed>,<parameter><context>_context
4.
5.
Usually, you need to change the value validator to one that allows your input characters. Select a value
validator from the file <js-webapp>/WEB-INF/classes/esapi/validation.properties that allows your input,
or create one as described in the next section.
b.
c.
Save your changes and redeploy the JasperReports Server webapp, or restart your application server.
Recommendations:
Try to keep the character limit as close to the expected value as possible.
Try to use a validator as close to the expected values as possible. If a parameter's value is expected to be
numbers only, use the Numeric validator.
Most validators are whitelists that specify allowed character patterns. A validator may be preceded by an
exclamation point (!) to indicate that everything but those values is permitted. When used with a validator
that matches characters or words, this syntax implements a blacklist. Some rules are easier to define as
whitelists, others as blacklists.
If a parameter can have radically different values or the same parameter is used in different situations, you
can apply more than one rule to that parameter. To do this, simply copy a parameter rule and add
incremental integers to the parameter name. For example:
standAlone=Alpha,Alpha,50,true,standAlone-Report_PopupMenu_context
Updated to:
standAlone=Alpha,AlphaNum,50,true,standAlone-Report_PopupMenu1of3_context
standAlone2=Alpha,JSONObject,50000,true,standAlone-Report_PopupMenu2of3_context
standAlone3=Alpha,JSONArray,500000,true,standAlone-Report_PopupMenu3of3_context
With multiple rules for the same parameter, each rule is applied in the order listed until one passes
(equivalent to a logical OR). If they all fail, the input is blocked and the user is notified with the
generic error message. The rules that fail still appear as security warnings in the logs. Use
numbering in the context names, as shown above, to easily identify these false-positive messages.
When using multiple rules, define the most used rule or the most permissive rule first to optimize
validation and reduce false-positive log messages.
3.3.3
1.
21
2.
Locate the validator used in the input validation rule you want to modify, for example the Alpha validator
expression allows for any letters in any language:
Validator.Alpha=^[\\p{L}\\p{M}]*$
3.
Copy the entire rule on a new line and give it a new name with the following format:
Validator.<validatorName>=<regularExpression>
Remember to use double backslashes (\\) in properties files for single backslashes in the expression. You
should also use the \p{} syntax to match international letters and their accent marks, for example:
Validator.AlphaDotSpace=^[\\p{L}\\p{M}\\.\\s]*$
4.
Use the new value validator name in your input validation rule, as described in the previous procedure.
5.
Save your changes and redeploy the JasperReports Server webapp, or restart your application server.
3.3.4
2.
3.
4.
Save your changes and redeploy the JasperReports Server web app, or restart your application server.
3.3.5
Query Validation
Query validation is a special case of input validation, where the server ensures that all queries being issued by
the server meet a preset pattern for a safe query. When query validation is enabled, all queries in reports and
Domains use the following validator:
Validator.ValidSQL=^\\s*((?i)select)\\s+[^;]+$
As a result:
Queries for reports must retrieve data only, in other words, use only the SELECT statement. The following
statements are forbidden:
DROP, INSERT, UPDATE, DELETE
If you want to use stored procedures, you must add the following validator to the file <js-webapp>/WEBINF/classes/esapi/validation.properties:
Validator.ValidSPROC=^\\s*\\(((?i)call)\\s+[^;]+\\)$
22
And then modify the validation rule for the corresponding parameter or field where you want to allow
stored procedure calls. If you want to allow stored procedure calls in addition to select statements, specify
multiple validation rules as shown in sectionEditing Input Validation Rules on page20.
When SQL validation fails, the logs contain the message described in Customizing Security Error
Messages on page19, such as the following:
2011-11-21 13:54:28,007 ERROR ValidatorImpl,"http-bio-8090"-exec-12:48 - An error has
occurred. Please contact your system administrator. (6632)
org.owasp.esapi.errors.ValidationException: SQL_Query_Executor_context: Invalid
input. Please conform to regex ^\s*((?i)select)\s+[^;]+$ with a maximum length of
50000
3.3.6
Further Configuration
The configuration files contain some miscellaneous default settings for the security framework. In particular they
define default action for input that has no validation rules. Changing these defaults is possible but not
recommended:
Advanced Input Validation
Configuration File
.../WEB-INF/classes/esapi/security-config.properties
Property
Default Value
Description
log.msg.security.off
msg.no.rule
msg.cannot.load
Configuration File
.../WEB-INF/classes/esapi/security.properties
23
3.4
Property
Default Value
Description
DEFAULT
Alpha,AlphaNumPunctuation
Brackets,200000,true,DEFAULT
Value
Description
file.upload.max.size
-1
<default>
The following settings apply to most file upload dialogs in the UI, such as uploading a JRXML or a JAR file to
create a JasperReport in the repository. These settings in the fileResourceValidator bean restrict the file size
and the filename pattern.
24
Value
Description
maxFileSize
-1
<default>
fileNameRegexp
^.+$
<default>
fileName
ValidationMessageKey
<null/>
<default>
The following setting restricts the extension of the uploaded file. The upload dialogs will browse only for files
with the given extensions. Add or remove extensions to change the file type restrictions:
File Upload Extensions
Configuration File
<jasperserver-pro-war>/scripts/resource.locate.js
Property
Value
ALLOWED_FILE_
RESOURCE_EXTENSIONS
25
3.5
Bean
Description
showStacktrace
Message
webAppSecurity
Filter
Restart your application server or redeploy the JasperReports Server web app for this change to take effect.
3.6
Behind a firewall servers and users often refer to other computers in the same domain without using the domain
name. Flash considers this a different domain and blocks access to data unless the computer name is given in the
policy:
<cross-domain-policy>
<allow-access-from domain="myserver.example.com" />
26
When using web services, use the allow-http-request-headers-from element so that actions encoded in
the request header are allowed. The following example allows standard requests and web service requests from
any subdomain of example.com.
<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="*.example.com"/>
<allow-http-request-headers-from domain="*.example.com" headers="*"
secure="true"/>
</cross-domain-policy>
For a description of all possible properties, see the cross-domain policy file specification.
To define a cross-domain policy for Flash-based reports, create a file such as the ones above on the server
containing the data being accessed. Be sure to place the crossdomain.xml file at the root of the filespace being
served. For example, if you use Apache Tomcat, place your files in the following locations:
3.7
File
Location
crossdomain.xml
<website-B-tomcat-dir>/webapps/ROOT/crossdomain.xml
<website-B-tomcat-dir>/webapps/ROOT/<any-dir>/*.xml
<website-A-tomcat-dir>/webapps/<appname>/<any-dir>
3.7.1
27
Next in this example, you create key.bin, the keystore file, in the Tomcat home folder. Use one of these
commands.
For Windows:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA -keystore %CATALINA_HOME%\conf\key.bin
For Unix:
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore $CATALINA_HOME/conf/key.bin
The basic install requires certain data. With the above commands, you're prompted for the data:
3.7.2
Enter two passwords twice. The default for both is changeit. If you use the default, be sure to set better,
stronger passwords later.
Specify information about your organization, including your first and last name, your organization unit, and
organization. The normal response for first and last name is the domain of your server, such as
jasperserver.mycompany.com. This identifies the organization the certificate is issued to. For organization
unit, enter your department or similar-sized unit; for organization, enter the company or corporation. These
identify the organization the certificate is issued by.
Keytool has numerous switches. For more information about it, see the Java documentation.
To implement a connector, you need to remove the comment tags around its code. Then you can customize the
specified options as necessary. For detailed information about the common options, consult the Tomcat 7.0 SSL
Configuration HOW-TO. For detailed information about all possible options, consult the Server Configuration
Reference.
The default protocol is HTTP 1.1; the default port is 8443. The port is the TCP/IP port number on which
Tomcat listens for secure connections. You can change it to any port number (such as the default port for
HTTPS communications, which is 443). However, note that if you run Tomcat on port numbers lower than
1024, special setup outside the scope of this document is necessary on many operating systems.
28
3.7.3
http://localhost:8080/jasperserver[-pro]/
HTTPS:
https://localhost:<SSLport>./jasperserver[-pro]/
The next step, then, is to configure the web application to enforce SSL as the only protocol allowed. Otherwise,
requests coming through HTTP are still serviced.
Edit the file <js-webapp>/WEB-INF/web.xml. Near the end of the file, make the following changes inside the
first <security-constraint> tag:
The term CONFIDENTIAL forces the server to accept only SSL connections through HTTPS. And because of the
URL pattern /*, all web services must also use HTTPS. If you need to turn off SSL mode, you can set the
transport guarantee back to NONE or delete the entire <security-constraint> tag.
3.8
After uncommenting the security constraint, your final code should be like the following:
<!-- This constraint disables the listed HTTP methods, which are not used by JS -->
29
<security-constraint>
<web-resource-collection>
<web-resource-name>RestrictedMethods</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>HEAD</http-method>
<http-method>CONNECT</http-method>
<http-method>COPY</http-method>
<http-method>LOCK</http-method>
<http-method>MKCOL</http-method>
<http-method>OPTIONS</http-method>
<http-method>PATCH</http-method>
<http-method>PROPFIND</http-method>
<http-method>PROPPATCH</http-method>
<http-method>SEARCH</http-method>
<http-method>TRACE</http-method>
<http-method>UNLOCK</http-method>
</web-resource-collection>
</security-constraint>
3.9
The JSESSIONID cookie is managed by the application server, so its security setting depends on your app
server configuration.
Jaspersoft doesn't set the secure flag on these cookies because we don't want to force you to use secure
connections. If you want all cookies to be secure, you must customize the source files that create the cookies.
This requires the source code distribution and recompiling and building the server app, as described in the
JasperReports Server Source Build Guide.
To customize JasperReports Server so cookies are sent only via secure connections:
1.
For the time zone and locale cookies, open the following file to edit:
jasperserver-war-jar\src\main\java\com\jaspersoft\jasperserver\war\UserPreferencesFilter.java
2.
Locate the following code in 2 locations, one for each cookie, and add the middle line to both:
cookie.setMaxAge(cookieAge);
cookie.setSecure(true); /* requires HTTPS */
httpOnlyResponseWrapper.addCookie(cookie);
For more information, see the JavaDoc for the setSecure method on the javax.servlet.http.Cookie
class.
3.
For the repository tree cookies, open the following file to edit:
jasperserver-war\src\main\webapp\scripts\tree.nanotree.js
4.
30
5.
6.
7.
3.10.1
Tomcat 7 sets httpOnly on session ID cookies by default. However, on some versions of Tomcat 7, a session
error will occur while running reports, with the log error A request has been denied as a potential CSRF
attack. This is caused by a known conflict between security settings in Direct Web Remote library (DWR) 2.x
and some versions of Tomcat 7.0.x:
Tomcat 7 sets httpOnly on session ID cookies to safeguard against cross-site scripting (XSS) attacks.
DWR 2.xuses session ID cookies to safeguard against cross-site request forgery (CSRF).
To work around this problem, you must modify these safeguards by doing one of the following:
For more information on the security impact and relative risks of these two choices, see the Cross-site Scripting
and Cross-site Request Forgery pages at the Open Web Application Security Project (OWASP).
3.10.1.1 Allowing Requests from Other Domains in DWR
DWR is a server-side component used for input controls. By default, DWR uses session ID cookies to prevent
cross-site request forgery. You can disable the protection in DWR by setting the
crossDomainSessionSecurity parameter for the dwr servlet in the file <tomcat>\webapps\jasperserverpro\WEB-INF\web.xml:
31
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>org.directwebremoting.spring.DwrSpringServlet</servlet-class>
...
<init-param>
<param-name>crossDomainSessionSecurity</param-name>
<param-value>false</param-value>
</init-param>
</servlet>
3.10.2
In Apache Tomcat 6.0.19 or higher, you can enable httpOnly in the file <tomcat>/conf/context.xml:
<Context useHttpOnly="true">
...
</Context>
3.11.1
The Security Manager restricts permissions at the application server level. By default, no permissions are
disallowed at that level, so legitimate permissions must be specifically added. You must add permissions for
JasperReports Server. Doing so does not interfere with server operations because JasperReports Server security
restrictions occur on other levels.
Add the enabling code for the Security Manager in the file <apache-tomcat>/conf/catalina.policy.
ProtectionDomains can be enabled, as defined in <js-webapp>/WEB-INF/applicationContext.xml,
reportsProtectionDomainProvider bean.
To enable the Security Manager and give JasperReports Server full permissions there, add the following code
fragment at the end of catalina.policy:
32
After enabling the manager, you should add the security parameter to your Tomcat startup command. For
example:
<apache-tomcat> \bin\startup -security
If you didn't add the permissions properly, you will receive errors like the following:
Feb 9, 2010 12:34:05 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.security.AccessControlException: access denied (java.lang.RuntimePermission
accessDeclaredMembers)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkMemberAccess(Unknown Source)
at java.lang.Class.checkMemberAccess(Unknown Source)
at java.lang.Class.getDeclaredMethods(Unknown Source)
...
3.11.2
33
3.11.3
For Tomcat versions 6.0.20 and earlier, you also need to add permissions for Groovy scripts in the
catalina.policy file and in the protection domain for reports.
In <apache-tomcat>/conf/catalina.policy, you need to grant Groovy scripts permission to read the JasperReports
Server classpath:
grant codeBase "file:/groovy/script" {
permission java.io.FilePermission "${catalina.home}${file.separator}webapps
${file.separator}jasperserver-pro${file.separator}WEB-INF${file.separator}
classes${file.separator}-", "read";
permission java.io.FilePermission "${catalina.home}${file.separator}webapps
${file.separator}jasperserver-pro${file.separator}WEB-INF${file.separator}lib
${file.separator}*", "read";
};
Also, for a Tomcat bug found in 6.0.16, and fixed in 6.0.18, the following configuration change is required for
JasperReports Server to start properly.
In <apache-tomcat>/conf/catalina.policy, find the section that starts with:
grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
34
Configure login encryption as described in Encrypting User Session Login on page43. Specify static
key encryption by setting encryption.dynamic.key to false and configure the keystore as described.
2.
Once the server is restarted, log into the server to generate the static key.
3.
4.
Enter the password that you want to encrypt then click Encrypt. The script on this page will use the public
key to encrypt the password.
5.
Paste the encrypted password into the URL instead of the plain text password (log out of the server to test
this):
http://example.com:8080/jasperserver/flow.html?_flowId=homeFlow&j_username=joeuser&j_
password=<encrypted>
6.
For complex web applications generating report URLs on the fly, you can also encrypt the password with
JavaScript. Your JavaScript should perform the same operations as the encrypt.js script used by the encrypt.html
page at the URL indicated above. Using the encryptData() function in encrypt.js, your JavaScript can generate
the encrypted password and use it to create the URL.
Static key encryption is very insecure and recommended only for intranet server installation where the
network traffic is more protected. Anyone who sees the username and encrypted password can use them
to log into JasperReports Server. Therefore, we recommend creating user IDs with very specific
permissions to control access from URLs.
The only advantage of encrypting passwords in URLs is that passwords can't be deciphered and used to
attack other systems where users might have the same password.
35
36
CHAPTER 4
USER SECURITY
JasperReports Server ensures that users access only the data they're allowed to see. The settings that define
organizations, users, roles, and repository resources work together to provide complete access control.
This chapter contains the following sections:
4.1
Value
Description
<session-config>
<session-timeout>
20 <default>
Note that the session timeout also applies to how long a session remains in memory after a web services call
finishes. If another web service call with the same credentials occurs within the timeout period, the server reuses
the same session. If the timeout is too short for this case, you may have performance issues caused by a high
load of web service calls.
If the timeout is too long, a session may stay active for a long time (even indefinitely with a timeout of 0). The
risk of allowing long sessions is that the in-memory session is not updated with any role changes until the user
logs out manually (ending the session) and logs in again (creating a new session).
37
4.2
4.2.1
4.2.2
Property
Value
Description
autoCompleteLoginForm
true <default>
false
38
When you enable this option, the server automatically enables the Change Password link on the Login page,
even if allowUserPasswordChange is set to false.
If your users are externally authenticated, for example with LDAP, do not enable this option.
4.2.3
Property
Value
Description
passwordExpirationInDays
0 <default>
<any other value>
4.2.4
Property
Value
Description
allowUserPasswordChange
false <default>
true
39
Bean
Description
allowedPasswordPattern
userAuthority
Service
When you enforce a password pattern, you should set the following message to inform users why their password
was rejected. Be sure to set the message in all your locales.
Password Administration Option
Configuration File
.../WEB-INF/bundles/jsexceptions_messages[_locale].properties
4.3
Property
Description
exception.remote.weak.password
To back up DB2, Oracle, Microsoft SQL Server, and MySQL databases, refer to your database product
documentation.
2.
40
Stop your application server. You should leave your database running.
3.
Export the entire contents of the repository, which includes user profiles and their passwords, with the
following commands. Note that there are two dashes (--) in front of the command options:
Windows: cd <js-install>\buildomatic
js-export.bat --everything --output-dir js-backup-catalog
Linux:
cd <js-install>/buildomatic
js-export.sh --everything --output-dir js-backup-catalog
In the export operation, passwords are decrypted using the existing user password ciphers and re-encrypted
with the import-export encryption key. This is a separate encryption that ensures that passwords are never in
plain text, even when exported. For more information, see Import and Export in the JasperReports Server
Administrator Guide.
4.
Edit the properties in the following table to configure different ciphers. Both the server and the importexport scripts access the user profiles and must be configured identically. Make the same changes in both
files:
Bean
Description
allowEncoding
passwordEncoder
keyInPlainText
passwordEncoder
secretKey
passwordEncoder
secretKeyAlgorithm
passwordEncoder
cipher
Transformation
passwordEncoder
41
You should change the secretKey value so it's different from the default.
6.
Next, drop your existing jasperserver database, where the passwords had the old encoding, and recreate
an empty jasperserver database. Follow the instructions for your database server:
Dropping and Recreating the Database in PostgreSQL
Dropping and Recreating the Database in MySQL
Dropping and Recreating the Database in Oracle
Dropping and Recreating in the Database in Microsoft SQL Server
Import your exported repository contents with the following commands. The import operation will restore
the contents of JasperReports Server's private database, including user profiles. As the user profiles are
imported, the passwords are encrypted using the new cipher settings.
Note that there are two dashes (--) in front of the command options:
Windows: cd <js-install>\buildomatic
js-import.bat --input-dir js-backup-catalog
Linux:
cd <js-install>/buildomatic
js-import.sh --input-dir js-backup-catalog
During the import operation, passwords are decrypted with the import-export encryption key and then reencrypted in the database with the new user password encryption settings. For more information, see
Setting the Import-Export Encryption Key in the JasperReports Server Administrator Guide.
7.
Use a database like the SQuirreL tool to check the contents of the JIUser table in the jasperserver
database and verify that the password column values are encrypted.
8.
9.
Log into JasperReports Server to verify that encryption is working properly during the log in process.
4.3.1
2.
3.
Drop the jasperserver database, create a new one, and load the jasperserver schema:
drop database jasperserver;
create database jasperserver encoding='utf8';
\c jasperserver
\i js-pro-create.ddl
\i quartz.ddl
4.3.2
42
2.
mysql -u root -p
3.
Drop the jasperserver database, create a new one, and load the jasperserver schema:
mysql>drop database jasperserver;
mysql>create database jasperserver character set utf8;
mysql>use jasperserver;
mysql>source js-pro-create.ddl;
mysql>source quartz.ddl;
4.3.3
2.
3.
Drop the jasperserver database, create a new one, and load the jasperserver schema:
SQL>
SQL>
SQL>
SQL>
SQL>
4.3.4
2.
Drop the jasperserver database, create a new one, and load the jasperserver schema using the
SQLCMD utility:
cd <js-install>\buildomatic\install_resources\sql\sqlserver
sqlcmd -S ServerName -Usa -Psa
1> DROP DATABASE [jasperserver]
2> GO
1> CREATE DATABASE [jasperserver]
2> GO
1> USE [jasperserver]
2> GO
1> :r js-pro-create.ddl
2> GO
1> :r quartz.ddl
2> GO
4.4
43
Without HTTPS, all data sent by the user, including passwords, appear unencrypted in the network traffic.
Because passwords should never be visible, JasperReports Server provides an independent method for
encrypting the password values without using HTTPS. Passwords are encrypted in the following cases:
When a browser requests one of these pages, the server generates a private-public key pair and sends the public
key along with the page. A JavaScript in the requested page encrypts the password when the user posts it to the
server. Meanwhile, the server saves its private key and uses it to decrypt the password when it arrives. After
decrypting the password, the server continues with the usual authentication methods.
Login encryption is not compatible with password memory in the browser. Independent of the autocomplete
setting described in sectionConfiguring Password Memory on page38, the JavaScript that implements
login encryption clears the password field before submitting the page. As a result, most browsers will never
prompt to remember the encrypted password.
The disadvantage of login encryption is the added processing and the added complexity of web services login.
For backward compatibility, login encryption is disabled by default. To enable login encryption, set the
following properties. After making any changes, redeploy the JasperReports Server webapp or restart the
application server.
When login encryption is enabled, web services and URL parameters must also send encrypted
passwords. Your applications must first obtain the key from the server and then encrypt the password
before sending it. See the JasperReports Server Web Services Guide.
Login Encryption
Configuration File
.../WEB-INF/classes/esapi/security-config.properties
44
Property
Value
Description
encryption.on
truefalse
<default>
encryption.type
RSA <default>
encryption.key.length
integer power of 2
1024 <default>
encryption.dynamic.key
true <default>
false
Encryption has two modes, dynamic and static, as determined by the encryption.dynamic.key parameter.
These modes provide different levels of security and are further described in the following sections.
4.4.1
4.4.2
45
Value
Description
keystore.location
keystore.jks
<default>
keystore.password
jasper123 <default>
keystore.key.alias
jasper <default>
keystore.key.password
jasper321 <default>
When you change the key alias, the old key will not be deleted. You can use it again by resetting the key alias.
Also, once the key has been created with a password, you can't change the password through the keystore
configuration. To delete keys or change a keystore password, the server administrator must use the Java
keytool.exe utility in the bin directory of the JRE or JDK. If you change the keystore password or the key
password, the keystore configuration above must reflect the new values or login will fail for all users.
46
CHAPTER 5
You may need to restrict access to the data in a Domain accessed by multiple users. For example, you may
allow managers to analyze data across their department but allow individual contributors to see only their own
data. For this purpose, Domains support security files.
This section describes functionality that can be restricted by the software license for JasperReports
Server. If you dont see some of the options described in this section, your license may prohibit you from
using them. To find out what you're licensed to use, or to upgrade your license, contact Jaspersoft.
When Domain security is properly configured, a user sees only the data they're meant to see. You define
Domain security by writing data access filtering rules in XML and uploading them as a new security file in the
Domain Designer. These rules are powerful and flexible, and can be based on multiple aspects like user roles or
profile attributes.
The power of this solution is best presented as an example business case. This section describes a fictional
companys implementation of Domains in JasperReports Serverfrom both a business perspective and an
implementation perspective.
In JasperReports Server 6.0, we added support for hierarchical attributes. The examples in this chapter
still work, but they do not support the cascading functionality of hierarchical attributes. See Working with
Hierarchical Attributes on page59 for information on implementing domain security with hierarchical
attributes.
For details about the basics of Domains, refer to the JasperReports Server User Guide.
This chapter includes the following sections:
Business Case
Process Overview
Sales Domain
Roles, Users, and Attributes
Setting Up Logging and Testing
Creating a Domain Security File
Testing and Results
47
5.1
Business Case
CZS is an up-and-coming consumer electronics company with operations in the U.S. and Japan. CZS uses
JasperReports Server to track sales revenue and operating cost.
The CZS Sales organization employs the following personnel:
Rita is the regional sales manager in the Western U.S. She uses the Sales Domain to create reports that track
sales trends in her region.
Pete is a sales representative selling televisions in Northern California. He uses reports based on the same
Domain to track his quarterly progress.
Yasmin is a sales representative selling cell phones in Northern California. She uses reports based on the
same Domain to track her quarterly progress.
Alexi is the regional sales manager in Kansai, Japan. He uses reports based on the same Domain to track
sales trends in his region.
CZS stores its data in a MySQL database. The data is exposed by the Sales Domain, which displays information
about CZSs consumer electronics sales across the world. It's filtered depending on each employees cities of
operation and product. And only managers can access cost information.
5.2
Process Overview
The table below summarizes the steps CZS could take to create the Sales Domain and configure it to secure
their data using user profile attributes and roles.
48
Steps
Described in
5.3
Steps
Described in
Sales Domain
The first step is to create a Domain that presents the relevant data. CZS is primarily interested in the volume and
revenue of their sales, as well as their operational cost. These metrics are represented in the Sales Domain as
fields: unit sales, store sales, and store cost. The Domain also includes fields to establish context for the sales
data, such as product department, city, and state. The following figures show the configuration of this Domain
in the designer.
49
5.4
5.4.1
Roles
Domain security can reference a users roles to determine the access permissions to grant. The following roles
meet CZSs needs:
CZS grants each role access to view the Sales Domain. For details about creating roles and assigning privileges,
refer to the JasperReports Server Administrator Guide. The following shows CZSs ROLE_SALES_REP:
50
5.4.2
Users
CZS created a user for each of their employees and assigned roles based on each employees level of
responsibility:
User
Role
Alexi
ROLE_SALES_MANAGER
Pete
ROLE_SALES_REP
Rita
ROLE_SALES_MANAGER
Yasmin
ROLE_SALES_REP
For details about creating users, refer to the JasperReports Server Administrator Guide.
5.4.3
User Attributes
A user attribute is a name-value pair defined at the user level that corresponds to some data in a Domain. CZS
wants to be able to describe their users in terms of product lines that they sell and the cities where they sell
them. So each user is assigned two attributes in addition to a role:
Table 5-1 UserAttributes of All CZS Users
User
Profile Attributes
Cities
Product/Department
Rita
Pete
San Francisco
Television
Yasmin
San Francisco
Wireless Devices
Alexi
Osaka, Sakai
Wireless Devices
The security file shown in 5.9.2, Domain Security File, on page66 refers to two of these attributes:
The Cities profile attribute corresponds to the City field in the Geography item group in the Sales
Domain.
The ProductDepartment attribute corresponds to the Department field in the Product item group in the
Sales Domain.
Each users attributes determine the data returned to him by the Domain, based on an access grant definition
that refers to user attributes. For example, Ritas attribute value for Cities is San Francisco,Los
Angeles,Sacramento. So she sees data for all those cities.
For information on configuring user attributes in earlier versions of JasperReports Server, see the JasperReports
Library Ultimate Guide for your version.
51
The following figure shows the configuration of Ritas user account. Notice Ritas attributes listed below her
roles:
5.5
Enabling Logging
Creating a Test Report
5.5.1
Enabling Logging
To assist in the iterative creation of their security file, CZS enables more verbose logging to help troubleshoot
problems with the Sales Domain and security file. Such logging features are disabled by default to minimize the
log size. They should be enabled in test environments when defining security.
To enable Domain security logging:
1. Locate and open the log4j.properties file and scroll to the bottom.
You'll find this file in the WEB-INF folder; if you use Tomcat as your application server, the default path to
this location is:
<js-install>\apache-tomcat\webapps\jasperserver-pro\WEB-INF.
2.
Add the following lines after the last line in the file:
log4j.logger.com.jaspersoft.commons.semantic.datasource.impl.
52
SemanticLayerSecurityResolverImpl=debug
log4j.logger.com.jaspersoft.commons.semantic.dsimpl.JdbcTableDataSet=DEBUG, stdout, fileout
log4j.logger.com.jaspersoft.commons.util.JSControlledJdbcQueryExecuter=DEBUG, stdout, fileout
3.
4.
Information about Domains and their security will now be written to the log and to the console.
The additional information written to the log can be very verbose, and your log files will grow more quickly
with these properties enabled. You can manage your logs in the file system,in the WEB-INF/logs folder
under your JasperReports Server installation. For more information, refer to the log4j documentation,
which is available at:
http://logging.apache.org/log4j/docs/manual.html
Because these options are so verbose, we recommend using them only during debugging and disable
them in your production environment.
5.5.2
5.6
Row-level access determines which rows in the data source can be displayed to a specific user.
Column-level access determines which columns in the data source can be displayed to a specific user.
53
5.6.1
Row-level Security
This section gives an overview of row-level security and then shows how CZS uses row-level security to restrict
access based on Cities and ProductDepartment.
Each access grant ID must be unique within the scope of the security file.
You can define several similar resource access grants for each resource defined in your Domain. By
default, the server assumes access grants are combined with a logical AND. You can force the
server to use a logical OR by setting the orMultipleExpressions property to TRUE.
where:
54
table_ID.field_name is the table name and field name of the field whose value youre comparing to a
profile attribute.
For example, CZS used the following XML to define a principal expression and filter expression that grant
access to users based on their Citiesprofile attribute:
<resourceAccessGrant id="Jointree_1_row_access_grant_20">
<principalExpression><![CDATA[authentication.principal.attributes.any
{it.attrName in ['Cities'] }]]></principalExpression>
<filterExpression>testProfileAttribute(store.store_city,'Cities')
</filterExpression>
</resourceAccessGrant>
The principle expression is simple; it checks the Cities attribute of the logged-in user. The filter expression
checks the users Cities profile attribute as well, but it compares this value with the values in the Domains
store_city field. The Domain then returns all the rows that match the users Cities profile attribute.
5.6.1.3 CZSs Resource Access Grants
CZS uses the access grant above to determine data access based on a users Cities profile attribute. Because
CZS defines all their profile attributes in the same manner, they can use a similar resource access grant to
determine data access for users based on their ProductDepartment profile attribute.
The resulting security file included these two resource access grants (see the complete file in 5.9.2, Domain
Security File, on page66):
<!-- Row level security -->
<!-- What access do roles/users have to the rows in the resource? -->
<resourceAccessGrantList id="JoinTree_1_List" label="ListLabel"
resourceId="JoinTree_1">
<resourceAccessGrants>
<!-- Row level for Cities -->
<resourceAccessGrant id="Jointree_1_row_access_grant_20">
<principalExpression><![CDATA[authentication.principal.attributes.any
{it.attrName in ['Cities'] }]]></principalExpression>
<filterExpression>testProfileAttribute(store.store_city,'Cities')
</filterExpression>
</resourceAccessGrant>
<!-- Row level for Product Dept -->
<resourceAccessGrant id="Jointree_1_row_access_grant_30">
<principalExpression><![CDATA[authentication.getPrincipal().getAttributes().any
{it.getAttrName() in ['ProductDepartment'] }]]></principalExpression>
<filterExpression>testProfileAttribute(product_class.product_department,
'ProductDepartment')</filterExpression>
</resourceAccessGrant>
</resourceAccessGrants>
</resourceAccessGrantList>
5.6.2
Column-level Security
Column-level access determines which columns in the data source can be displayed to specific users.
55
5.6.3
CZS then adds an item group access grant that grants limited access to sales representatives; the following XML
grants access to the Store Sales and Sales Units fields while revoking access to the Store Cost field:
<!-- Column-level access for Sales Reps-->
<itemGroupAccessGrant id="Jointree_1_item_group_access_grant_REP"
access="granted">
<principalExpression>authentication.getPrincipal().getRoles().any
{ it.getRoleName() in ['ROLE_SALES_REP'] }</principalExpression>
<itemAccessGrantList id="Jointree_1_grant2_item_group_items"
defaultAccess="denied">
<itemAccessGrants>
<itemAccessGrant id="Jointree_1_grant2_items_grant1" itemId="StoreSales"
access="granted" />
<itemAccessGrant id="Jointree_1_grant2_items_grant2" itemId="UnitSales"
access="granted" />
</itemAccessGrants>
</itemAccessGrantList>
</itemGroupAccessGrant>
56
5.6.4
5.7
4.
In the User page, click Log in as User. The selected users Home page appears.
5.
6.
7.
Review the report to ensure that it shows only the data this user should see. Also verify that you have not
restricted data that the user should see. The figures below show CZSs results.
8.
57
When viewing the test report created from the Sales Domain:
Rita can see all data pertaining to California and the three Californian cities where CZS has offices (Los
Angeles, Sacramento, and San Francisco):
Pete can see only Television data about San Francisco; he sees zeros for Store Cost because he is denied
access to that field:
Yasmin can see only Wireless Devices data about San Francisco; she sees zeros for Store Cost because she
is denied access to that field:
58
Alexi can see all data pertaining to the two Japanese cities where CZS has stores (Osaka and Sakai):
5.7.1
AttrName String that specifies the attribute to check. Can be any available attribute, including predefined
attributes such as Role and customer-defined attributes such as Cities.
Level Category that specifies the level in the hierarchy to check for attributes. One of: null, 'SERVER',
'TENANT', or 'USER'. To use all available attributes from all levels, use null.
required (optional) Boolean that specifies whether or not the attribute is required. When set to true, an
error message is displayed in the UI if the attribute is not present. When set to false (default), no such
error is displayed; instead, the filterExpression fails silently and information which the user is not
The following expression tests for the Manager role at the server level, and displays an error message if the
attribute is not found:
<principalExpression>attributesService.getAttribute('Role','SERVER',
true)?.getAttrValue() in ['Manager']
</principalExpression>
The following example shows how to use getAttribute() in a Domain security file:
59
<resourceAccessGrants>
<resourceAccessGrantList id="sales_join_resource_access_grant"
label="aLabel" resourceId="sales_join">
<resourceAccessGrants>
<resourceAccessGrant id="custom_grant_2">
<principalExpression>attributesService.getAttribute('Role', null)?.getAttrValue()
in ['Manager']</principalExpression>
<filterExpression>testProfileAttribute(region11.sales_city,'Cities')
</filterExpression>
</resourceAccessGrant>
</resourceAccessGrants>
</resourceAccessGrantList>
</resourceAccessGrants>
To update an existing Domain security file to support hierarchical attributes, update principal expressions to use
attributesService. For example, suppose you have the following resource access grant, which does not
support hierarchical attributes:
<resourceAccessGrant id="custom_grant_2">
<principalExpression>authentication.getPrincipal().getRoles().any{ it.getRoleName()
in ['Manager'] }</principalExpression>
<filterExpression>testProfileAttribute(region11.sales_city,'Cities')</filterExpression>
</resourceAccessGrant>
attributesService is implemented in Groovy. For more information about Groovy, see www.groovylang.org.
5.8
60
A Domain should cover a large subject area and include data with multiple uses. Define joins to create data
islands that each contain related information; the data islands themselves can contain completely unrelated
data. For example, you could include both human resources and sales data in a single Domain; users would
see only the information relevant to their job responsibilities. For an example of this type of Domain, refer
to the SuperMart example that can be installed with JasperReports Server.
When defining a Domain, dont create too many item groups, and avoid very deep structures with many
levels. Such complexity makes the Domain harder to use.
Logging can help you troubleshoot any problems you encounter while implementing Domain security. For
more information, refer to 5.5.1, Enabling Logging, on page52.
Refer to http://groovy.codehaus.org for information on the Groovy expressions that Domain security files
support. Note that, while the server does validate Groovy expressions, the validation is very light weight
and doesnt detect all improperly formed expressions.
If the names of tables and fields in your data source change, you can edit the Domain design XML file so
that the resource names match the new names in the database. Then, upload the new version of the file;
your reports that rely on the Domain will work properly without being updated individually. If you have
defined a security file for this Domain, you must also edit the resource names in the security file.
Start with the simplest item or resource grant, and when that works, expand upon it. Start simple and iterate
until you have the full set of access grants needed. Follow good troubleshooting practices, such as changing
only a single aspect of the security file before testing the results of the change.
Use an XML editor to create your security file. While the server validates the schema against its own XML
definition, a typical XML editor can identify issues like unclosed tags. For example, open the security file
with Internet Explorer; if it returns errors, use them to identify and correct your XML.
Once your Domain is created, create several Domain Topics that focus on specific aspects of the Domain or
specific data your end-users will want to review regularly. To do so, click Create > Ad Hoc Report, select
your Domain, and use the Data, Filters, and Display pages to customize the contents and the way it's
displayed, then use the Topics page to save the new Domain Topic.
When creating a security file, be sure to use the IDs of items and groups as they are defined in the Domain
design file exported from the Domain Designer. For more information.
If you modify the Domain, you should also export the design file and update the security file with any IDs
that have changed. Update the security file using the Change function on the Edit Domain page of the
Domain Designer.
</resourceAccessGrants>
</resourceAccessGrantList>
...
</resourceAccessGrants>
<securityDefinition xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema"
version="1.0" itemGroupDefaultAccess="granted">
<resourceAccessGrants>
<!-- Begin row-level security -->
<resourceAccessGrantList id="expense_join_resource_access_grant" label="aLabel"
resourceId="expense_join">
<resourceAccessGrants>
<resourceAccessGrant id="expense_join_ROLE_SUPERMART_MANAGER_store_row_grant">
<principalExpression>
authentication.getPrincipal().getRoles().any{ it.getRoleName() in
['ROLE_SUPERMART_MANAGER'] }
</principalExpression>
61
</itemGroupAccessGrants>
</itemGroupAccessGrantList>
...
</itemGroupAccessGrants>
</securityDefinition>
5.9
5.9.1
62
resourceId="JoinTree_1.store.store_city" />
<item description="Country" descriptionId="" id="Country" label="Country"
labelId="" resourceId="JoinTree_1.store.store_country" />
<item description="State" descriptionId="" id="State" label="State"
labelId="" resourceId="JoinTree_1.store.store_state" />
</items>
</itemGroup>
<itemGroup description="Sales Data" descriptionId="" id="SalesData" label="Sales
Data" labelId="" resourceId="JoinTree_1">
<items>
<item description="Store Cost" descriptionId="" id="StoreCost" label="Store
Cost" labelId="" resourceId="JoinTree_1.sales_fact_2006.store_cost" />
<item description="Store Sales" descriptionId="" id="StoreSales" label="Store
Sales" labelId="" resourceId="JoinTree_1.sales_fact_2006.store_sales" />
<item description="Unit Sales" descriptionId="" id="UnitSales" label="Unit
Sales" labelId="" resourceId="JoinTree_1.sales_fact_2006.unit_sales" />
</items>
</itemGroup>
</itemGroups>
<resources>
<jdbcTable datasourceId="czsdata" id="product" tableName="product">
<fieldList>
<field id="brand_name" type="java.lang.String" />
<field id="gross_weight" type="java.lang.Double" />
<field id="net_weight" type="java.lang.Double" />
<field id="product_class_id" type="java.lang.Integer" />
<field id="product_id" type="java.lang.Integer" />
<field id="product_name" type="java.lang.String" />
<field id="recyclable_package" type="java.lang.Boolean" />
<field id="shelf_depth" type="java.lang.Double" />
<field id="shelf_height" type="java.lang.Double" />
<field id="shelf_width" type="java.lang.Double" />
<field id="SKU" type="java.lang.Long" />
<field id="SRP" type="java.math.BigDecimal" />
<field id="units_per_case" type="java.lang.Short" />
</fieldList>
</jdbcTable>
<jdbcTable datasourceId="czsdata" id="product_class" tableName="product_class">
<fieldList>
<field id="product_category" type="java.lang.String" />
<field id="product_class_id" type="java.lang.Integer" />
<field id="product_department" type="java.lang.String" />
<field id="product_family" type="java.lang.String" />
<field id="product_subcategory" type="java.lang.String" />
</fieldList>
</jdbcTable>
<jdbcTable datasourceId="czsdata" id="product" tableName="product">
<fieldList>
<field id="brand_name" type="java.lang.String" />
<field id="gross_weight" type="java.lang.Double" />
<field id="net_weight" type="java.lang.Double" />
<field id="product_class_id" type="java.lang.Integer" />
<field id="product_id" type="java.lang.Integer" />
<field id="product_name" type="java.lang.String" />
<field id="recyclable_package" type="java.lang.Boolean" />
63
64
65
</resources>
</schema>
5.9.2
66
67
68
GLOSSARY
Ad Hoc Editor
The interactive data explorer in JasperReports Server Professional and Enterprise editions. Starting from a
predefined collection of fields, the Ad Hoc Editor lets you drag and drop fields, dimensions, and measures to
explore data and create tables, charts, and crosstabs. These Ad Hoc views can be saved as reports.
Ad Hoc Report
In previous versions of JasperReports Server, a report created through the Ad Hoc Editor. Such reports could be
added to dashboards and be scheduled, but when edited in iReport, lost their grouping and sorting. In the
current version, the Ad Hoc Editor is used to explore views which in turn can be saved as reports. Such reports
can be edited in iReport and Jaspersoft Studio without loss, and can be scheduled and added to dashboards.
Ad Hoc View
A view of data that is based on a Domain, Topic, or OLAP client connection. An Ad Hoc view can be a table,
chart, or crosstab and is the entry point to analysis operations such as slice and dice, drill down, and drill
through. Compare OLAP View. You can save an Ad Hoc view as a report in order to edit it in the interactive
viewer, schedule it, or add it to a dashboard.
Aggregate Function
An aggregate function is one that is computed using a group of values; for example, Sum or Average. Aggregate
functions can be used to create calculated fields in Ad Hoc views. Calculated fields containing aggregate
functions cannot be used as fields or added to groups in an Ad Hoc view and should not be used as filters.
Aggregate functions allow you to set a level, which specifies the scope of the calculation; level values include
Current (not available for PercentOf), ColumnGroup, ColumnTotal, RowGroup, RowTotal, Total
Analysis View
See OLAP View.
Audit Archiving
To prevent audit logs from growing too large to be easily accessed, the installer configures JasperReports Server
to move current audit logs to an archive after a certain number of days, and to delete logs in the archive after a
certain age. The archive is another table in the JasperReports Servers repository database.
Audit Domains
A Domain that accesses audit data in the repository and lets administrators create Ad Hoc reports of server
activity. There is one Domain for current audit logs and one for archived logs.
69
Audit Logging
When auditing is enabled, audit logging is the active recording of who used JasperReports Server to do what
when. The system installer can configure what activities to log, the amount of detail gathered, and when to
archive the data. Audit logs are stored in the same private database that JasperReports Server uses to store the
repository, but the data is only accessible through the audit Domains.
Auditing
A feature of JasperReports Server Enterprise edition that records all server activity and allows administrators to
view the data.
Calculated Field
In an Ad Hoc view or a Domain, a field whose value is calculated from a user-defined formula that may include
any number of fields, operators, and constants. For Domains, a calculated field becomes one of the items to
which the Domains security file and locale bundles can apply. There are more functions available for Ad Hoc
view calculations than for Domains.
CRM
Customer Relationship Management. The practice of managing every facet of a companys interactions with its
clientele. CRM applications help businesses track and support their customers.
CrossJoin
An MDX function that combines two or more dimensions into a single axis (column or row).
Cube
The basis of most OLAP applications, a cube is a data structure that contains three or more dimensions that
categorize the cubes quantitative data. When you navigate the data displayed in an OLAP view, you are
exploring a cube.
Custom Field
In the Ad Hoc Editor, a field that is created through menu items as a simple function of one or two available
fields, including other custom fields. When a custom field becomes too complex or needs to be used in many
reports, it is best to define it as a calculated field in a Domain.
Dashboard
A collection of reports, input controls, graphics, labels, and web content displayed in a single, integrated view.
Dashboards often present a high level view of your data, but input controls can parametrize the data to display.
For example, you can narrow down the data to a specific date range. Embedded web content, such as other webbased applications or maps, make dashboards more interactive and functional.
Data Island
A single join tree or a table without joins in a Domain. A Domain may contain several data islands, but when
creating an Ad Hoc view from a Domain, you can only select one of them to be available in the view.
Data Policy
In JasperReports Server, a setting that determines how the server processes and caches data used by Ad Hoc
reports. Select your data policies by clicking Manage > Ad Hoc Settings.
Data Source
Defines the connection properties that JasperReports Server needs to access data. The server transmits queries to
data sources and obtains datasets in return for use in filling reports and previewing Ad Hoc reports.
JasperReports Server supports JDBC, JNDI, and Bean data sources; custom data sources can be defined as well.
70
Glossary
Dataset
A collection of data arranged in columns and rows. Datasets are equivalent to relational results sets and the
JRDataSource type in the JasperReports Library.
Datatype
In JasperReports Server, a datatype is used to characterize a value entered through an input control. A datatype
must be of type text, number, date, or date-time. It can include constraints on the value of the input, for example
maximum and minimum values. As such, a datatype in JasperReports Server is more structured than a datatype
in most programming languages.
Denormalize
A process for creating table joins that speeds up data retrieval at the cost of having duplicate row values
between some columns.
Derived Table
In a Domain, a derived table is defined by an additional query whose result becomes another set of items
available in the Domain. For example, with a JDBC data source, you can write an SQL query that includes
complex functions for selecting data. You can use the items in a derived table for other operations on the
Domain, such as joining tables, defining a calculated field, or filtering. The items in a derived table can also be
referenced in the Domains security file and locale bundles.
Dice
An OLAP operation to select columns.
Dimension
A categorization of the data in a cube. For example, a cube that stores data about sales figures might include
dimensions such as time, product, region, and customers industry.
Domain
A virtual view of a data source that presents the data in business terms, allows for localization, and provides
data-level security. A Domain is not a view of the database in relational terms, but it implements the same
functionality within JasperReports Server. The design of a Domain specifies tables in the database, join clauses,
calculated fields, display names, and default properties, all of which define items and sets of items for creating
Ad Hoc reports.
Domain Topic
A Topic that is created from a Domain by the Data Chooser. A Domain Topic is based on the data source and
items in a Domain, but it allows further filtering, user input, and selection of items. Unlike a JRXML-based
Topic, a Domain Topic can be edited in JasperReports Server by users with the appropriate permissions.
Drill
To click on an element of an OLAP view to change the data that is displayed:
Drill down. An OLAP operation that exposes more detailed information down the hierarchy levels by
delving deeper into the hierarchy and updating the contents of the navigation table.
Drill through. An OLAP operation that displays detailed transactional data for a given aggregate measure.
Click a fact to open a new table beneath the main navigation table; the new table displays the low-level
data that constitutes the data that was clicked.
Drill up. An OLAP operation for returning the parent hierarchy level to view to summary information.
71
Eclipse
An open source Integrated Development Environment (IDE) for Java and other programming languages, such as
C/C++.
ETL
Extract, Transform, Load. A process that retrieves data from transactional systems, and filters and aggregates the
data to create a multidimensional database. Generally, ETL prepares the database that your reports will access.
The Jaspersoft ETL product lets you define and schedule ETL processes.
Fact
The specific value or aggregate value of a measure for a particular member of a dimension. Facts are typically
numeric.
Field
A field is equivalent to a column in the relational database model. Fields originate in the structure of the data
source, but you may define calculated fields in a Domain or custom fields in the Ad Hoc Editor. Any type of
field, along with its display name and default formatting properties, is called an item and may be used in the Ad
Hoc Editor.
Frame
A dashboard element that displays reports or custom URLs. Frames can be mapped to input controls if their
content can accept parameters.
Group
In a report, a group is a set of data rows that have an identical value in a designated field.
In a table, the value appears in a header and footer around the rows of the group, while the other fields
appear as columns.
In a chart, the field chosen to define the group becomes the independent variable on the X axis, while the
other fields of each group are used to compute the dependent value on the Y axis.
Hierarchy Level
In an OLAP cube, a member of a dimension containing a group of members.
Input Control
A button, check box, drop-down list, text field, or calendar icon that allows users to enter a value when running
a report or viewing a dashboard that accepts input parameters. For JRXML reports, input controls and their
associated datatypes must be defined as repository objects and explicitly associated with the report. For
Domain-based reports that prompt for filter values, the input controls are defined internally. When either type of
report is used in a dashboard, its input controls are available to be added as special content.
iReport Designer
An open source tool for graphically designing reports that leverage all features of the JasperReports Library. The
Jaspersoft iReport Designer lets you drag and drop fields, charts, and sub-reports onto a canvas, and also define
parameters or expressions for each object to create pixel-perfect reports. You can generate the JRXML of the
report directly in iReport, or upload it to JasperReports Server. iReport is implemented in NetBeans.
Item
When designing a Domain or creating a Topic based on a Domain, an item is the representation of a database
field or a calculated field along with its display name and formatting properties defined in the Domain. Items
can be grouped in sets and are available for use in the creation of Ad Hoc reports.
72
Glossary
JasperReport
A combination of a report template and data that produces a complex document for viewing, printing, or
archiving information. In the server, a JasperReport references other resources in the repository:
The collection of all the resources that are referenced in a JasperReport is sometimes called a report unit. End
users usually see and interact with a JasperReport as a single resource in the repository, but report creators must
define all of the components in the report unit.
Level
Specifies the scope of an aggregate function in an Ad Hoc view. Level values include Current (not available for
PercentOf), ColumnGroup, ColumnTotal, RowGroup, RowTotal, Total.
JasperReports Library
An embeddable, open source, Java API for generating a report, filling it with current data, drawing charts and
tables, and exporting to any standard format (HTML, PDF, Excel, CSV, and others). JasperReports processes
reports defined in JRXML, an open XML format that allows the report to contain expressions and logic to
control report output based on run-time data.
JasperReports Server
A commercial open source, server-based application that calls the JasperReports Library to generate and share
reports securely. JasperReports Server authenticates users and lets them upload, run, view, schedule, and send
reports from a web browser. Commercial versions provide metadata layers, interactive report and dashboard
creation, and enterprise features such as organizations and auditing.
Jaspersoft ETL
A graphical tool for designing and implementing your data extraction, transforming, and loading (ETL) tasks. It
provides hundreds of data source connectors to extract data from many relational and non-relational systems.
Then, it schedules and performs data aggregation and integration into data marts or data warehouses that you
use for reporting.
Jaspersoft OLAP
A relational OLAP server integrated into JasperReports Server that performs data analysis with MDX queries.
The product includes query builders and visualization clients that help users explore and make sense of
multidimensional data. Jaspersoft OLAP also supports XML/A connections to remote servers.
Jaspersoft Studio
An open source tool for graphically designing reports that leverage all features of the JasperReports Library.
Jaspersoft Studio lets you drag and drop fields, charts, and sub-reports onto a canvas, and also define parameters
or expressions for each object to create pixel-perfect reports. You can generate the JRXML of the report directly
in Jaspersoft Studio, or upload it to JasperReports Server. Jaspersoft Studio is implemented in Eclipse.
JavaBean
A reusable Java component that can be dropped into an application container to provide standard functionality.
JDBC
Java Database Connectivity. A standard interface that Java applications use to access databases.
73
JNDI
Java Naming and Directory Interface. A standard interface that Java applications use to access naming and
directory services.
Join Tree
In Domains, a collection of joined tables from the actual data source. A join is the relational operation that
associates the rows of one table with the rows of another table based on a common value in given field of each
table. Only the fields in a same join tree or calculated from the fields in a same join tree may appear together in
a report.
JPivot
An open source graphical user interface for OLAP operations. For more information, visit
http://jpivot.sourceforge.net/.
JRXML
An XML file format for saving and sharing reports created for the JasperReports Library and the applications
that use it, such as iReport Designer and JasperReports Server. JRXML is an open format that uses the XML
standard to define precisely all the structure and configuration of a report.
MDX
Multidimensional Expression Language. A language for querying multidimensional objects, such as OLAP (On
Line Analytical Processing) cubes, and returning cube data for analytical processing. An MDX query is the
query that determines the data displayed in an OLAP view.
Measure
Depending on the context:
In a report, a formula that calculates the values displayed in a tables columns, a crosstabs data values, or a
charts dependent variable (such as the slices in a pie).
In an OLAP view, a formula that calculates the facts that constitute the quantitative data in a cube.
Mondrian
A Java-based, open source multidimensional database application.
Mondrian Connection
An OLAP client connection that consists of an OLAP schema and a data source. OLAP client connections
populate OLAP views.
Mondrian Schema Editor
An open source Eclipse plug-in for creating Mondrian OLAP schemas.
Mondrian XML/A Source
A server-side XML/A source definition of a remote client-side XML/A connection used to populate an OLAP
view using the XML/A standard.
MySQL
An open source relational database management system. For information, visit http://www.mysql.com/.
Navigation Table
The main table in an OLAP view that displays measures and dimensions as columns and rows.
74
Glossary
ODBO Connect
Jaspersoft ODBO Connect enables Microsoft Excel 2003 and 2007 Pivot Tables to work with Jaspersoft OLAP
and other OLAP servers that support the XML/A protocol. After setting up the Jaspersoft ODBO data source,
business analysts can use Excel Pivot Tables as a front-end for OLAP analysis.
OLAP
On Line Analytical Processing. Provides multidimensional views of data that help users analyze current and past
performance and model future scenarios.
OLAP Client Connection
A definition for retrieving data to populate an OLAP view. An OLAP client connection is either a direct Java
connection (Mondrian connection) or an XML-based API connection (XML/A connection).
OLAP Schema
A metadata definition of a multidimensional database. In Jaspersoft OLAP, schemas are stored in the repository
as XML file resources.
OLAP View
Also called an analysis view. A view of multidimensional data that is based on an OLAP client connection and
an MDX query. Unlike Ad Hoc views, you can directly edit an OLAP views MDX query to change the data
and the way they are displayed. An OLAP view is the entry point for advanced analysis users who want to
write their own queries. Compare Ad Hoc View.
Organization
A set of users that share folders and resources in the repository. An organization has its own user accounts, roles,
and root folder in the repository to securely isolate it from other organizations that may be hosted on the same
instance of JasperReports Server.
Organization Admin
Also called the organization administrator. A user in an organization with the privileges to manage the
organizations user accounts and roles, repository permissions, and repository content. An organization admin
can also create suborganizations and mange all of their accounts, roles, and repository objects. The default
organization admin in each organization is the jasperadmin account.
Outlier
A fact that seems incongruous when compared to other members facts. For example, a very low sales figure or a
very high number of helpdesk tickets. Such outliers may indicate a problem (or an important achievement) in
your business. The analysis features of Jaspersoft OLAP excel at revealing outliers.
Parameter
Named values that are passed to the engine at report-filling time to control the data returned or the appearance
and formatting of the report. A report parameter is defined by its name and type. In JasperReports Server,
parameters can be mapped to input controls that users can interact with.
Pivot
To rotate a crosstab such that its row groups become column groups and its column groups become rows. In the
Ad Hoc Editor, pivot a crosstab by clicking
75
Pivot Table
A table with two physical dimensions (for example, X and Y axis) for organizing information containing more
than two logical dimensions (for example, PRODUCT, CUSTOMER, TIME, and LOCATION), such that each
physical dimension is capable of representing one or more logical dimensions, where the values described by
the dimensions are aggregated using a function such as SUM. Pivot tables are used in Jaspersoft OLAP.
Properties
Settings associated with an object. The settings determine certain features of the object, such as its color and
label. Properties are normally editable. In Java, properties can be set in files listing objects and their settings.
Report
In casual usage, report may refer to:
Report Run
An execution of a report, Ad Hoc view, or dashboard, or a view or dashboard designer session, it measures and
limits usage of Freemium instances of JasperReports Server. The executions apply to resources no matter how
they are run (either in the web interface or through the various APIs, such as REST web services). Users of our
Community Project and our full-use commercial licenses are not affected by the limit. For more information,
please contact [email protected].
Repository
The tree structure of folders that contain all saved reports, dashboards, OLAP views, and resources. Users access
the repository through the JasperReports Server web interface or through iReport. Applications can access the
repository through the web service API. Administrators use the import and export utilities to back up the
repository contents.
Resource
In JasperReports Server, anything residing in the repository, such as an image, file, font, data source, Topic,
Domain, report element, saved report, report output, dashboard, or OLAP view. Resources also include the
folders in the repository. Administrators set user and role-based access permissions on repository resources to
establish a security policy.
Role
A security feature of JasperReports Server. Administrators create named roles, assign them to user accounts, and
then set access permissions to repository objects based on those roles. Certain roles also determine what
functionality and menu options are displayed to users in the JasperReports Server interface.
Schema
A logical model that determines how data is stored. For example, the schema in a relational database is a
description of the relationships between tables, views, and indexes. In Jaspersoft OLAP, an OLAP schema is the
logical model of the data that appears in an OLAP view; they are uploaded to the repository as resources. For
Domains, schemas are represented in XML design files.
76
Glossary
Schema Workbench
A graphical tool for easily designing OLAP schemas, data security schemas, and MDX queries. The resulting
cube and query definitions can then be used in Jaspersoft OLAP to perform simple but powerful analysis of
large quantities of multi-dimensional data stored in standard RDBMS systems.
Set
In Domains and Domain Topics, a named collection of items grouped together for ease of use in the Ad Hoc
Editor. A set can be based on the fields in a table or entirely defined by the Domain creator, but all items in a
set must originate in the same join tree. The order of items in a set is preserved.
Slice
An OLAP operation for filtering data rows.
SQL
Structured Query Language. A standard language used to access and manipulate data and schemas in a
relational database.
System Admin
Also called the system administrator. A user who has unlimited access to manage all organizations, users, roles,
repository permissions, and repository objects across the entire JasperReports Server instance. The system admin
can create root-level organizations and manage all server settings. The default system admin is the superuser
account.
Topic
A JRXML file created externally and uploaded to JasperReports Server as a basis for Ad Hoc reports. Topics are
created by business analysts to specify a data source and a list of fields with which business users can create
reports in the Ad Hoc Editor. Topics are stored in the Ad Hoc Components folder of the repository and
displayed when a user launches the Ad Hoc Editor.
Transactional Data
Data that describe measurable aspects of an event, such as a retail transaction, relevant to your business.
Transactional data are often stored in relational databases, with one row for each event and a table column or
field for each measure.
User
Depending on the context:
A person who interacts with JasperReports Server through the web interface. There are generally three
categories of users: administrators who install and configure JasperReports Server, database experts or
business analysts who create data sources and Domains, and business users who create and view reports and
dashboards.
A user account that has an ID and password to enforce authentication. Both people and API calls accessing
the server must provide the ID and password of a valid user account. Roles are assigned to user accounts to
determine access to objects in the repository.
View
Several meanings pertain to JasperReports Server:
77
78
INDEX
CZS 48
access control
authentication 7
authorization 8
data 47
data example 48
Domains 47
profile attributes 48, 52
roles 50
access grants 47
Ad Hoc Editor
testing Domain security 53
administering
Domain security 47
administering JasperReports Server
passwords 38
security settings 11
users 7
attributes 9
authentication. See access control. 7
authorization. See access control. 8
B
business case, CZS 48
C
column-level security 53, 55-57
configuring
Domains 49
cookies 30
data
access control 47
access control example 48
default_master.properties 15
Domains
access control 47
best practices 60
column-level security 53
complex 60
example 49-50
example design file 62
example security file 66
performance 60
principal expressions 59
row-level security 53
security 50-51
tables tab 49
testing security 53, 57-58
Topics based on 61
E
examples
CZS business case 48
Domain design 50, 62
Domain security file 66
Domain tables 49
fields 49
joins 49
79
report 58
roles 50
users 51
external.ldap.password 15
external.ldap.username 15
filters
filter expressions 55
report.scheduler.mail.sender.password 14
reports
example 58
reportSchedulerMailSender 14
roles
Domain security 50
example 50
G
Groovy 55, 60
H
HTTPS only, configuring 29
item groups 60
J
JasperAnalysis. See Jaspersoft OLAP. 5
JasperServer. See administering JasperReports Server. 5
joins 49, 60
js.config.properties 16
js.externalAuth.properties 15
K
keystore 27
L
log4j 52
logging 52
N
new.tenant.user.password.1 16
O
OLAP views 9
P
passwords
expiration 38
users changing 39
PKC12 keystore 27
principal expressions 55, 59
profile attributes
CZS example 48, 55
80
SSL 27, 29
T
testing Domain security 57-58
TLS. See SSL. 27
Topics
Domains and 61
troubleshooting 52
U
users
administering 7
authenticating 7-8
changing passwords 39
example 51
profile attributes 51
Index
session timeout 37
using the Ad Hoc Editor
testing Domain security 53
V
views 9
81
82