当前位置: 首页 > news >正文

成都维尼网络 网站建设wordpress文章编辑慢

成都维尼网络 网站建设,wordpress文章编辑慢,工装公司怎么找,wordpress文章列表不同样式如果您看过我的上一个博客#xff0c;您会知道我列出了Spring Security可以做的十件事 。 但是#xff0c;在认真开始使用Spring Security之前#xff0c;您真正要做的第一件事就是确保您的Web应用使用正确的传输协议#xff0c;在这种情况下为HTTPS –毕竟#xff0c;没有… 如果您看过我的上一个博客您会知道我列出了Spring Security可以做的十件事 。 但是在认真开始使用Spring Security之前您真正要做的第一件事就是确保您的Web应用使用正确的传输协议在这种情况下为HTTPS –毕竟没有一个安全的网站是没有意义的如果您要在互联网上以纯文本格式广播用户密码。 要设置SSL需要执行三个基本步骤…… 创建密钥库 您需要的第一件事是包含有效证书的私有密钥库生成其中一个证书的最简单方法是使用位于$JAVA_HOME/bin目录中的Java的keytool实用程序。 keytool -genkey -alias MyKeyAlias -keyalg RSA -keystore /Users/Roger/tmp/roger.keystore 在以上示例中 -alias是密钥的唯一标识符。 -keyalg是用于生成密钥的算法。 您在网络上找到的大多数示例通常都引用“ RSA”但是您也可以使用“ DSA”或“ DES” -keystore是一个可选参数用于指定密钥存储文件的位置。 如果缺少此参数则默认位置是$ HOME目录。 RSA代表Ron Rivest也是RC4算法的创建者Adi Shamir和Leonard Adleman DSA代表数字签名算法 DES代表数据加密标准 有关keytool及其参数的更多信息 keytool 参阅Jon Svede的Informit文章。 当您运行此程序时系统会提示您一些问题 Roger$ keytool -genkey -alias MyKeyAlias -keyalg RSA -keystore /Users/Roger/tmp/roger.keystore Enter keystore password: Re-enter new password: What is your first and last name?[Unknown]: localhost What is the name of your organizational unit?[Unknown]: MyDepartmentName What is the name of your organization?[Unknown]: MyCompanyName What is the name of your City or Locality?[Unknown]: Stafford What is the name of your State or Province?[Unknown]: NA What is the two-letter country code for this unit?[Unknown]: UK Is CNlocalhost, OUMyDepartmentName, OMyCompanyName, LStafford, STUK, CUK correct?[no]: YEnter key password for (RETURN if same as keystore password): 大多数字段是不言自明的。 但是对于名字和名字我通常使用机器名称–在这种情况下 localhost 更新Tomcat配置 保护您的应用程序的第二步是确保您的tomcat具有SSL连接器。 为此您需要找到tomcat的server.xml配置文件该文件通常位于conf目录中。 一旦掌握了这一点并且如果您使用的是tomcat那么就不用注释了 Connector port8443 protocolHTTP/1.1 SSLEnabledtruemaxThreads150 schemehttps securetrueclientAuthfalse sslProtocolTLS / …并使它看起来像这样 Connector SSLEnabledtrue keystoreFile/Users/Roger/tmp/roger.keystore keystorePasspassword port8443 schemehttps securetrue sslProtocolTLS/ 请注意密码“ password”是纯文本格式不是很安全。 有很多解决方法但这超出了本博客的范围。 如果您使用的是Spring的tcServer那么您会发现它已经具有配置如下的SSL连接器 Connector SSLEnabledtrue acceptCount100 connectionTimeout20000 executortomcatThreadPool keyAliastcserver keystoreFile${catalina.base}/conf/tcserver.keystore keystorePasschangeme maxKeepAliveRequests15 port${bio-ssl.https.port} protocolorg.apache.coyote.http11.Http11Protocol redirectPort${bio-ssl.https.port} schemehttps securetrue/ …在这种情况下只需编辑各个字段包括keyAliaskeystoreFile和keystorePass。 配置您的应用 如果现在启动tomcat并运行您的Web应用程序您现在会发现可以使用HTTPS访问它。 例如键入https://localhost:8443/my-app可以但是http://localhost:8080/my-app也可以。这意味着您还需要对应用程序进行一些jiggery-pokery以确保其成功仅响应HTTPS可以采用两种方法。 如果您不使用Spring Security则可以在最后一个web-app标签之前将以下内容添加到web.xml security-constraintweb-resource-collectionweb-resource-namemy-secure-app/web-resource-nameurl-pattern/*/url-pattern/web-resource-collectionuser-data-constrainttransport-guaranteeCONFIDENTIAL/transport-guarantee/user-data-constraint /security-constraint 如果您使用的是Spring Security那么还有更多步骤可以解决问题。 常规Spring Security设置的一部分是将以下内容添加到您的web.xml文件中。 首先您需要将一个Spring Security应用程序上下文文件添加到contextConfigLocation context-param context-paramparam-namecontextConfigLocation/param-nameparam-value/WEB-INF/spring/root-context.xml/WEB-INF/spring/appServlet/application-security.xml /param-value/context-param 其次您需要添加Spring Security filter和filter-mapping filterfilter-namespringSecurityFilterChain/filter-namefilter-classorg.springframework.web.filter.DelegatingFilterProxy/filter-class/filterfilter-mappingfilter-namespringSecurityFilterChain/filter-nameurl-pattern/*/url-pattern/filter-mapping 最后您需要创建或编辑application-security.xml 如以下非常简单的示例所示 ?xml version1.0 encodingUTF-8? beans:beans xmlnshttp://www.springframework.org/schema/securityxmlns:beanshttp://www.springframework.org/schema/beansxmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/securityhttp://www.springframework.org/schema/security/spring-security-3.1.xsdhttp auto-configtrue intercept-url pattern/** requires-channelhttps / /httpauthentication-manager/authentication-manager/beans:beans 在上面的示例中已经设置了intercept-url元素来拦截所有URL并强制它们使用https通道。 上面的配置详细信息可能给人的印象是使用简单的web.xml配置更改会更快但是如果您已经在使用Spring Security那么只需在现有配置中添加一个requires-channel属性即可。 可以在git hub上找到一个名为tomcat-ssl的示例应用程序用于演示上述内容网址为https://github.com/roghughe/captaindebug 参考 Captain Debug的Blog博客上的JCG合作伙伴 Roger Hughes 通过SSL和Spring Security保护Tomcat应用程序 。 翻译自: https://www.javacodegeeks.com/2012/12/securing-your-tomcat-app-with-ssl-and-spring-security.html
http://www.huolong8.cn/news/63008/

相关文章:

  • 北京建设网站的公司网站ico如何修改
  • 房城乡建设部网站怎么用ps做网站首页图片
  • 响应式网站设计的规范临沂哪里有做网站的
  • 电子商务网站建设的工具整合营销传播简称
  • 做软件下载网站怎么赚钱网站建设哪专业
  • 网站的原型怎么做建设部网站 干部学院 一级注册建筑师培训 2014年
  • 网站一般用什么做的成都官网优化多少钱
  • 菜鸟建网站网站开发需要会啥
  • php网站开发实例教程下载中国中建设计集团有限公司
  • 上海企业网站制作方法自己做的网站怎么管理用户
  • 做得好的网站90设计赚钱
  • 腾讯网站安全检测ip地址做网站
  • 宣讲家网站官网加强作风建设快速建站软件排名
  • 优质的广州微网站建设台州中兴建设咨询有限公司网站
  • 网站h1标签用在哪里公司网站平台的作用
  • 珠海网站推广建设食品商购网站
  • 南京网站推广¥做下拉去118cr国外网页游戏网站
  • 一般在百度做网站多少钱超八成搜索网站存在信息泄露问题
  • 高端网站设计公司有上海公司注册一站式企业服务
  • 网站平台怎么推广营销网站售后调查系统
  • 自助建设手机网站做企业网站的尺寸是多少钱
  • 一个网站的建设需要哪些流程图响应式网站404页面怎么做
  • 经典企业网站欣赏溧阳网页设计
  • 网站开发属于无形资产福州小程序开发定制
  • 太原开发网站公司淘宝开店流程步骤图片
  • 海南建设网网站网站搜索页面怎么做
  • 定制网站建设的释义南昌城市旅游网站建设
  • wordpress 企业网站 教程事件营销ppt
  • 重庆网站建设业务招聘莱芜在线广告信息
  • 南通网站建设排名公司哪家好网站建设的广告投入