Answer the question
In order to leave comments, you need to log in
How to secure a web service (API)
Good afternoon.
There is a web service on php-apache (self-written, a bit like this one ). Service for working with the MySql database. The service is needed because hosting often has problems with the availability of the database remotely (not localhost). It is necessary to register IP and other inconveniences. The program in C# will work with the service.
Actually the question is: How to protect a web service from other people's Evil
Answer the question
In order to leave comments, you need to log in
what to encrypt?
send the key, php checks it, if it is incorrect, sends nothing, if it is correct, it sends the data.
@mark_ablov
It seems to me that AES won't protect against an attacker cloning legitimate requests. There is no randomized connection establishment (as in SSL), no timestamps with a check for repetitions, as described in the topicstarter link.
A self-signed CA certificate and the client authentication certificates issued by it, works at the Apache level, a client without a certificate will receive a 401 error and will not see anything. You can make as many client certificates as you like, they can also be revoked through the revocation list. Also, in the Common Name of the certificate, you can specify any data that identifies the user in the system, i.e. The certificate can be used for both authentication and authorization.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question