security

What are the ways to secure an AJAX request?

自古美人都是妖i 提交于 2021-02-08 08:54:49
问题 I have a client that makes an AJAX call to categorize a URL. It will call myserver.php?url=facebook.com and the server would respond Social. There are no passwords involved and just a URL string for which the server would return a category. We have built a large database for url categories and I don't want people calling this API and stealing the data. What are the ways I can make sure that the request I'm getting at the server is my client? Would setting a request limits per IP work on the

How exactly TLS/SSL works regarding client certificate?

无人久伴 提交于 2021-02-08 08:23:20
问题 I read the TLS 1.2 RFC, but i couldn't find (or understand) how client certificate authentication works. What i understood is that the server may request the client certificate and the client should provide it, but what exactly does it provide? How does the client prove he owns the private key (I assume he gets some challenge and encrypts it, but what exactly does he encrypt)? I will be happy if someone could shed some light on this part of the protocol. EDIT : What i'm trying to achieve is

How to use implement AES_DECRYPT() of MySQL by Python

*爱你&永不变心* 提交于 2021-02-08 08:15:16
问题 I am trying to write a python code which has same functionarities of AES_ENCRYPT and AES_DECRYPT of MySQL. https://dev.mysql.com/doc/refman/5.6/ja/encryption-functions.html I want to encrypt and decrypt data between MySQL and Python. For example, I want to decrypt data by python, which is encrypted by AES_ENCRYPT of MySQL. And I want to decrypt data by AES_DECRYPT of MySQL, which is encrypted by Python vice versa. I found a example of AES_ENCRYPT in Python. https://www.maykinmedia.nl/blog

How to use implement AES_DECRYPT() of MySQL by Python

喜你入骨 提交于 2021-02-08 08:14:04
问题 I am trying to write a python code which has same functionarities of AES_ENCRYPT and AES_DECRYPT of MySQL. https://dev.mysql.com/doc/refman/5.6/ja/encryption-functions.html I want to encrypt and decrypt data between MySQL and Python. For example, I want to decrypt data by python, which is encrypted by AES_ENCRYPT of MySQL. And I want to decrypt data by AES_DECRYPT of MySQL, which is encrypted by Python vice versa. I found a example of AES_ENCRYPT in Python. https://www.maykinmedia.nl/blog

Restricting dynamically loaded classes and jars based on a security policy

断了今生、忘了曾经 提交于 2021-02-08 07:42:33
问题 I would like to dynamically load a set of jars or classes (i.e. plugins loaded at runtime). At the same time, I would like to restrict what these plugins are able to do in the JVM. For a test case, I would like to restrict them to pretty much everything (right now I'm just allowing one System.getProperty value to be read). I am currently using a security policy file, but I'm having difficulty specifying a policy for one folder or package in my codeBase, but not another. Here is how my policy

How to get the authenticated user name in Python when fronting it with IIS HTTP PlatformHandler and using Windows auth?

久未见 提交于 2021-02-08 07:40:48
问题 HttpPlatformHandler supports forwarding the auth token by enabling the forwardWindowsAuthToken setting in the web.config. This sounds like a useful feature when needing to use Windows Integrated Authentication. The document on this is very vague and does not go into explaining how one could use this token to get the authenticated user name. If this setting is set to true, the token will be forwarded to the child process listening on %HTTP_PLATFORM_PORT% as a header 'X-IIS-WindowsAuthToken'

How can I prevent a user using inspect element to enable a disabled element?

三世轮回 提交于 2021-02-08 03:42:27
问题 I have a button as follows: <input type="submit" class="button" value="FooBar" name="FooBar" id="FooBar" disabled="disabled"> I am enabling this button only when certain parameters are met. To test whether it was secure, I pressed F12 (or right click -> Inspect Element) and edited out the text disabled="disabled" . Doing this overrides my code and that is scary. How can I prevent someone from changing it in this manner? I am using php and jquery in this page and using the latter to enable or

How can I prevent a user using inspect element to enable a disabled element?

感情迁移 提交于 2021-02-08 03:41:03
问题 I have a button as follows: <input type="submit" class="button" value="FooBar" name="FooBar" id="FooBar" disabled="disabled"> I am enabling this button only when certain parameters are met. To test whether it was secure, I pressed F12 (or right click -> Inspect Element) and edited out the text disabled="disabled" . Doing this overrides my code and that is scary. How can I prevent someone from changing it in this manner? I am using php and jquery in this page and using the latter to enable or

Distributing and using API-keys for web-applications

我怕爱的太早我们不能终老 提交于 2021-02-07 20:34:59
问题 I have a web-application for which I'm building a Drupal module that allows my customers to access certain data on my application. I intend to distribute secret API-keys to my customers who need to enter that value in their copy of the Drupal module. This Drupal module then talks to my web-application, but I need to make sure that the POST requests are indeed coming from that source. How can this 'secret key' be used to pass some information that when my application receives it, it knows: (a)

How would you implement a secure static login credentials system in Java?

时光毁灭记忆、已成空白 提交于 2021-02-07 20:28:36
问题 We recently had a security audit and it exposed several weaknesses in the systems that are in place here. One of the tasks that resulted from it is that we need to update our partner credentials system make it more secure. The "old" way of doing things was to generate a (bad) password, give it to the partner with an ID and then they would send that ID and a Base 64 encoded copy of that password in with all of their XML requests over https. We then decode them and validate them. These