.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

How do you register a custom Social Security Trimmer?

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :SharePoint
 

I am investigating implementing a custom social security trimmer using the ISocialSecurityTrimmer interface. Is there a Powershell cmdlet to register a social security trimmer? Equivalent to New-SPEnterpriseSearchSecurityTrimmer for Search security trimmers.

The only alternative way I have found is to use PluggableSocialSecurityTrimmerManager to register. http://msdn.microsoft.com/en-us/library/microsoft.office.server.socialdata.pluggablesocialsecuritytrimmermanager.registerpluggablesecuritytrimmer.aspx.

Any pointers would be great appreciated if you have successfully implemented a custom social security trimmer.


Thanks!




View Complete Post


More Related Resource Links

Passing values from web page to custom security trimmer in SharePoint 2010

  
Hi, In SharePoint 2007 we had a custom security trimmer that implemented ISecurityTrimmer interface. We also had a custom webpart used for search. Now, using HttpContext we passed values from the webpart to security trimmer with additional info needed to trim the results. It worked since trimmer was executed in the same w3wp process as webpart. Now in SharePoint 2010, the architecture for ISecurityTrimmer2 has changed, as it's executed in search process (other w3wp) - not the webpart w3wp so it has no access to the HttpContext. Question is: how to pass custom data, in form of the string, to a security trimmer when search is done from custom code in webart?

current user identity in custom security trimmer

  
The crux of my problem is that I want to impersonate  a user’s NTLM credentials in the context of a SharePoint custom security trimmer to execute HttpWebRequests to check user access to URLs.  When accessing WindowsIdentity.GetCurent() in the security trimmer, the System.Security.Principal.WindowsIdentity object returns the identity of the application pool running the search query service, NOT the currently logged in user.   When accessing System.Threading.Thread.CurrentPrinciple.Identity in the security trimmer, the Microsoft.IdentityModel.Claims.ClaimsIdentity object of the current logged in user is returned.  However, there is a catch.  …   If I execute the following code in a .NET web application, the cast of the ClaimsIdentity to a WindowsIdentity succeeds because the identity has the authentication type of NTLM.    WindowsIdentity winId = (WindowsIdentity)System.Threading.Thread.CurrentPrincipal.Identity; WindowsImpersonationContext wic = winId.Impersonate(); request.Credentials = CredentialCache.DefaultCredentials; //access means a response comes back when a request is made to the url using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { returnStatus = true; } wic.Undo(); However, when I execute the same code in the context of the SharePoint security trimmer (the search query service li

current user identity in custom security trimmer

  

The crux of my problem is that I want to impersonate  a user’s NTLM credentials in the context of a SharePoint custom security trimmer to execute HttpWebRequests to check user access to URLs. 

When accessing WindowsIdentity.GetCurent() in the security trimmer, the System.Security.Principal.WindowsIdentity object returns the identity of the application pool running the search query service, NOT the currently logged in user.  

When accessing System.Threading.Thread.CurrentPrinciple.Identity in the security trimmer, the Microsoft.IdentityModel.Claims.ClaimsIdentity object of the current logged in user is returned.  However, there is a catch.

 …

 

If I execute the following code in a .NET web application, the cast of the ClaimsIdentity to a WindowsIdentity succeeds because the identity has the authentication type of NTLM. 

 

WindowsIdentity winId = (WindowsIdentity)System.Threading.Thread.CurrentPrincipal.Identity;
WindowsImpersonationContext wic = winId.Impersonate();
request.Credentials = CredentialCache.DefaultCredentials;

//access means a response comes back when a request is made to the url

Need help setting up a Custom Security Trimmer, CheckAccess method not working.

  

I'm implementing the custom security trimmer for SharePoint server as outlined here: http://msdn.microsoft.com/en-us/library/ee819923.aspx

I have been able to successfully deploy the solution on to the server, but know I need to write the script that will check whether users have access to particular documents or not. The code in the walk-through is the following:

public BitArray CheckAccess(IList<String> documentCrawlUrls, IDictionary<String, Object> sessionProperties, IIdentity passedUserIdentity)
        {
            BitArray retArray = new BitArray(documentCrawlUrls.Count);
            //Use passedUserIdentity to get the identity of the user who issued the query.
            IClaimsIdentity claimsIdentity = (IClaimsIdentity)passedUserIdentity;
           //IClaimsIdentity is defined in Microsoft.IdentityModel.Claims;
            for (int x = 0; x < documentCrawlUrls.Count; x++)
            {
              /*
     

Geneva Framework: Building A Custom Security Token Service

  

A Security Token Service, or STS, acts as a security gateway to authenticate callers and issue security tokens carrying claims that describe the caller. See how you can build a custom STS with the "Geneva" Framework.

Michele Leroux Bustamante

MSDN Magazine January 2009


Desktop Security: Create Custom Login Experiences With Credential Providers For Windows Vista

  

Why is a change to the Windows logon plug-in interface so exciting? Because with credential providers you can customize the logon experience for your users.

Dan Griffin

MSDN Magazine January 2007


security trimmer with BDC

  
hi,

I have a bdc application based on web service.
I have implemented a security trimmer according to the msdn guide : http://msdn.microsoft.com/en-us/library/bb447548.aspx.
I have created a new BDC content source and successfully made a full crawl.

This is an example of a url in the crawl log : http://gilklws2003:35229/ssp/admin/content/enoviaobject.aspx?tnr=[architecture][a2][1]

In the security trimmer method  "BitArray CheckAccess(IList<string> documentCrawlUrls, IDictionary<string, object> sessionProperties)" i get some unknown urls, for example :

bdc2://814bb38f-1ded-4d41-b42b-d7dd39c7414a/6153/6193?id=__bk8400b5000500160027004700d500b5001300230033004300530063007300d500b5001400d500
bdc2://814bb38f-1ded-4d41-b42b-d7dd39c7414a/6153/6193?id=__bk0800b500340014004400020044002700160077009600e6007600d500b500230013002300230013006300530

Custom security via connection string

  
Hi Is it possible to pass information into the SQL Server relational engine via the connection string in the same way as it can be done for Analysis Services? I need to generate a user context for a forms authentication application (i.e. no windows user accounts). SSAS allows you to pass in a list of database roles or a customdata parameter on the connection string. These can be used inside the database in lieu of a windows identity. I am wondering if there are equivalent parameters available for the SQL connection string.  I guess that I could create SQL logins from each of the forms users with a system generated password and then pass the uid and password on the connection string but this seems unnecessarily complicated. Andrew Wiles - www.it-workplace.com - MDX made simple

Custom Code Security Setting

  
I am using custom code in couple of my SSRS reports. I can view the output on report manager, but in my BI development studio it shows me an error "An error occured during local report processing". I tried all the possible options to resolve the issue. I am adding the references of the assemblies System.Data and System.XML. Also i referred the article http://support.microsoft.com/kb/842419/en-us and tried all the steps to modify the code access security for custom assembly. I am clueless as in what to do next. Thanks, Chaitali

SSRS custom security extension behind a router fire wall not working

  
I have a instance of SSRS 2008 installed (we are not using IIS) with custom security extension which accepts a application user ID and password and sends back a sql authorization cookie back to client for logging into SSRS.  The (SSRS) server is behind a router,  SSRS is configured on port 81,  Port 81 in router if forwarded to the SSRS server. Here is the problem If I am inside the router firewall (RDP'ed to the machine) I am able to access report server (http://xx.xxx.xxx.xx:81/ReportServer) and reports manager (http://xx.xxx.xxx.xx:81/Reports) without any issues. If  am outside the firewall and try to go to report server page (http://xx.xxx.xxx.xx:81/ReportServer) from browser and try to login it works (I am getting the cookie back and authentication goes through fine).   But if I try to access reports manager (http://xx.xxx.xxx.xx:81/Reports) the login page shows up when I enter user ID and password and hit enter to authenticate it comes back to the login screen (I am not gettint the cookie back from SSRS). Any help is highly appreciated on how to debug /fix this issue. Note : if I first login to Reportserver (which sends the cookie back) and in the same session I login to Reports Manager I am able to get into Reports Manager page since I got the cookie when I logged in to reports server page already.  When I

How to create custom security groups to control different custom activities?

  

Hi,

How to create  custom security groups to control different  custom activities?

Thanks and Regards,

Swati Jain


Security exception in custom program

  

I have a custom ASP.NET application which is hosted in the SharePoint _layouts directory.  The code uses the object model to do certain actions on a SharePoint list.  I'm receiving the following error when trying to perform those actions in the code:

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Access denied.

Source Error:

[No relevant source lines]

Source File: c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\_layouts_ams\17ffcf63\ab8d1e9e\App_Web_createrequest.aspx.cdcab7d2.tyy2bvfv.0.cs    Line: 0

Stack Trace:

[SecurityException: Access denied.]
  Microsoft.ShareP

unable to register a custom timer job in Moss

  

Hi all,

 

I was unable to register a custom timer job in Moss 2007 using both the web interface via feature activation event as well as through code by taking the instance of the timer job class in a custom web part where i manage the custom timer jobs.

 

The same above case was working fine in a different environment.Could you please help by listing out the reasons/solutions/work around.

 

This is very critical and urgent as i was deploying the same in production.Thanks in advance.

 


 

 


Thanks keshav,Share point Developer

BCS Method Security / External Content Type Permissions / Custom List Security Provider / Security T

  

I have an external list setup with the usual CRUD methods.  The external SQL table is also being populated by another source.  I want to enable/disable deleting depending on whether the record was created from SharePoint.  I would also like the normal list permissions to work.  So if a user has permissions to delete on the list, they can only delete items created for SharePoint. 

Where should this logic be incorporated?  On the BCS Delete method, somewhere in the External Content Type or on the list instance?  Most examples I find relate to security trimming for search.  I'm only concerned about the delete method.

I'm sure there are multiple ways to accomplish this.  Which is the best?

Thanks,
Ryan


cannot register custom edit form through a content type and deploy it as a feature

  

custom edit form through a content type and deploy it as a feature.. the RTM version of sharepoint 2010 does not register the custom forms. the elements.xml is pretty straight forward..

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
 <!-- Parent ContentType: Workflow Task (0x010801) -->
 <ContentType ID="0x010801007fc29cb23c2049c3985ccdb95fc8331f" Name="ReviewTask" Group="Content Types" Description="Review workflows task purpose" Inherits="TRUE" Version="0">
  <FieldRefs>
   <FieldRef ID="{2C2BE3C6-0EB6-4F53-B612-CF49A7EF4013}" Name="Review Status" />
   <FieldRef ID="{CE1D0566-DDC6-4AA3-80C2-6CEA892F105E}" Name="Review Date" />
   <FieldRef ID="{07CB9AA2-0102-4741-9F9A-AC4A7D62D769}" Name="Review Comments" />
  </FieldRefs>
  <XmlDocuments>
   <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
    <FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
     <New>_layouts/My/ReviewTaskEditForm/TaskEditForm.aspx</New>
     <Display>_layouts/My/ReviewTaskEditForm/TaskEditForm.asp

how to distinct values of sharepoint custom list using SSRS (new from http://social.msdn.microsoft.c

  

i hope jin chen would read this.

i followed his instruction from the link above(in the title)

i still got an error message :

System.Web.Services.Protocols.SoapException: An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC42105] Function 'RemoveDups' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used.’.
   at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.SetReportDefinition(String Report, Byte[] Definition, Warning[]& Warnings)
   at Microsoft.ReportingServices.WebServer.ReportingService2010Impl.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
   at Microsoft.ReportingServices.WebServer.ReportingService2010.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties, Warning[]& Warnings)

could anybody tell me what's wrong?

and by the way,

i'm using ssrs 2008 r2

i use report builder(content type) to create reports from sharepoint lists.

thx in advance.

 

-willy-


Asp.net security problem for Captcha custom control

  

Hi, I downloaded the source code and followed the instruction to include a captcha control in my asp.net site's from:http://www.mondor.org/captcha.aspx  in my create user control. It was working well but when I implemented Asp.net role base sitemap, This security perventing me showing this captha image. Based on provided security all other portion of the 'create user control' is showing except the captcha image.

One solution is the create a separate folder for this page and ont include a web.config for authorization any other solution so that I keep the page in it's place.


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend