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 ...
随机推荐
- jquery限定文字超出用省略号
都知道用css3可以做到一行超出显示省略号,但多行的用css3很麻烦还要考虑兼容,今天用jquery判断字数来限制出现省略号 $(".ftlt_lt_wzne").each(fun ...
- 百度静态资源库CDN库, cdnjs库,引入JS
不适用本地引入js文件,而使用其他服务器引入JS文件,1,减轻服务器压力2,速度快3,可以缓存 cdnjs库,更新比较快https://cdnjs.com/ cdn库 引入JS文件如:jquerybo ...
- 009_Source Insight 3.5安装及使用
链接:https://pan.baidu.com/s/1CBEhIhYtZZ6rUjq7yu4J2w提取码:qkv0 复制这段内容后打开百度网盘手机App,操作更方便哦 SourceInsight3. ...
- GreenPlum 数据库创建用户、文件空间、表空间、数据库
前几篇文章介绍了GreenPlum数据库的安装.启动.关闭.状态检查.登录等操作,数据库已经创建好了,接下来介绍如何使用数据库.按照习惯,需要先创建测试用户.表空间.数据库.先创建测试用户dbdrea ...
- luogu 3919
主席树 #include <iostream> #include <cstdio> #include <algorithm> #include <cmath& ...
- 【02NOIP提高组】均分纸牌
#include<bits/stdc++.h> using namespace std; ; int n,sum,a[maxn]; int main() { ; cin>>n; ...
- sql 查出相同的记录 并把相同记录 显示在一起
select c.workunit unitname,a.positionid,a.positiontype,a.isfirst,a.mastersort,a.directoraudit, c.wri ...
- Jetty - Unable to compile class for JSP
问题与分析 在启动公司项目时发现报错如下: [jetty] 2019-10-07 10:28:28.760:WARN:org.apache.jasper.compiler.Compiler:Error ...
- docker搭建hadoop HA出错问题总结记录。
错误1: ssh连接云主机: ssh root@39.106.xx.xx 报错:THE AUTHENTICITY OF HOST XX CAN’T BE ESTABLISHED 解决办法: ssh - ...
- sqlserver数据库查询语句
--数据库所有表select * from sysobjects where type='u'; --指定表的所有列select name from syscolumns where id=(sele ...