SSRS 2016 comes with completely new report manager web interface and implementing form authentication extension for ssrs 2016 is little bit different from the earlier versions. In this article, all the necessary steps will be discussed for successful implementation of the custom security extension.

Compiling the Extension

First download the sample project from here and open it with the visual studio 2012. Unlike in earlier versions, here we implement IAuthenticationExtension2 interface which provides additional GetUserInfo method.

Setup the database by referring /Setup/CreateDatabase.txt and do the necessary changes for DB_HOST and DB_NAME fields in AuthenticationUtilities class. Add a reference to Microsoft.ReportingServices.Interfaces.dll which is located at \ReportServer\bin and try building the solution.

Configuring SSRS

Place the compiled FormAuth.dll to ReportServer/bin directory and Logon.aspx file to the ReportServer directory.

Modify the block in the rsreportserver.config as follows

<Authentication>
<AuthenticationTypes>
<Custom/>
</AuthenticationTypes>
<EnableAuthPersistence>true</EnableAuthPersistence>
<RSWindowsExtendedProtectionLevel>Off</RSWindowsExtendedProtectionLevel>
<RSWindowsExtendedProtectionScenario>Proxy</RSWindowsExtendedProtectionScenario>
</Authentication>

Replace <UI> section with,

<UI>
<CustomAuthenticationUI>
<UseSSL>False</UseSSL>
<PassThroughCookies>
<PassThroughCookie>sqlAuthCookie</PassThroughCookie>
</PassThroughCookies>
</CustomAuthenticationUI>
<ReportServerUrl> <report server url> </ReportServerUrl>
</UI>

Make following changes to the <Security> and <Authentication> sections as well,

<Security>
<Extension Name="Forms" Type="FormAuth.Authorization, FormAuth">
<Configuration>
<AdminConfiguration>
<UserName>admin</UserName>
</AdminConfiguration>
</Configuration>
</Extension>
</Security>
<Authentication>
<Extension Name="Forms" Type="FormAuth.AuthenticationExtension, FormAuth"/>
</Authentication>

Now open the rssrvpolicy.config file and insert following code just after the <CodeGroup></CodeGroup> block with Url=”$CodeGen$/*” attribute.

<CodeGroup class="UnionCodeGroup" version="1" Name="SecurityExtensionCodeGroup" Description="Code group for the sample security extension" PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="<ssrs installation dir>\ReportServer\bin\FormAuth.dll"/>
</CodeGroup>

Please note that Url has to be the absolute path of the DLL.

Open up the web.config file inside ReportServer directory and change

<authentication mode="Windows" />
<identity impersonate="true" />

with

<authentication mode="Forms">
<forms loginUrl="Logon.aspx" name="sqlAuthCookie" timeout="60" path="/"></forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<identity impersonate="false" />

Insert <machineKey/> element inside the <system.web> element.

<machineKey
validationKey=""
decryptionKey=""
validation="AES" decryption="AES" />

You have to update validationKey and decryptionKey attributes properly. following online machine key generator can be used for this.

http://www.a2zmenu.com/utility/machine-key-generator.aspx

Note that validation and decryption algorithm has to be AES.

Now open the Microsoft.ReportingServices.Portal.WebHost.exe.config file inside RSWebApp directory. Create a <system.web></system.web>inside the and place the same machine key element, which you have used in ReportServer/web.config file,within the <system.web></system.web>

Finally restart the reporting service.

ssrs2016-form-authentication.

Attachment source for anonymous access, tested in SSRS 2016

SSRS 2016 Forms Authentication的更多相关文章

  1. Nancy之Forms authentication的简单使用

    一.前言 想必大家或多或少都听过微软推出的ASP.NET Identity技术,可以简单的认为就是一种授权的实现 很巧的是,Nancy中也有与之相类似的技术Authentication,这两者之间都用 ...

  2. Nancy 学习-身份认证(Forms authentication) 继续跨平台

    开源 示例代码:https://github.com/linezero/NancyDemo 上篇讲解Nancy的Basic Authentication,现在来学习Nancy 的Forms身份认证. ...

  3. ASP.NET 4.0 forms authentication issues with IE11

    As I mentioned earlier, solutions that rely on User-Agent sniffing may break, when a new browser or ...

  4. Forms Authentication in ASP.NET MVC 4

    原文:Forms Authentication in ASP.NET MVC 4 Contents: Introduction Implement a custom membership provid ...

  5. Forms Authentication and Role based Authorization: A Quicker, Simpler, and Correct Approach

    https://www.codeproject.com/Articles/36836/Forms-Authentication-and-Role-based-Authorization Problem ...

  6. An Overview of Forms Authentication (C#)

    https://docs.microsoft.com/en-us/aspnet/web-forms/overview/older-versions-security/introduction/an-o ...

  7. .net core 共享 .Net Forms Authentication cookie

    Asp.net 项目迁移到 asp.net core 项目后需要 兼容以前老的项目的登录方式. Forms Authentication cookie 登录. 从网上搜集到关于这个问题的解决思路都没有 ...

  8. ASP.NET Session and Forms Authentication and Session Fixation

    https://peterwong.net/blog/asp-net-session-and-forms-authentication/ The title can be misleading, be ...

  9. Use Power bi Mobile Show SSRS 2016 Mobile Report;使用 Power BI Mobile 查阅ssrs2016 mobile report

    使用 power bi mobile 查阅 ssrs 2016 mobile report 很简单,以下是IOS客户端的演示. 系统自带了演示数据,包含power bi 的和 ssrs mobile ...

随机推荐

  1. jaxa技术2

    XStream 1. 什么作用  * 可以把JavaBean转换为(序列化为)xml 2. XStream的jar包  * 核心JAR包:xstream-1.4.7.jar:  * 必须依赖包:xpp ...

  2. javascript权威指南第17章 错误异常处理

    function TestTryCatch(){ try { } catch (error) { //error 类型如下 Error EvalError RangeError ReferenceEr ...

  3. 洛谷 P2119 魔法阵 题解

    Analysis 这道题也是考试题,我也依然打了个n三次方暴力.正解是先枚举差,再枚举c和d,a和b用乘法原理优化,这样就能大大减少时间. #include<iostream> #incl ...

  4. LibreOJ #6. Guess Number

    二次联通门 : LibreOJ #6. Guess Number /* LibreOJ #6. Guess Number 交互题初体验 用了二分判定 感觉不错 */ #include "in ...

  5. linux系列(三):pwd命令

    1.命令格式: pwd [选项] 2.命令功能 查看”当前工作目录“的完整路径 3.常用参数 -L:显示当前路径,有连接文件时,直接显示连接文件的路径(不加参数时默认此方式) -P:显示当前的路径,有 ...

  6. P1021 邮票面值设计——搜索+完全背包

    P1021 邮票面值设计 题目意思是你最多用n张邮票,你可以自己设定k种邮票的面值,每种邮票数量无穷,你最多能用这k种邮票在不超过n张的情况下,组合成的价值要求是从1开始连续的, 求最大能连续到多少: ...

  7. 提高十连测day3

    提高十连测day3 A 我们可以枚举两个 $ 1 $ 之间的相隔距离,然后计算形如 $ 00100100 \cdots $ 的串在原串中最⻓⼦序列匹配即可,复杂度 $ O(n^2) $ .寻找 $ S ...

  8. ansible 错误记录(1)

    基本环境:docker基于centos7 在docker里面安装ansible 不管是在root还是普通用户下执行 ansible all -m ping  都报如下错误: 172.20.1.1 | ...

  9. (转)centos7安装telnet服务

    借鉴:https://www.cnblogs.com/daipenglin/p/4934572.html 阅读目录 1 CentOS7.0 telnet-server 启动的问题 场景:在进行Teln ...

  10. openstack 基镜像展开过程