0

We're looking to have a RaspberryPi run in kiosk mode and automatically pull up a report on our SSRS portal without any user interaction.

I'm hoping I can allow anonymous access to this specific report and keep Active Directory authentication in place for our other reports/folders.

I've added "NT AUTHORITY\ANONYMOUS LOGON" to the report security without any luck.

Is what I'm looking to do possible?

We're running MSSQL 2019.

1

2 Answers 2

1

Updating as someone asked me to post as answer.

I found a work around. This isn't Anonymous Authentication, but uses HTTP Basic Authentication to pass Windows Credentials to SSRS

This is the guide I used: https://tickett.wordpress.com/2014/12/03/anonymous-authentication-sql-server-reporting-services/?unapproved=9854&moderation-hash=4bf90332f3468fc8b78f6b84e1e63d6d#comment-9854

I found I had to use this tool instead of the one they suggested (http://www.swingnote.com/tools/texttohex.php) and used "Hex Encoded for URL"

In case that website isn't accessible, here's a step by step process outlined in the original article.

Create this file below to put at the root of your SSRS web server or another IIS server at this location:C:\inetpub\wwwroot. Give it a unique name so you can remember the URL and save it as a .html file (let's call it your_report.html for this example.) Make sure to read the comments in the code

<html>
  <head>
   <script>

// use this website to convert a user account and password to view reports into hex (https://www.swingnote.com/tools/texttohex.php)
// Do not use your domain as the prefix, just an AD user name. Best practice would be to create an account that only has read privileges to this report only 
// use hex encoded for URL for this
//       First section is the username     |   Second section is the password

var _0x1751=["\x61\x66","\x76\x76"];

function getHTTPObject() {
    if (typeof XMLHttpRequest != 'undefined') {
        return new XMLHttpRequest();
    }
    try {
        return new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try {
            return new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {}
    }
    return false;
}   

function runReport() {
  var http = getHTTPObject();


// Here is the section for the report you want to use
  var url= "http://<your_report_server>/ReportServer/Pages/ReportViewer.aspx?<report_name>&rs:Command=Render";
  http.onreadystatechange = function() {
    if (http.readyState == 4) {
      if (http.status == 401) {
        runReport(); 
      }
      if (http.status == 200) {
        document.location = url;
      }
    }
  };
  http.open("get", url, true, _0x1751[0x0], _0x1751[0x1]);
  http.send(null);
  return false;
}
    </script>
  </head>
  <body onload="runReport();">
  </body>
</html>

After the file is saved to C:\inetpub\wwwroot, test it by going to your report server (http://<report_server_name>/your_report.html)

2
  • Im a bit confused this did not work for me. Do i need to install IIS? I have ssrs installed but i dont see a c:\inetpub folder did you manually create that? Do i need to install windows iis feature on the ssrs report server?
    – JonH
    Commented May 19, 2022 at 2:33
  • Jon, yeah you might need to setup IIS if it isn't already installed.
    – jdids
    Commented May 25, 2022 at 18:36
-1

The most helpful article I've found to accomplish what you're requesting is Setting up Anonymous Access for Reporting Services in SQL Server 2008 R2 by Swarndeep Singh:

  • Change the authentication mode in rsreportserver.config to Custom
  • Change the Authentication mode in web.config file in ReportServer to None. Also change the Impersonation to false.
  • Compile the code from this location to bin folder as Microsoft.Samples.ReportingServices.AnonymousSecurity.dll Or copy it from this location and paste it to bin folder in ReportServer.
  • Add Extensions in rsreportserver.config
  • Add the additional extension in Security Tag
  • Add the following codegroup to configure the code access security in rssrvpolicy.config
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="Private_assembly"
Description="This code group grants custom code full trust. ">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll"
/>
</CodeGroup>

Restart the reporting services, Anonymous Access should work.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.