草庐IT

ssl-security

全部标签

git - 在不禁用权威签名证书的情况下添加自签名 SSL 证书

我有一个使用自签名证书通过https工作的公司git服务器。本地克隆包含两个远程-指向该服务器的原点,另一个指向github。默认情况下从原点pull失败:$gitpullfatal:unabletoaccess'https://user@code.example.com/git/fizzbuzz.git/':SSLcertificateproblem:selfsignedcertificategithub远程工作正常。有两种经常建议的解决方案:gitconfighttp.sslVerifyfalse这是个坏主意,建议在configureGittoacceptaparticularse

c# - 绕过 DotNet 核心服务堆栈上的 SSL 证书验证

我知道ServicePointManager.ServerCertificateValidationCallback不再存在于.NetCore中,取而代之的是:using(varhandler=newSystem.Net.Http.HttpClientHandler()){using(varhttpClient=newSystem.Net.Http.HttpClient(handler)){handler.ServerCertificateCustomValidationCallback=(request,cert,chain,errors)=>{returntrue;};}}但是,我

java - 如何使用 Spring Security 3.1 更改当前用户的登录名?

我要求每个用户在保持登录状态时都可以更改自己的用户名。问题是如何更新SpringSecurity的AuthenticationToken中的用户名(Principal)?(我必须更新它,因为我在某些业务用例中使用身份验证token中的主体名称来识别用户。)我使用基于表单和基于cookie记住我的登录,因此我的身份验证token是UsernamePaswordAuthenticationToken和RememberMeAuthenticationToken。两者都有一个存储登录名的字段principal。不幸的是这个变量是final,所以我不能改变它的值。有人知道SpringSecuri

java - 如何使用 Spring Security 3.1 更改当前用户的登录名?

我要求每个用户在保持登录状态时都可以更改自己的用户名。问题是如何更新SpringSecurity的AuthenticationToken中的用户名(Principal)?(我必须更新它,因为我在某些业务用例中使用身份验证token中的主体名称来识别用户。)我使用基于表单和基于cookie记住我的登录,因此我的身份验证token是UsernamePaswordAuthenticationToken和RememberMeAuthenticationToken。两者都有一个存储登录名的字段principal。不幸的是这个变量是final,所以我不能改变它的值。有人知道SpringSecuri

Python 3.7 anaconda 环境-import _ssl DLL 加载失败错误

我用Python=3.7创建了anaconda环境,遇到了_ssl和DLL的错误。当我试图回到我的基本环境时,我无法让后台进程完成,如下图所示,这种情况一直持续下去。错误:C:\Users\abhil\AppData\Local\Continuum\anaconda3\envs\HeisenbergPy37\python.exe"C:\ProgramFiles\JetBrains\PyCharmCommunityEdition2018.1.1\helpers\pydev\pydevconsole.py"--mode=client--port=63950Traceback(mostrec

spring - 默认 Spring Security 重定向到 favicon

我正在使用SpringSecurity3.1。授权后重定向时出现问题。它重定向到一个favicon404错误。为favicon添加role_anonymous没有帮助。--> 最佳答案 您最好从过滤器链中完全省略该路径。使用改为。还请记住,您需要将intercept-url元素从最具体到最不具体的模式排序,因此您的原始配置无论如何都会忽略favicon模式。我还建议您不要使用auto-config,而是明确指定要使用的功能,以便清楚要添加到安全过滤器链中的内容。 关于spring-默认S

spring - 默认 Spring Security 重定向到 favicon

我正在使用SpringSecurity3.1。授权后重定向时出现问题。它重定向到一个favicon404错误。为favicon添加role_anonymous没有帮助。--> 最佳答案 您最好从过滤器链中完全省略该路径。使用改为。还请记住,您需要将intercept-url元素从最具体到最不具体的模式排序,因此您的原始配置无论如何都会忽略favicon模式。我还建议您不要使用auto-config,而是明确指定要使用的功能,以便清楚要添加到安全过滤器链中的内容。 关于spring-默认S

java - HTTP 状态 405 - 使用 Spring Security 的 Spring MVC 不支持请求方法 'POST'

我使用freemarker模板作为View部分创建了一个springmvc应用程序。在此尝试使用表单添加模型。我也在使用Spring安全性这是代码employee.ftlAddEmployeeFirstname:EmployeeCode:employeeController.java@RequestMapping(value="/addEmployee",method=RequestMethod.POST)publicStringaddEmployee(@ModelAttribute("employee")Employeeemployee){employeeService.add(em

java - HTTP 状态 405 - 使用 Spring Security 的 Spring MVC 不支持请求方法 'POST'

我使用freemarker模板作为View部分创建了一个springmvc应用程序。在此尝试使用表单添加模型。我也在使用Spring安全性这是代码employee.ftlAddEmployeeFirstname:EmployeeCode:employeeController.java@RequestMapping(value="/addEmployee",method=RequestMethod.POST)publicStringaddEmployee(@ModelAttribute("employee")Employeeemployee){employeeService.add(em

spring - @Secured 在 Controller 中不起作用,但拦截 URL 似乎工作正常

看起来我的@Controller中的@Securedon方法没有被读取。当使用基于sec:intercept-url的安全过滤时,这似乎工作得很好。以下代码导致SpringSecurity给我这个日志条目:DEBUG:org.springframework.security.web.access.intercept.FilterSecurityInterceptor-Publicobject-authenticationnotattemptedweb.xml上下文配置位置/WEB-INF/spring/root-context.xmlorg.springframework.web.co