草庐IT

SECURITY_PRINCIPAL

全部标签

ios - 在 iOS WKWebView 中设置 "Disable web security"和 "allow file access from files"

如何在iOSWKWebView中禁用网络安全?我在mac系统中使用命令“open/Applications/Google\Chrome.app--args--disable-web-security--allow-file-access-from-files”打开Chrome。但是如何在WKWebView中做到这一点?谢谢! 最佳答案 无法在WKWebView中禁用网络安全-没有人愿意这样做-请参阅iOSsourcecodeforWebKitpreferences.有一种方法允许从文件URL进行访问,尽管它不受官方支持。在sourc

javax.security.sasl.SaslException : Authentic Failed while connecting to Jboss 7 server from remote client

我有独立的Java客户端(在eclipse中运行),我希望连接到外部服务器。如果服务器是本地主机,那么我看不出有任何问题。但是,每当我尝试连接到外部服务器时,我总是会遇到以下异常-JBREM000200:Remoteconnectionfailed:javax.security.sasl.SaslException:Authenticationfailed:allavailableauthenticationmechanismsfailed-CouldnotregisteraEJBreceiverforconnectiontoremote://10.160.148.61:4447jav

java - 从 spring-security 中获取当前用户的密码

这个问题在这里已经有了答案:UserDetailsgetPasswordreturnsnullinspringsecurity3.1.Howtogetpasswordofcurrentlyloggedinuser?(3个答案)关闭8年前。我使用带有HTTPBasicAuth的spring-security来保护javawebapp。在我的webapp中,我需要获取当前用户的用户名和密码,以针对其他服务进一步验证他们。我可以获取用户名,但不能获取密码。我已经尝试使用SecurityContextHolder.getContext().getAuthentication()来访问这里建议的

java - 线程 "main"java.security.InvalidKeyException : Illegal key size or default parameters 中的异常

这个问题在这里已经有了答案:InvalidKeyExceptionIllegalkeysize(6个答案)关闭4年前。下面的代码抛出了这个错误信息:线程“main”java.security.InvalidKeyException中的异常:非法key大小或默认参数Cipherdcipher;byte[]salt=newString("12345678").getBytes();intiterationCount=1024;intkeyStrength=256;SecretKeykey;byte[]iv;Decrypter(StringpassPhrase)throwsException

java - Spring Security OAuth2 - 如何使用 OAuth2Authentication 对象?

我有提供用户信息的OAuth2授权服务器:publicclassUserimplementsSerializable,UserDetails{privateLonguserID;privateStringusername;privateStringpassword;privateStringfullName;privateStringemail;privateStringavatar;privatebooleanenabled;//etc}@RestController@RequestMapping("/api")publicclassAPIController{@RequestMap

java - Spring Security - 注销期间的并发请求

我们在我们的Web应用程序中使用了SpringSecurity。大多数页面都是安全的,即用户必须登录才能访问这些页面。它通常工作正常。但是,我们在注销期间遇到了不希望的行为。假设用户已登录并向服务器发送请求以加载某个(安全)页面。在此请求完成之前,同一用户发送注销请求(即带有servlet_path“/j_spring_security_logout”的请求)。注销请求通常非常快,可以比前一个请求更早完成。当然,注销请求会清除安全上下文。因此,前一个请求在其生命周期的中间失去了安全上下文,这通常会导致异常。事实上,用户不需要“手动”启动第一个请求。这种情况可能发生在具有自动刷新功能的页

java - Mac OS X 上的 JRE lib/security 目录在哪里?

我需要生成一个证书,但找不到这个目录。谢谢! 最佳答案 在带有OracleJava8的Mavericks(OSX10.10)上,它看起来是:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/security 关于java-MacOSX上的JRElib/security目录在哪里?,我们在StackOverflow上找到一个类似的问题: https://stackove

java - Spring Security 如何添加/配置 AuthenticationManagerBuilder?

我正在研究基于SpringSecurityJava的配置。我已经创建了我自己的MyAuthenticationProvider,我想在ProviderManager中注册它(AuthenticationManager的单个实例)。我发现ProviderManager有一个提供商列表,我可以在其中注册我的单例MyAuthenticationProvider.这是我的配置的一部分:@Configuration@EnableWebSecuritypublicclassSecurityConfigextendsWebSecurityConfigurerAdapter{@Autowiredpub

java - Spring Security Java 配置

所以最近我将Spring配置从XML迁移到Java配置。它是一个SpringOAuth2服务器,一些端点通过客户端身份验证得到保护,一些端点(confirm_access)通过用户身份验证得到保护,用户身份验证被委托(delegate)给登录应用程序,并通过过滤器(“authenticationFilter”)进行重定向。但是我无法对SpringSecurityJava配置做同样的事情:这是我的工作安全XML配置:这是我的Java配置尝试:@Configuration@EnableWebSecurity@EnableGlobalMethodSecurity(prePostEnabled

java - Spring Security 中 PreAuthenticatedAuthenticationToken 的用途?

我正在使用UsernamePasswordAuthenticationToken对用户进行身份验证在SpringBoot中。我正在使用JJWT生成token对于该用户并将其返回。现在用户使用该token向我发送任何进一步的请求。解密token后我应该使用PreAuthenticatedAuthenticationToken并将其设置为SecurityContextHolder.getContext().setAuthentication()?PreAuthenticatedAuthenticationToken的用途是什么? 最佳答案