SSRS 2016 Forms Authentication
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的更多相关文章
- Nancy之Forms authentication的简单使用
一.前言 想必大家或多或少都听过微软推出的ASP.NET Identity技术,可以简单的认为就是一种授权的实现 很巧的是,Nancy中也有与之相类似的技术Authentication,这两者之间都用 ...
- Nancy 学习-身份认证(Forms authentication) 继续跨平台
开源 示例代码:https://github.com/linezero/NancyDemo 上篇讲解Nancy的Basic Authentication,现在来学习Nancy 的Forms身份认证. ...
- 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 ...
- Forms Authentication in ASP.NET MVC 4
原文:Forms Authentication in ASP.NET MVC 4 Contents: Introduction Implement a custom membership provid ...
- 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 ...
- An Overview of Forms Authentication (C#)
https://docs.microsoft.com/en-us/aspnet/web-forms/overview/older-versions-security/introduction/an-o ...
- .net core 共享 .Net Forms Authentication cookie
Asp.net 项目迁移到 asp.net core 项目后需要 兼容以前老的项目的登录方式. Forms Authentication cookie 登录. 从网上搜集到关于这个问题的解决思路都没有 ...
- 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 ...
- 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 ...
随机推荐
- Tornado之Session实现
Tornado框架中,默认执行Handler的get/post等方法之前默认会执行 initialize方法,所以可以通过自定义的方式使得所有请求在处理前执行操作 import tornado.iol ...
- TCP服务端实现并发
socket 在 tcp 协议下通信 客户端 import socket # 创建客户端TCP协议通信 c = socket.socket() # 与指定服务端握手 c.connect(('127 ...
- Git - Q
GIT :实现版本控制的软件 命令: git init # 初始 git (先执行这个才能执行接下来的) git status # 查看当前文件夹状态 git add 文件名 # 对指定文件进行版本控 ...
- [NOI2008]假面舞会 (搜索+gcd)
题意 LuoguP1477 题解 对于每一条边(u,v)(u,v)(u,v),建两条边(u→v,1),(v→u,−1)(u\to v,1),(v\to u,-1)(u→v,1),(v→u,−1).跑b ...
- js 定义数组转json
var msgData = {} msgData["url"] = openUrl msgData["courseName"] = val.name JSON. ...
- NuGet本地包自定义路径
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSo ...
- 【中国剩余定理-入门】-C++
中国剩余定理也称孙子定理,是中国古代求解一次同余式组(见同余)的方法.是数论中一个重要定理. 这玩意在luogu居然有模板题: [TJOI2009]猜数字 先来看一个问题: 在<孙子算经> ...
- Android工程的合并
http://www.xuanyusong.com/archives/3395 1.游戏包名( 类似 com.xx.xxx ) Android应用程序只能有一个包名,如果两个游戏包名一样,那么后者安装 ...
- webpack4温习总结
webpack是一个模块打包器,可以根据入口文件,随着依赖关系将所有文件打包成js文件. 首先需要node环境,百度一下自己安装 webpack官网地址:https://www.webpackjs.c ...
- [vsftpd] ubuntu14.04 ansible剧本安装vsftpd流程及报错排查
需求: 在ubuntu14.04机器上搭建ftp服务,ftp账号通过winscp软件登录后,仅可增删改/data/wwwroot目录. 一.安装步骤 1.apt 安装vsftpd apt-get in ...