security

Signature length not correct: got 127 but was expecting 128

耗尽温柔 提交于 2020-01-01 09:16:21
问题 I am facing a strange problem after java 1.8 upgrade. I am using jsch-0.1.54.jar in one of our utility programs to download files from various places. This particular utility was being used for almost 4-5 years without any problem(back then it jsch-0.1.48). At that time environment was java 1.6. Recently we upgraded to java 1.8 and as a result we upgraded this particular utility. Now we are encountering a strange problem and it occurs occasionally, and most of the time the download of files

Bcrypt for password hashing because it is slow?

我只是一个虾纸丫 提交于 2020-01-01 09:07:14
问题 I read today on not-implemented.com : Sha-256 should be chosen in most cases where a high speed hash function is desired. It is considered secure with no known theoretical vulnerabilities and it has a reasonable digest size of 32 bytes. For things like hashing user password, though, a function designed to be slow is preferred: a great one is bcrypt. Can somebody explain the last sentence : For things like hashing user password, though, a function designed to be slow is preferred: a great one

Set “secure” flag on session cookie in RoR even over HTTP

那年仲夏 提交于 2020-01-01 08:54:14
问题 In a Rails app, the session cookie can be easily set to include the secure cookie attribute, when sending over HTTPS to ensure that the cookie is not leaked over a non-HTTP connection. However, if the Rails app is NOT using HTTPS, but HTTP only, it seems that it doesnt even set the cookie at all. While this does make some sense, in this scenario there is a seperate front end load balancer, which is responsible for terminating the SSL connection. From the LB to the Rails app, the connection is

SecurityContextHolder.getContext().getAuthentication() returning null

蓝咒 提交于 2020-01-01 08:33:35
问题 I want to manually bypass the user from spring Security using the following code: User localeUser = new User(); UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(localeUser ,null, localeUser .getAuthorities()); SecurityContext securityContext = SecurityContextHolder.getContext(); securityContext.setAuthentication(auth); // Create a new session and add the security context. HttpSession session = request.getSession(true); session.setAttribute("SPRING_SECURITY

SecurityContextHolder.getContext().getAuthentication() returning null

你。 提交于 2020-01-01 08:33:26
问题 I want to manually bypass the user from spring Security using the following code: User localeUser = new User(); UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(localeUser ,null, localeUser .getAuthorities()); SecurityContext securityContext = SecurityContextHolder.getContext(); securityContext.setAuthentication(auth); // Create a new session and add the security context. HttpSession session = request.getSession(true); session.setAttribute("SPRING_SECURITY

How is my data secure with firebase?

巧了我就是萌 提交于 2020-01-01 08:33:15
问题 I have been looking at the demos of Firebase and i am amazed at the functionality and flexibility to store data online. Also looked at the AngularJS Projects tutorial on its homepage, with Firebase as the backend. However, before starting to use it in my web application, i have few questions like: Where exactly is all my data stored? What if my data gets lost in the future due to hardware failure or any other issue? Will it be safe to rely on Firebase, for the security of my app data from

SecurityContextHolder.getContext().getAuthentication() returning null

和自甴很熟 提交于 2020-01-01 08:33:12
问题 I want to manually bypass the user from spring Security using the following code: User localeUser = new User(); UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(localeUser ,null, localeUser .getAuthorities()); SecurityContext securityContext = SecurityContextHolder.getContext(); securityContext.setAuthentication(auth); // Create a new session and add the security context. HttpSession session = request.getSession(true); session.setAttribute("SPRING_SECURITY

SecurityContextHolder.getContext().getAuthentication() returning null

。_饼干妹妹 提交于 2020-01-01 08:33:07
问题 I want to manually bypass the user from spring Security using the following code: User localeUser = new User(); UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(localeUser ,null, localeUser .getAuthorities()); SecurityContext securityContext = SecurityContextHolder.getContext(); securityContext.setAuthentication(auth); // Create a new session and add the security context. HttpSession session = request.getSession(true); session.setAttribute("SPRING_SECURITY

Username, Password, Salting, Encrypting, Hash - How does it all work? [duplicate]

六眼飞鱼酱① 提交于 2020-01-01 08:32:51
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Secure hash and salt for PHP passwords Iv'e read a lot of posts both in stackoverflow and other websites talking about web security. Such as salting encrypting etc. And I'm kinda not getting it so a simple explanation would be really helpful. So here's what I know so far. A user logs in types his username and password. The input then goes through a process. Lets say the username and password is combined like for

CSRF tokens - how to implement properly?

非 Y 不嫁゛ 提交于 2020-01-01 08:20:51
问题 I've just setup a simple CSRF protection in my application. It creates a unique crumb which are validated against a session value upon submitting a form. Unfortunately this means now that I can't keep multiple instances (tabs in the browser) of my application open simultaneously as the CSRF crumbs collide with each other. Should I create an individual token for each actual form or use a mutual, shared crumb for all my forms? What are common sense here? 回答1: You can do either. It depends on