security

Disabling Spring Security headers does not work

时光怂恿深爱的人放手 提交于 2021-02-08 12:18:48
问题 I need to disable the cache control headers in my Spring Security conf. According to the documentation a simple http.headers.disable() should do it, but I still see the Cache-Control:no-cache, no-store, max-age=0, must-revalidate Expires:0 Pragma:no-cache headers in responses. My current security config is: http.antMatcher("/myPath/**") // "myPath" is of course not the real path .headers().disable() .authorizeRequests() // ... abbreviated .anyRequest().authenticated(); Things I've tried so

What is the best way to organize files and folders in an object oriented PHP project? [closed]

☆樱花仙子☆ 提交于 2021-02-08 12:13:27
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . What is the best directory structures of an object oriented PHP project? taking security into consideration among the other factors. I

Prevent all outgoing requests from NodeJS server?

爱⌒轻易说出口 提交于 2021-02-08 10:59:46
问题 Is there any existing technique or npm package that can prevent all outgoing requests from a NodeJS server, allowing only responses to incoming requests? This could prevent phone-home type attacks in deep dependencies missed in security audits. 回答1: A firewall. That's truly the only way. Remember though that there is nothing stopping some code from accepting commands from clients connecting to it. 回答2: Have a look at http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single

Prevent all outgoing requests from NodeJS server?

纵然是瞬间 提交于 2021-02-08 10:59:36
问题 Is there any existing technique or npm package that can prevent all outgoing requests from a NodeJS server, allowing only responses to incoming requests? This could prevent phone-home type attacks in deep dependencies missed in security audits. 回答1: A firewall. That's truly the only way. Remember though that there is nothing stopping some code from accepting commands from clients connecting to it. 回答2: Have a look at http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single

Best practice to implement secure database for android device

谁都会走 提交于 2021-02-08 10:50:40
问题 I have implemented android database with sqlite and using content provider. But the data in my database is not encrypted. Is there any best practice to implement secure database for android device? I mean not just encrypt but also any Technics that can improve security to my apps. 回答1: If by "secure database" you mean "a database whose data is encrypted via a passphrase that you get from the user", I recommend SQLCipher for Android. 来源: https://stackoverflow.com/questions/20907182/best

Best practice to implement secure database for android device

风流意气都作罢 提交于 2021-02-08 10:49:39
问题 I have implemented android database with sqlite and using content provider. But the data in my database is not encrypted. Is there any best practice to implement secure database for android device? I mean not just encrypt but also any Technics that can improve security to my apps. 回答1: If by "secure database" you mean "a database whose data is encrypted via a passphrase that you get from the user", I recommend SQLCipher for Android. 来源: https://stackoverflow.com/questions/20907182/best

Not understanding JWT “Encryption”

家住魔仙堡 提交于 2021-02-08 10:35:13
问题 I have JWT up and running in PHP and Angular Clients. Everything works perfectly. But I'm still trying to understand something, security-wise, my Angular client doesen't know the key which was used to encrypt the JWT message in the server-side (PHP). Then, why can it decrypt without it? Shouldn't the key be important? 回答1: JWTs can be either signed, encrypted or both. If a token is signed, but not encrypted, everyone can read the contents of the token, but when you don't know the private key,

Is there a way to secure an API without login based authentication?

落花浮王杯 提交于 2021-02-08 10:18:25
问题 I'm currently developing an API for a website, but the website doesn't require logging in to use, so the API has to work without individual user authentication. The goal is to prevent the API from being used by a 3rd party. Is there a way to protect the API to only be used by my website, without using login authentication to prevent 3rd parties from calling the backend service. I've looked into CORS, but it doesn't seem like a strong guarantee. Another thought was a rotating API key. What is

Docker - is it safe to switch to non-root user in ENTRYPOINT?

纵饮孤独 提交于 2021-02-08 09:20:11
问题 Is it considered a secure practice to run root privileged ENTRYPOINT ["/bin/sh", entrypoint.sh"] , that later switches to non-root user before running the application? More context: There are a number of articles (1, 2, 3) suggesting that running the container as non-root user is a best practice in terms of security. This can be achieved using the USER appuser command, however there are cases (4, 5) when running the container as root and only switching to non-root in the an entrypoint.sh

How can I unset the session of a specific user?

冷暖自知 提交于 2021-02-08 09:10:43
问题 I have a session like this $_SESSION['login'] and when it is equal with 1 , it means the use is logged into my website: if ( $_SESSION['login'] == 1 ) { // You are logged } else { // login/register } Also I have another session which contains user's id. Something like this: echo $_SESSION["Id"]; /* It is containing the user's id (an integer number). Something like: 234124 */ Now I want to unset $_SESSION['login'] for the user who has a specific id. For example I want to unset($_SESSION['login