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

网站建设和技术服务合同软件开发过程管理工具

网站建设和技术服务合同,软件开发过程管理工具,聊城手机网站公司,iis如何添加网站文章目录 1、使用Nginx增加认证。2、使用Spring Gateway增加认证 SkyWalking的可视化后台是没有用户认证功能的#xff0c;默认下所有知道地址的用户都能访问#xff0c;官网是建议通过网关增加认证。 本文介绍通过Nginx和Spring Gateway两种方式 1、使用Nginx增加认证。 生… 文章目录 1、使用Nginx增加认证。2、使用Spring Gateway增加认证 SkyWalking的可视化后台是没有用户认证功能的默认下所有知道地址的用户都能访问官网是建议通过网关增加认证。 本文介绍通过Nginx和Spring Gateway两种方式 1、使用Nginx增加认证。 生成密钥 yum install -y httpd-tools htpasswd -cb nginx/htpasswd skywalking rtgdbhyffddu#配置nginx worker_processes 1; error_log stderr notice; events {worker_connections 1024; } http {variables_hash_max_size 1024;access_log off;#ireal_ip_header X-Real-IP;charset utf-8;server {listen 8081;#auth_basic Please enter the user name and password; #这里是验证时的提示信息#auth_basic_user_file /data/skywalking/nginx/htpasswd;index index.html;location / {root html;index index.html index.htm;#auth_basic on;auth_basic Please enter the user name and password; #这里是验证时的提示信息auth_basic_user_file /etc/nginx/htpasswd;proxy_pass http://172.17.0.9:8080;# WebSocket 穿透#proxy_set_header Origin ;#proxy_set_header Upgrade $http_upgrade;#proxy_set_header Connection upgrade;}} }密码配置/etc/nginx/htpasswd skywalking:$apr1$FVaUB8RE$.brXLk5N.IsNRqm3.Vy2n12、使用Spring Gateway增加认证 主要是使用Spring Gateway和Spring Security的基础认证formLogin实现 pom.xml使用的依赖包 ?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersiongroupIdcom.penngo.web.gateway/groupIdartifactIdweb_gateway/artifactIdversion1.0.0/versionpropertiesmaven.compiler.source17/maven.compiler.sourcemaven.compiler.target17/maven.compiler.targetproject.build.sourceEncodingUTF-8/project.build.sourceEncoding/propertiesdependenciesdependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-gateway/artifactId/dependencydependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-loadbalancer/artifactId/dependencydependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-bootstrap/artifactId/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-security/artifactId/dependency/dependenciesdependencyManagementdependenciesdependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-dependencies/artifactIdversion2022.0.4/versiontypepom/typescopeimport/scope/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-dependencies/artifactIdversion3.1.0/versiontypepom/typescopeimport/scope/dependency/dependencies/dependencyManagementbuildpluginsplugingroupIdorg.springframework.boot/groupIdartifactIdspring-boot-maven-plugin/artifactIdconfigurationmainClasscom.penngo.web.gateway.WebGatewayMain/mainClassexcludesexcludegroupIdorg.projectlombok/groupIdartifactIdlombok/artifactId/exclude/excludes/configuration/plugin/plugins/build/projectWebGatewayMain.java package com.penngo.web.gateway;import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;SpringBootApplication public class WebGatewayMain {public static void main(String[] args) {SpringApplication.run(WebGatewayMain.class, args);} }SecurityConfiguration.java配置 package com.penngo.web.gateway;import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; import org.springframework.security.config.web.server.ServerHttpSecurity; import org.springframework.security.core.userdetails.MapReactiveUserDetailsService; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.web.server.SecurityWebFilterChain;import static org.springframework.security.config.Customizer.withDefaults;EnableWebFluxSecurity Configuration public class SecurityConfiguration {BeanSecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) {http.authorizeExchange((authorize) - authorize.anyExchange().authenticated()).cors(cors-cors.disable()).csrf(csrf-csrf.disable()).formLogin(withDefaults());return http.build();}/*** 可以在代码中配置密码也可以在application.xml中配置密码* return*/ // Bean // MapReactiveUserDetailsService userDetailsService() { // // UserDetails user User.withDefaultPasswordEncoder() // .username(admin) // .password(123456) // .roles(USER) // .build(); // return new MapReactiveUserDetailsService(user); // } }application.yml server:port: 8081servlet:encoding:force: truecharset: UTF-8enabled: true spring:application:name: gatewayappsecurity:user:name: admin2password: 123456bootstrap.yml spring:cloud:gateway:routes:- id: skywalkinguri: http://localhost:8080/# 绑定ip白名单predicates:- RemoteAddr127.0.0.1/32,192.168.245.65/32运行效果
http://wiki.neutronadmin.com/news/154068/

相关文章:

  • 站长之家官网查询深圳建立网站
  • 凤岗镇做网站卧龙区2015网站建设价格
  • 目前流行的app网站开发模式jeecms 怎么建设网站
  • 四川建设工程网站网站 医院信息化建设
  • 气象网站建设需求方案陕西省建设资质是哪个网站
  • 广州网站快速制作上海有哪些外贸公司不错的
  • 做gif网站梦织网站
  • 自己有服务器如何架设网站温州敎玩具网站建设
  • 网站建设备案计划书网站的流量检测怎么做
  • 外贸做网站建设公司企业营销方案案例范文
  • 养生网站建设免费怎么创建官网主页
  • 温州免费个人网站制作公司做公司网站的目的是什么
  • 注册网站域名需要什么网站运营托管
  • 门户网站报价方案健身会所网站模板
  • 淘宝作图在哪个网站上做图怎样做网站发帖
  • 河北明迈特的网站在哪里做的专门做装修的网站
  • 南郊网站建设报价获客平台有哪些
  • 网站设计建设趋势扶余手机网站开发公司
  • 温州建设管理处网站网站域名icp备案查询
  • 网站换服务器有影响吗高校网站建设与管理问题分析
  • 网站建设规划书河北提高审美网站
  • 烟台网站推广效果好网站建设人员职责分布
  • 想要给网站投稿如何做中企动力科技股份
  • 企业网站的开发流程什么是seo和sem
  • 专注网站建设与制作网页设计页面设计主要技术
  • 湘潭做网站 去磐石网络网页和网站有什么分别
  • 做购物网站之前做些什么网线制作实训报告心得体会
  • 天津交通网站建设网络服务公司有哪些
  • 响应式网站管理公司介绍ppt制作模板
  • 深圳html5网站制作Wordpress 免登录付费查看