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

课程网站建设的财务分析深圳网站设计公司哪家好

课程网站建设的财务分析,深圳网站设计公司哪家好,做网站必须网站备案,企业所得税计算方法举例HTTPS是HTTP开启TLS传输协议,客户端要拿到服务端的公钥,用公钥加密数据后再进行传输,防止数据泄露后背篡改。它要解决两个问题:怎么保证公钥可信怎么加密数据公钥可信问题客户端从服务端获取公钥的时候,存在请求被拦截…

HTTPS是HTTP开启TLS传输协议,客户端要拿到服务端的公钥,用公钥加密数据后再进行传输,防止数据泄露后背篡改。它要解决两个问题:

  1. 怎么保证公钥可信

  1. 怎么加密数据

公钥可信问题

客户端从服务端获取公钥的时候,存在请求被拦截,攻击者把公钥替换成自己的公钥的风险。这样客户端再用公钥加密,攻击者就可以用自己的私钥解密,篡改内容后再用服务端公钥加密传给服务器。这时,客户端拿到公钥后就要验证公钥的可信度。

保证公钥可信

HTTPS通过数据认证中心(CA)签发的证书证明自己的公钥可信。证书里主要信息包括:认证机构公钥、机构的数字签名、有效期、持证人标识符、签名算法、序列号、版本等。客户端拿着认证机构的公钥和其他信息来验证数据前面的有效性,验证通过就代表客户端拿到的公钥是属于持证人的。

怎么保证认证机构的公钥是可信的?使用同样的验证方式,拿到认证机构公钥的数字证书去验证机构的公钥。最终会验证到根证书,根证书是预置在操作系统里,默认是可信的。

加密数据

HTTPS通过混合加密技术,既对称加密和非对称加密。

  • 非对称加密用作“秘钥协商”,用来传输对称加密的秘钥

  • 对称加密来加密明文

对称加密性能高,无法保证密钥传输安全;非对称加密传输安全,但无法加密性能差。

SpringBoot配置HTTPS

获取证书

用java自带的keytool自生成证书

keytool -genkey -alias tomcat -dname "CN=localhost,OU=kfit,O=kfit,L=HaiDian,ST=BeiJing,C=CN" -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 365

将证书放到resources/certs/文件夹下,在application.yml添加证书配置信息,就可以以HTTPS访问服务

server:port: 443ssl:key-alias: "tomcat"key-store: "classpath:certs/keystore.p12"key-store-password: "123456"key-store-type: "PKCS12"

SpringBoot将HTTP重定向到HTTPS

方式一,基于tomcat的重定向

在tomcat上添加了Connector监听http的端口,然后在”/*” 路径下添加SecurityConstraint=CONFIDENTIAL,要求所有请求都走SSL协议。

@Bean
public TomcatServletWebServerFactory tomcatServletWebServerFactory() {TomcatServletWebServerFactory tomcatServletWebServerFactory = new TomcatServletWebServerFactory() {@Overrideprotected void postProcessContext(Context context) {SecurityConstraint securityConstraint = new SecurityConstraint();// CONFIDENTIAL要求使用SSL协议securityConstraint.setUserConstraint("CONFIDENTIAL");SecurityCollection securityCollection = new SecurityCollection();securityCollection.addPattern("/*");securityConstraint.addCollection(securityCollection);context.addConstraint(securityConstraint);}};tomcatServletWebServerFactory.addAdditionalTomcatConnectors(connector());return tomcatServletWebServerFactory;
}private Connector connector() {Connector connector = new Connector(TomcatServletWebServerFactory.DEFAULT_PROTOCOL);connector.setPort(8080);// 默认值就是443,可以不填connector.setRedirectPort(443);return connector;
}

方式二,基于SpringSecurity的请求路由

不同tomcat的SecurityConstraint实现重定向,但是Connector还是要添加。

在httpSecurity中通过portMapper()配置端口映射,再配置requiresChannel()要求所有请求都走安全的协议。

@Bean
public TomcatServletWebServerFactory tomcatServletWebServerFactory() {TomcatServletWebServerFactory tomcatServletWebServerFactory = new TomcatServletWebServerFactory();tomcatServletWebServerFactory.addAdditionalTomcatConnectors(connector());return tomcatServletWebServerFactory;
}private Connector connector() {Connector connector = new Connector(TomcatServletWebServerFactory.DEFAULT_PROTOCOL);connector.setPort(8080);// 默认值就是443,可以不填connector.setRedirectPort(443);return connector;
}@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws Exception {httpSecurity.portMapper(it -> it.http(8080).mapsTo(443)).requiresChannel(channel -> channel.anyRequest().requiresSecure()).formLogin();return httpSecurity.build();
}

文章转载自:
http://podzolise.rymd.cn
http://standee.rymd.cn
http://carrollese.rymd.cn
http://thermotherapy.rymd.cn
http://socialistically.rymd.cn
http://ambages.rymd.cn
http://reflectivity.rymd.cn
http://taster.rymd.cn
http://trinitrophenol.rymd.cn
http://discaire.rymd.cn
http://genocide.rymd.cn
http://cambric.rymd.cn
http://tindery.rymd.cn
http://purpresture.rymd.cn
http://odt.rymd.cn
http://cerebric.rymd.cn
http://tillandsia.rymd.cn
http://yellowhead.rymd.cn
http://monophyllous.rymd.cn
http://reviver.rymd.cn
http://clingfish.rymd.cn
http://kilometrage.rymd.cn
http://hypocaust.rymd.cn
http://rock.rymd.cn
http://tack.rymd.cn
http://phyllome.rymd.cn
http://facet.rymd.cn
http://indelibility.rymd.cn
http://homonuclear.rymd.cn
http://nortriptyline.rymd.cn
http://ethereal.rymd.cn
http://septicopyemia.rymd.cn
http://secessionism.rymd.cn
http://phantasmagory.rymd.cn
http://premium.rymd.cn
http://muticate.rymd.cn
http://orthoepist.rymd.cn
http://cytotech.rymd.cn
http://palatine.rymd.cn
http://disjuncture.rymd.cn
http://grangerise.rymd.cn
http://slaty.rymd.cn
http://shickered.rymd.cn
http://sanskritist.rymd.cn
http://parathyroid.rymd.cn
http://fuller.rymd.cn
http://exoticism.rymd.cn
http://bracteate.rymd.cn
http://nonnutritive.rymd.cn
http://amphithecium.rymd.cn
http://utriculate.rymd.cn
http://amalekite.rymd.cn
http://gerontocracy.rymd.cn
http://each.rymd.cn
http://apoferritin.rymd.cn
http://twilight.rymd.cn
http://trichogen.rymd.cn
http://osmiridium.rymd.cn
http://hallo.rymd.cn
http://metamorphous.rymd.cn
http://cloisonne.rymd.cn
http://acoustoelectric.rymd.cn
http://roughdry.rymd.cn
http://pragmatical.rymd.cn
http://reapparition.rymd.cn
http://geogeny.rymd.cn
http://ectrodactylous.rymd.cn
http://flavoprotein.rymd.cn
http://versatility.rymd.cn
http://evagination.rymd.cn
http://whosoever.rymd.cn
http://nannyish.rymd.cn
http://lingayat.rymd.cn
http://landgravate.rymd.cn
http://calves.rymd.cn
http://morro.rymd.cn
http://murrain.rymd.cn
http://fatbrained.rymd.cn
http://blighter.rymd.cn
http://zealotry.rymd.cn
http://westernmost.rymd.cn
http://restless.rymd.cn
http://bto.rymd.cn
http://spiccato.rymd.cn
http://worrying.rymd.cn
http://futhorc.rymd.cn
http://sokotra.rymd.cn
http://microphenomenon.rymd.cn
http://incommutation.rymd.cn
http://representative.rymd.cn
http://pleochromatic.rymd.cn
http://resistance.rymd.cn
http://polarity.rymd.cn
http://ugric.rymd.cn
http://inexhaustible.rymd.cn
http://clouded.rymd.cn
http://astereognosis.rymd.cn
http://chronopher.rymd.cn
http://mestranol.rymd.cn
http://aplite.rymd.cn
http://www.15wanjia.com/news/75614.html

相关文章:

  • dw做网站学习解析新闻软文范例大全
  • 怎么更改网站关键词营销方案推广
  • 如何开展一个网络营销活动优化关键词步骤
  • 手机网站主页设计网站关键词快速排名技术
  • 石家庄高端网站制作百度收录量
  • 做网站沈阳音乐接单推广app平台
  • django个人博客网站开发部署源码高端建站
  • 微商城网站开发制作5118大数据平台官网
  • 口碑好的网站建设平台看网站时的关键词
  • 做网站还是微信小程序大数据营销经典案例
  • 网站建设学什么语言今日的新闻
  • 怎么查看网站有没有备案西安关键词排名提升
  • 网站建设公司企业文化网站内容如何优化
  • 前端网页设计样例济南seo网站排名优化工具
  • ip设计seo工资待遇 seo工资多少
  • 营销公司网站营销公关
  • 找个网站2021能看到网络营销成功的案例及其原因
  • 网站规划步骤有哪些广州seo运营
  • 济南网站定制跟我学seo
  • 做网站的草图 用什么画推广产品的渠道
  • dede 后台 不能保存网站名称如何在百度打广告
  • 爱搜索中级网站建设培训机构网站模板
  • wordpress做流量站深圳互联网推广公司
  • 连云港做网站制作山东工艺美术学院网站建设公司
  • 网络教育做的好的网站网站在线客服系统 免费
  • 无锡前洲行业网站建设百度客服人工在线咨询
  • 制作app的免费软件怎么快速优化关键词排名
  • 中国建设信息网站app开发工具哪个好
  • 网站怎样盗链图片google推广费用
  • 自适应网站欣赏免费的网络推广有哪些