Subscription delivery failure in SSRS with custom security extension

I designed a special security extension to have one sign from our intranet product to reporting services. It works like a charm until I come to a subscription.

I liked the development here: http://msdn.microsoft.com/en-us/library/ms155029.aspx

Log in, download and manage reports. Each user can read and open reports. We have also implemented authorization and overwritten the functions described here: http://msdn.microsoft.com/en-us/library/ms152800.aspx

Folder management, reports also work.

When I announce a subscription to a report for delivery by email, the system declares that the user does not have sufficient rights to send the report by email.

notification!WindowsService_0!1674!10/09/2013-14:02:04:: i INFO: Handling subscription f70f374e-28fa-4ba2-8b0e-6633f1299ee9 to report Projekt Aufwand, owner: rausch, delivery extension: Report Server Email.
library!WindowsService_0!1674!10/09/2013-14:02:04:: i INFO: RenderForNewSession('/Projektverwaltung/Projekt Aufwand')
library!WindowsService_0!1674!10/09/2013-14:02:04:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: , Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: Die dem Benutzer 'rausch' erteilten Berechtigungen reichen zum Ausführen des Vorgangs nicht aus.;
library!WindowsService_0!1674!10/09/2013-14:02:04:: i INFO: Initializing EnableExecutionLogging to 'True'  as specified in Server system properties.
emailextension!WindowsService_0!1674!10/09/2013-14:02:04:: e ERROR: Error sending email. Exception: Microsoft.ReportingServices.Diagnostics.Utilities.RSException: Die dem Benutzer 'rausch' erteilten Berechtigungen reichen zum Ausführen des Vorgangs nicht aus. ---> Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: Die dem Benutzer 'rausch' erteilten Berechtigungen reichen zum Ausführen des Vorgangs nicht aus.
notification!WindowsService_0!1674!10/09/2013-14:02:04:: i INFO: Notification 6241f7f4-6225-44ea-b8ff-3654960ae218 completed.  Success: True, Status: Fehler beim Senden von E-Mail: Die dem Benutzer 'rausch' erteilten Berechtigungen reichen zum Ausführen des Vorgangs nicht aus.E-Mails werden nicht erneut gesendet., DeliveryExtension: Report Server Email, Report: Projekt Aufwand, Attempt 0

:. subscriptions ReportServer OwnerId UserId userId . .

- , /, ? CheckAccess?

:

  m_RptOperNames.Add(ReportOperation.CreateSubscription,
      OperationNames.OperCreateSubscription);
  m_RptOperNames.Add(ReportOperation.DeleteSubscription,
      OperationNames.OperDeleteSubscription);
  m_RptOperNames.Add(ReportOperation.ReadSubscription,
      OperationNames.OperReadSubscription);
  m_RptOperNames.Add(ReportOperation.UpdateSubscription,
      OperationNames.OperUpdateSubscription);
  m_RptOperNames.Add(ReportOperation.CreateAnySubscription,
      OperationNames.OperCreateAnySubscription);
  m_RptOperNames.Add(ReportOperation.DeleteAnySubscription,
      OperationNames.OperDeleteAnySubscription);
  m_RptOperNames.Add(ReportOperation.ReadAnySubscription,
      OperationNames.OperReadAnySubscription);
  m_RptOperNames.Add(ReportOperation.UpdateAnySubscription,
      OperationNames.OperUpdateAnySubscription);

# : https://docs.google.com/file/d/0B02JCr49NYlUeDFVbWt2NVdpUmc/edit?usp=sharing

, . ?

: http://msdn.microsoft.com/en-us/library/bb283182.aspx - , ? , .

UPDATE

, :). Microsoft.ReportingServices.Library.TimedSubscriptionHandler, WindowsService.

, CustomSecurity! , . , . , .

, - SSRS/.NET , .

: OwnerId .

CREATE TRIGGER Subscription_overwrite_owner
   ON  dbo.Subscriptions
   AFTER INSERT, UPDATE
AS 
BEGIN
    -- replace the OwnerId with the uid from the admin account
    -- so the TimedSubscription runs with correct credentials
    UPDATE dbo.Subscriptions SET OwnerID = 'uuid admin from Users table'
END
GO
+4
1

, - , , , , . , , ...

.

!

  • CustomSecurity
  • , , attachemnts (, ).
  • , Administrator rsreportserver.config(<Security><Configuration>, SetConfiguration.
  • , web.config!

web.config!

. , ...

, CustomSecurity Sample , -!

ReportServicesService.exe web.config!

CheckAccess() , web.config , . , .

, web.config rsreportserver.config.

web.config /bin/ReportingServicesService.exe.config.

, :

<configuration>
  <configSections>
    <section name="RStrace" type="Microsoft.ReportingServices.Diagnostics.RSTraceSectionHandler,Microsoft.ReportingServices.Diagnostics" />
    <!-- custom authentication start -->
    <section name="CustomSecurity" requirePermission="false" />
    <!-- custom authentication end -->
  </configSections>
  <!-- custom authentication start -->
  <appSettings>
    <add key="log" value="d:\log"/>
    <add key="multi_company" value="true"/>
    <add key="default_domain" value="fqdn.domain.de"/>
    <add key="connection" value="database=ReportServer;server=(local);uid=sa;pwd=secret;" />
  </appSettings>
  <!-- custom authentication end -->

, , ...

, , SSRS.

+2

All Articles