regarding-hsts-in-netscaler

参考:

Strict Transport Security (STS or HSTS) with Citrix NetScaler and Access Gateway Enterprise

https://www.citrix.com/blogs/2010/09/10/strict-transport-security-sts-or-hsts-with-citrix-netscaler-and-access-gateway-enterprise/

How Do I Configure HTTP Strict Transport Security (HSTS) on NetScaler

https://support.citrix.com/article/CTX205221

How to Enable HTTP Strict Transport Security (HSTS) on NetScaler 12

https://support.citrix.com/article/CTX224172

Check HSTS preload status and eligibility   https://hstspreload.org/

SSL Server Test    https://www.ssllabs.com/ssltest/index.html

https://discussions.citrix.com/topic/398147-regarding-hsts-in-netscaler/

Posted September 3, 2018

1)What is the use of HSTS?

Short version: HSTS ensures client browsers will only use HTTPS to connect to your web site(s). The lack of HTTP will make it more difficult for Man-in-the-Middle and/or fake sites to get access to your users' credentials or other sensitive info.

Long version: See https://www.troyhunt.com/understanding-http-strict-transport/

2)In Netscaler version 11.0 there is no inbuilt profile so how can we create it?

You need a Responder policy and a Rewrite policy. The Responder Action and Policy will redirect from HTTP->HTTPS for you web site and at the same time it will specify the HSTS header in this Redirect. Below is a general HTTPS redirect, so you can bind below policy to your HTTP Load Balancing or Content Switch vServers and the HSTS flag will tell the client's browser that for the next 31536000 seconds (1 year) to always skip HTTP for this particular URL.

The Rewrite policy should be bound to your HTTPS LB/CS vServers (since if a user browses to your website using HTTPS immediately then he will not get the Redirect response above and hence not the HSTS flag).

add responder action REA-HTML-HTTPS_REDIRECT respondwith q{"HTTP/1.1 301 Moved Permanently\r\n" + "Location: https://" + HTTP.REQ.HEADER("Host").HTTP_HEADER_SAFE + HTTP.REQ.URL.PATH_AND_QUERY.HTTP_URL_SAFE + "\r\n" + "Strict-Transport-Security: max-age=31536000\r\n" + "Connection: close\r\n" + "Cache-Control: no-cache\r\n" + "Pragma: no-cache\r\n" + "\r\n"}

add responder policy REP-HTTPS_REDIRECT "CLIENT.SSL.IS_SSL.NOT" REA-HTML-HTTPS_REDIRECT

add rewrite action RWA-RES-INSERT_HSTS insert_http_header Strict-Transport-Security "\"max-age=31536000\""
add rewrite policy RWP-RES-INSERT_HSTS "CLIENT.SSL.IS_SSL" RWA-RES-INSERT_HSTS

3)Suppose if we want HSTS to use in ntescaler wheather anthing have to be done in backend servers as well or only in netscaler?

You only need to do it on Netscaler, assuming that all your clients connect to your web systems through Netscaler (and not directly to backend if they are internal users, for example)

4)for which vserver  https or http the HSTS applied?

If you have HTTP LB vServers (instead of SSL/HTTPS), and there is no HTTPS CS vServer in front of it, then HSTS will serve no purpose for this particular LB vServer since HTTPS isn't being used. If you do have SSL/HTTPS LB or CS vServers, then bind above responder policy to your HTTP port 80 LB/CS vServers since they will be the ones performing the Redirect.

5)Chrome from which version HSTS is supported?

Not sure, but it's been supported for at least 2 years, so quite a few versions back.

Some things to note:

* Google has a Preload list for HSTS, but this is optional and not necessary to add your web site(s) to. The Preload list has its own specific requirements on the HSTS implementation.

* Start out with a low value in the HSTS header, do not use 1 year initially (use 30 minutes or something) since if you screw up somehow, the HSTS value will be stored in clients' web browsers and you cannot clear/change this value from server-side.

* When enabling HSTS it forces all connections for that particular URL to use HTTPS. Ensure your web system is 100% HTTPS supported before enabling HSTS (check source code and javascripts that they do not point to http:// addresses of your web site)

* If your company has both URLs www.mycompany.com and mycompany.com, and you perform redirect from mycompany.com to www.mycompany.com, then you will need multiple Responder Policies with HSTS header instead of just one. For example, you shouldn't do an immediate redirect from http://mycompany.com -> https://www.mycompany.com, but rather split it up into an initial http->https redirect for mycompanycom and then a secondary redirect from https://mycompany.com to https://www.mycompany.com. This ensures HSTS flag is correctly set for the mycompany.com URL.

Configure support for HTTP strict transport security (HSTS)

https://docs.citrix.com/en-us/citrix-adc/12-1/ssl/how-to-articles/ssl-support-for-hsts.html

 March 6, 2019     Contributed by:  S C

 

Citrix ADC appliances support HTTP strict transport security (HSTS) as an in-built option in SSL profiles and SSL virtual servers. Using HSTS, a server can enforce the use of an HTTPS connection for all communication with a client. That is, the site can be accessed only by using HTTPS. Support for HSTS is required for A+ certification from SSL Labs.

Enable HSTS in an SSL front-end profile or on an SSL virtual server. If you enable SSL profiles, then you should enable HSTS on an SSL profile instead of enabling it on an SSL virtual server. By setting the maximum age header, you specify that HSTS is in force for that duration for that client. You can also specify whether subdomains should be included. For example, you can specify that subdomains for www.example.com, such as www.abc.example.com and www.xyx.example.com, can be accessed only by using HTTPS by setting the IncludeSubdomains parameter to YES.

If you access any web sites that support HSTS, the response header from the server contains an entry similar to the following:

The client stores this information for the time specified in the max-age parameter. For subsequent requests to that web site, the client checks its memory for an HSTS entry. If an entry is found, it accesses that web site only by using HTTPS.

You can configure HSTS at the time of creating an SSL profile or an SSL virtual server by using the add command. You can also configure HSTS on an existing SSL profile or SSL virtual server by modifying it using the set command.

Configure HSTS by using the CLI

At the command prompt, type:

COPY
add ssl vserver <vServerName> -HSTS ( ENABLED | DISABLED ) -maxage <positive_integer> -IncludeSubdomains ( YES | NO)

OR

COPY
add ssl profile <name> -HSTS ( ENABLED | DISABLED ) -maxage <positive_integer> -IncludeSubdomains ( YES | NO )

Arguments

HSTS

         State of HTTP Strict Transport Security (HSTS) on an SSL virtual server or SSL profile. Using HSTS, a server can enforce the use of an HTTPS connection for all communication with a client.

          Possible values: ENABLED, DISABLED

          Default: DISABLED

maxage

          Set the maximum time, in seconds, in the strict transport security (STS) header during which the client must send only HTTPS requests to the server.

          Default: 0

          Minimum: 0

          Maximum: 4294967294

IncludeSubdomains

         Enable HSTS for subdomains. If set to Yes, a client must send only HTTPS requests for subdomains.

          Possible values: YES, NO

          Default: NO

In the following examples, the client must access the web site and its subdomains for 157,680,000 seconds only by using HTTPS.

COPY
add ssl vserver VS-SSL –HSTS ENABLED –maxage 157680000 –IncludeSubdomain YES
COPY
add sslProfile hstsprofile –HSTS ENABLED –maxage 157680000 –IncludeSubdomain YES

Configure HSTS by using the GUI

  1. Navigate to Traffic Management > Load Balancing > Virtual Servers, select a virtual server of type SSL and click Edit.

Perform the following steps if the default SSL profile is enabled on the appliance.

  1. Select an SSL profile and click Edit.

  2. In Basic Settings, click the pencil icon to edit the settings. Scroll down and select HSTS and Include Subdomains.

Perform the following steps if the default SSL profile is not enabled on the appliance.

  1. In Advanced Settings, select SSL Parameters.

  2. Select HSTS and Include Subdomains.

Support for HSTS preload

Note:

This feature is available in release 12.1 build 51.x and later.

The Citrix ADC appliance supports adding an HSTS preload in the HTTP response header. To include the preload, you must set the preload parameter in the SSL virtual server or SSL profile to YES. The appliance then includes the preload in the HTTP response header to the client. You can configure this feature using both the CLI and the GUI. For more information about HSTS preload, see https://hstspreload.org/.

Following are examples of valid HSTS headers with preload:

COPY
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
COPY
Strict-Transport-Security: max-age=63072000; preload

Configure HSTS preload by using the CLI

At the command prompt, type:

COPY
add ssl vserver <vServerName> -HSTS ( ENABLED | DISABLED ) -maxage <positive_integer> -preload ( YES | NO )

OR

COPY
add ssl profile <name> -HSTS ( ENABLED | DISABLED ) -maxage <positive_integer> -IncludeSubdomains ( YES | NO ) -preload ( YES | NO )

Configure HSTS preload by using the GUI

Perform the following steps if the default SSL profile is enabled on the appliance.

  1. Navigate to System > Profiles > SSL Profiles. Select an SSL profile and click Edit.

  2. In Basic Settings, click the pencil icon to edit the settings. Scroll down and select HSTS and Preload.

Perform the following steps if the default SSL profile is not enabled on the appliance.

  1. Navigate to Traffic Management > Load Balancing > Virtual Servers, select a virtual server of type SSL and click Edit.

  2. In Advanced Settings, select SSL Parameters.

  3. Select HSTS and Preload.

====================== End

regarding-hsts-in-netscaler的更多相关文章

  1. 【流量劫持】躲避 HSTS 的 HTTPS 劫持

    前言 HSTS 的出现,对 HTTPS 劫持带来莫大的挑战. 不过,HSTS 也不是万能的,它只能解决 SSLStrip 这类劫持方式.但仔细想想,SSLStrip 这种算劫持吗? 劫持 vs 钓鱼 ...

  2. 使用https的HSTS需要注意的一个问题

    HSTS(HTTP Strict Transport Security) 简单来说就是由浏览器进行http向https的重定向.如果不使用HSTS,当用户在浏览器中输入网址时没有加https,浏览器会 ...

  3. LB 简单比较 – F5、NetScaler、LVS、Nginx、Haproxy

    LB 简单比较 – F5.NetScaler.LVS.Nginx.Haproxy 负载均衡技术是构建大型网站必不可少的架构策略之一.它的目的是,把用户的请求分发到多台后端的设备上,用以均衡服务器的负载 ...

  4. HTTPS强制安全策略-HSTS协议阅读理解

    https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security [阅读理解式翻译,非严格遵循原 ...

  5. 【翻译】Netscaler真实表现性能调整

    源地址:https://msandbu.wordpress.com/2014/10/31/netscaler-and-real-performance-tuning/ 作者显然不是以英语为母语的,所以 ...

  6. HTTP HSTS协议和 nginx

    导读 Netcraft 公司最近公布了他们检测SSL/TLS网站的研究,并指出只有仅仅5%的用户正确执行了HTTP严格传输安全HSTS.本文介绍nginx如何配置HSTS. 什么是HSTS HTTPS ...

  7. 使用mitmf 来绕过HSTS站点抓取登陆明文

    使用mitmf 来绕过HSTS站点抓取登陆明文 HSTS简介 HSTS是HTTP Strict Transport Security的缩写,即:"HTTP严格安全传输".当浏览器第 ...

  8. [Citrix NetScaler] 简述

    额 就这个题目 Citrix NetScaler 是一个VPN,一个代理,一个Gateway的存在,一个Citrix的产品 首先是我们利用Citrix NetScaler的测试环境: 架构上分2种: ...

  9. web前端利用HSTS(新的Web安全协议HTTP Strict Transport Security)漏洞的超级Cookie(HSTS Super Cookie)

    web前端如果想实现cookie跨站点,跨浏览器,清除浏览器cookie该cookie也不会被删除这似乎有点难,下面的教程让你完全摆脱document.cookie 1.服务器端设置HSTS 如PHP ...

随机推荐

  1. 如何确认oracle客户端中的TNSNAMES中的service_name

    在我们安装oracle的客户端,或者PLSQL develop的时候,需要在oracle的安装目录下修改TNSNAME中配置你要连接的数据库的TNS参数.配置好了可以通过命令行使用tnsping命令测 ...

  2. TreeSet和TreeMap不能存放重复元素?能不能存放null?其实不是这样的——灵活的二叉树

    TreeSet和TreeMap不能存放重复元素?能不能存放null?其实不是这样的——灵活的二叉树   本文链接:https://blog.csdn.net/u010698072/article/de ...

  3. VGG网络-ILSVRC-2014亚军

    用于大尺度图片识别的非常深的卷积网络 使用一个带有非常小的(3*3)的卷积核的结构去加深深度,该论文的一个十分重要的改进就是它将卷机网络的深度增加到了16-19层,且可以用于比较大224*224的图片 ...

  4. 三种实现PHP伪静态页面的方法

    PHP伪静态写法--其一 伪静态又名:URL重写  主要是为了SEO而生的.(SEO是什么?这个不用问我吧.呵呵-搞网络的不懂SEO那就----) 方法一: 比如这个网页 /soft.php/1,10 ...

  5. 阶段5 3.微服务项目【学成在线】_day07 课程管理实战_01-我的课程-需求分析与PageHelper技术

    1 我的课程 1.1需求分析 课程添加完成后可通过我的课程进入课程修改页面,此页面显示我的课程列表,如下图所示,可分页查询. 注意:由于课程图片服务器没有搭建,这里在测试时图片暂时无法显示. 上边的查 ...

  6. jsp中cookie的一个报错

    写项目时在一个jsp页面中使用了cookie,用逗号分隔的数据,服务器老报错,搞了一个小时,终于清楚了,jsp的cookie中不能使用逗号. cookie规则:这个规则用于jsp.asp中(下面这两句 ...

  7. java通过telnet远程至windows机器执行dos命令

    准备工作,远程windows机器中开启telnet服务,将远程登录用户添加至telnetClients用户组 核心代码: import java.io.IOException; import java ...

  8. destoon 6.0 手机站支持在所有浏览器访问

    我们的在本地调试destoon 6.0的手机站模板时,用浏览器的自带审查元素很不方便. 可是destoon 默认是在电脑端打不开手机站,如果这个设置能够去除掉,那就可以了. 去掉这个限制,指需要两步 ...

  9. 【CUDA开发】论CUDA和LAV解码器是否真的实用

    先说配置,我电脑E3V3+GTX780TI视频就一个普通的720P AVC1编码MP4视频,实时检测软件是CPU-Z和GPU-Z,AIDA64[全默认设置]全部用ptoplayer默认播放时候,播放3 ...

  10. 【计算机视觉】OpenCV读取视频获取时间戳等信息(PS:经测试并不是时间戳,与FFMPEG时间戳不一样)

    OpenCV中通过VideoCaptrue类对视频进行读取操作以及调用摄像头,下面是该类的API. 1.VideoCapture类的构造函数: C++: VideoCapture::VideoCapt ...