SailPoint IdentityIQ 8.2 - Return a list of users who have any entitlement(group) in a predetermined list of entitlements - amazon-iam

I'm working in an environment where IdentityIQ 8.2 is deployed for access management.
I am attempting to return a list of users, based on if they have any one of the entitlements in the provided "whitelist". (i.e. "Show me any user who has entitlement1 or entitlement2 or entitlement3")
I tried to use the Advanced Analytics search function. This does allow you to search for identities based on entitlement, but it function in an "Exclusive AND" logic style where only users who have every single entitlement on your "whitelist" will be returned. I haven't found a way to change this. The Advanced Search type doesn't support searching by entitlement, from what I can tell.
Is there an out of the box way to accomplish this?

You can create the entitlement search with AND and save the result as a Population. You can then change operation="AND" to operation="OR" using the Debug pages.
Example how to search for users who have either of these two AD group memberships (this is a Population saved from Advanced Analytics):
<GroupDefinition indexed="true" name="x" private="true">
<GroupFilter>
<CompositeFilter operation="AND">
<Filter operation="COLLECTION_CONDITION" property="identityEntitlements">
<CollectionCondition>
<CompositeFilter operation="OR">
<CompositeFilter operation="AND">
<Filter operation="EQ" property="application.name" value="AD"/>
<Filter operation="EQ" property="name" value="memberOf"/>
<Filter operation="EQ" property="value" value="{e4ca3ebf-543e-4f19-aa6d-60ebee9968a7}"/>
</CompositeFilter>
<CompositeFilter operation="AND">
<Filter operation="EQ" property="application.name" value="AD"/>
<Filter operation="EQ" property="name" value="memberOf"/>
<Filter operation="EQ" property="value" value="{b263fcce-26e5-4fc8-9ed3-012df6b4c262}"/>
</CompositeFilter>
</CompositeFilter>
</CollectionCondition>
</Filter>
</CompositeFilter>
</GroupFilter>
<Owner>
<Reference class="sailpoint.object.Identity" name="spadmin"/>
</Owner>
</GroupDefinition>

Related

SolrJ how to change field type of a field defined by annotation?

I followed Solr guide created a class and used #Field annotation in front of the class attributes.
public class MyDocument {
#Field
public String fra_contents;
... // Other fields
//NO getters and setters as shown https://lucene.apache.org/solr/guide/7_2/using-solrj.html#java-object-binding
}
Looking at the generated "managed-schema.xml" shows that "fra_contents" is of type "text_general" :
<field name="fra_contents" type="text_general"/>
Yet I need to apply a different tokenizer, and different filters to this field than the ones associated with "text_general". So I created a fieldtype programmatically (following based on Solr testing code) called "fra_contents_type" :
<fieldType name="fra_contents_type" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.ClassicTokenizerFactory"/>
<filter class="solr.KeywordRepeatFilterFactory"/>
<filter class="solr.SynonymGraphFilterFactory" synonyms="lang/fra.txt"/>
<filter class="solr.FlattenGraphFilterFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.ElisionFilterFactory" articles="lang/contractions_fr.txt"/>
<filter class="solr.SnowballPorterFilterFactory" language="French"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.ClassicTokenizerFactory"/>
<filter class="solr.KeywordRepeatFilterFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.ElisionFilterFactory" articles="lang/contractions_fr.txt"/>
<filter class="solr.SnowballPorterFilterFactory" language="French"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
This other SO question explains how the fieldtype is set based on the java variable type, but does not tell how to change this defauld fieldtype.
So how can I change the fieldtype of this field programmatically while keeping the annotation (ie without editing the "managed-schema.xml") ?
Any help appreciated,
So here is what I found which works a posteriori and not a priori using the Schema API.
// First retrieves the original field attributes
SchemaRequest.Field originalField = new SchemaRequest.Field(fieldName);
Map<String, Object> updatedFieldAttributes = originalField.process(
getSolrClient()).getField();
// Modifies the original attributes
updatedFieldAttributes.put("type",
fieldTypeName);
// Updates the field type of the field
SchemaRequest.ReplaceField replaceFieldRequest = new
SchemaRequest.ReplaceField(updatedFieldAttributes);
// Processes the requests
List<SchemaRequest.Update> list = new ArrayList<>(3);
list.add(addFieldTypeRequest);
list.add(replaceFieldRequest);
SchemaRequest.MultiUpdate multiUpdateRequest = new SchemaRequest.MultiUpdate(
list);
SchemaResponse.UpdateResponse multipleUpdatesResponse = multiUpdateRequest.process(
getSolrClient());
There may be a cleaner way (aka "one liner" ;-) ) to do it!

Logback filter by regular expression not working

I am trying to get regex-based filtering to work with logback but fail to do so. Based on the example on the logback website, here's the respective part of my logback config but all log messages seem to be filtered out by it:
<appender name="__CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>[%-5level|%d{HH:mm:ss}] %logger{15} %msg [%thread] %n</pattern>
</encoder>
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator>
<matcher>
<Name>custom</Name>
<regex>.*foobar.*</regex>
</matcher>
<expression>custom.matches(formattedMessage)</expression>
</evaluator>
<OnMismatch>DENY</OnMismatch>
<OnMatch>NEUTRAL</OnMatch>
</filter>
</appender>
When I comment out the filter part, log statements matching the regex are displayed. I must be missing something obvious.
Sorry for the noise. The runtime-dependency to janino was simply missing in my setup (see How do I not log a particular type of Exception in Logback?).

Getting rid of plaintext hyperlinks before indexing a record in Solr

I have a field, whose content is used to generate facets from. One particular problem I'd like to solve is the fact that some of my content contains hyperlinks in plaintext i.e http://google.com. As a result, I started seeing http as one of my top facets. How can I make sure that I filter out the hyperlink content, before I index it? Using a regex filter of some sort?
I know that I can do this pre-processing part on the client side, when I add the records to Solr. Yet, I'd like to keep everything consistent, and part of the Solr pipeline, so I'd like the Solr pre-processor to do this for me if possible.
I would solve it with these components:
The solr.UAX29URLEmailTokenizer preserves the URL as a token
The solr.PatternReplaceFilterFactory replaces the URL token with an empty string (search Stack Overflow for a suitable regex pattern)
A solr.LengthFilterFactory filters the zero-length token
In schema.xml:
<analyzer type="index">
<tokenizer class="solr.UAX29URLEmailTokenizerFactory" />
<filter class="solr.PatternReplaceFilterFactory" pattern="..." replacement="" />
<filter class="solr.LengthFilterFactory" min="1" max="1000" />
</analyzer>
Note that changing the tokenizer from the solr.StandardTokenizerFactory may have implications beyond what is described in this answer, so be sure to test.

How to pass parameters to XSLT from JBoss Actions Pipeline

Say I have a given action:
<service category="MyService" name="MyFirstService">
<actions mep="RequestResponse">
<action class="actions.CXFListenerAction" name="CXFServiceListener"/>
<action class="org.jboss.soa.esb.actions.transformation.xslt.XsltAction" name="Transform XML">
<property name="templateFile" value="/stylesheets/transform_response.xslt"/>
<property name="failOnWarning" value="true"/>
</action>
</actions>
I am trying to figure out how to add a property name or parameter that I could then access from within the XSLT. I've tried add additional property names,
<property name="param1" value="Hey!"/>
but I'm not 100% sure if this is correct for adding parameters accessible by the XSLT.
Thanks.
The properties defined for the XsltAction class are properties specific to that action class and are not related to parameters in the template file.
So in short, it's not possible to pass parameters to the xslt from the JBoss ESB action pipeline. However, it would be possible to create a custom action that decorates your ESB message with data you define as a property in your jboss-esb.xml file and insert that before your XsltAction. That may be what you're looking for.

MOSS: Creating site templates from publishing sites

On my MOSS site I am trying to save a publishing site as a site template. Then create subsites from this template.
I am able to sucessfully create the site template and it is populated in the site template gallery. Following these instructions.. http://blah.winsmarts.com/2007-7-All_you_ever_wanted_to_know_about_SharePoint_2007_Site_Templates.aspx
But when I try and create a subsite from this template, an error message is displayed stating:
The template you have chosen is invalid or cannot be found. at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
When I save the site template as a .stp file then rename to a .cab and extract and view the manifest.xml, I see that the TemplateID = 39. Is this conflicting with the
the CMSPublishing template which has the same ID?
If so how do I change the ID and repackage the cab file?
--Edit-- I tried changing the ID from 39 to a 327 and repacking the cab and uploading though the site template does appear as an option when creating subsites.... So it does not matter if multiple templates have the same templateID.
Many Thanks,
Nav
After looking at the sharepoint diagnostic logs i found that features were being applied from the template that were failing.
Comparing web features to the list of sharepoint listed web and site features i deleted the ones not in the list in particular those features which were failing to be applied from the logs.
Rebuilt the cab file outputted to stp file using the cabarc N command below:
http://billwg.blogspot.com/2009/04/how-to-modify-project-portal-site.html
Then the publishing template was successfully applied, notice you will have to turn the publishing feature back on once the site is created.
Below is an extract of the webfeatures taken from the manifest.xml from the stp after extracting to a cab file
<WebFeatures>
<Feature ID="e8734bb6-be8e-48a1-b036-5a40ff0b8a81"/>
<Feature ID="56dd7fe7-a155-4283-b5e6-6147560601ee"/>
<Feature ID="0be49fe9-9bc9-409d-abf9-702753bd878d"/>
<Feature ID="99fe402e-89a0-45aa-9163-85342e865dc8"/>
<Feature ID="541f5f57-c847-4e16-b59a-b31e90e6f9ea">
<Properties>
<Property Key="InheritGlobalNavigation" Value="true"/>
<Property Key="ShowSiblings" Value="true"/>
<Property Key="IncludeSubSites" Value="true"/>
</Properties>
</Feature>
</WebFeatures>