Long time no blogging. Gotta change that.
Here's a quick and useful tip for those wanting to set up row level securing in Pentaho using mondrian
Dynamic Schema Processors.
Mondian Dynamic Schema Processors
DSPs are a very common way to add dynamic roles to mondrian. In a
nutshell (cause I won't explain here all the stuff behind it), when you
add security to mondrian, you have to specify a set of
Roles in the mondrian.xml file.
However, there are times where we can't have all the roles on the schema
file. That's where DSPs come into play. Here's basically how they work:
|
Picture that I shamelessly stole from David Fombella |
So in essence, a DSP is just a post processor that takes the original
mondrian schema and outputs the final modrian schema. How that DSP is
written depends on the developer, but it's usually a java snippet.
Example here.
Using it from CDA
So once we get it working we will surely want to take advantage of the
Ctools to use the DSP datasource. And CDA needs the DSP to be explicitly
defined in the schema properties. Here's how we add it:
Pentaho User Console => Manage Data Sources => Select Analysis Schema => Edit
And add 2 settings:
- DynamicSchemaProcessor: com.yourcompany.yourclassDSP
- UseContentChecksum: true
So we get into something like:
|
Manage datasources screen |
From that point on, you're all set. Your queries will take advantage of that DSP.
Cheers
-pedro