Authentication apparatus, authentication system, authentication method and storage medium
The first authentication unit of an authentication apparatus decides whether first authentication data exists in a received message, and performs, if it is decided that the first authentication data exists, authentication based on the first authentication data. The second authentication unit of the authentication apparatus decides whether second authentication data exists in the received message, and performs, if it is decided that the second authentication data exists, authentication based on the second authentication data. If the second authentication unit decides that no second authentication data exists in the received message, and the first authentication unit decides that authentication has succeeded, it is decided that authentication for the received message has succeeded.
1. A network camera, comprising:
at least one processor; and
at least one memory that stores a computer-readable instruction for causing, when executed by the at least one processor, the network camera to:
receive first authentication data and/or second authentication data from a client;
perform first authentication for the first authentication data using HTTP basic authentication scheme;
perform second authentication for the second authentication data using WS-Security authentication scheme;
execute, in a case where authentication for the second authentication data by the second authentication at least succeed, processing for a service corresponding to a request from the client;
notify the client of an error in a case where the second authentication data does not exist, even if the authentication using the HTTP basic authentication scheme for the first authentication data by the first authentication succeeds, and
notify the client of an error in a case where the authentication using the HTTP basic authentication scheme for the first authentication data by the first authentication fails.
2. The network camera according to claim 1 , wherein HTTP 401 error is notified as the error in a case where the second authentication data does not exist.
3. The network camera according to claim 1 , wherein the computer-readable instruction causes, when executed by the at least one processor, the network camera to notify the client of HTTP 400 error in a case where the authentication using the WS-Security authentication scheme for the second authentication data by the second authentication fails.
4. The network camera according to claim 1 , wherein HTTP 401 error is notified as the error in a case where the authentication using the HTTP basic authentication scheme for the first authentication data by the first authentication fails.
5. A method of controlling a network camera, the method comprising:
receiving first authentication data and/or second authentication data from a client;
performing first authentication for the first authentication data using HTTP basic authentication scheme;
performing second authentication for the second authentication data using WS-Security authentication scheme;
executing, in a case where authentication for the second authentication data by the second authentication at least succeed, processing for a service corresponding to a request from the client;
notifying the client of an error in a case where the second authentication data does not exist, even if the authentication using the HTTP basic authentication scheme for the first authentication data by the first authentication succeeds; and
notifying the client of an error in a case where the authentication using the HTTP basic authentication scheme for the first authentication data by the first authentication fails.
6. The method according to claim 5 , wherein HTTP 401 error is notified as the error in a case where the second authentication data does not exist.
7. The method according to claim 5 , further notifying the client of HTTP 400 error in a case where the authentication using the WS-Security authentication scheme for the second authentication data by the second authentication fails.
8. The method according to claim 5 , wherein HTTP 401 error is notified as the error in a case where the authentication using the HTTP basic authentication scheme for the first authentication data by the first authentication fails.
9. A non-transitory computer-readable storage medium storing a computer program for causing a network camera to:
receive first authentication data and/or second authentication data from a client;
perform first authentication for the first authentication data using HTTP basic authentication scheme;
perform second authentication for the second authentication data using WS-Security authentication scheme;
execute, in a case where authentication for the second authentication data by the second authentication at least succeed, processing for a service corresponding to a request from the client;
notify the client of an error in a case where the second authentication data does not exist, even if the authentication using the HTTP basic authentication scheme for the first authentication data by the first authentication succeeds; and
notify the client of an error in a case where the authentication using the HTTP basic authentication scheme for the first authentication data by the first authentication fails.
10. The non-transitory computer-readable storage medium according to claim 9 , wherein HTTP 401 error is notified as the error in a case where the second authentication data does not exist.
11. The non-transitory computer-readable storage medium according to claim 9 , wherein the computer program further causes the network camera to notify HTTP 400 error in a case where the authentication using the WS-Security authentication scheme for the second authentication data by the second authentication fails.
12. The non-transitory computer-readable storage medium according to claim 9 , wherein HTTP 401 error is notified as the error in a case where the authentication using the HTTP basic authentication scheme for the first authentication data by the first authentication fails.