Since bcrypt provides a high level of security, we'd like to continue to use it for authentication. However, since it is known to be extremely slow, we should cache the authentication result after the first authentication attempt.
The design would look something like:
irst auth attempt should use the bcrypt module to check the integrity of the given API key. If successful, cache the result in redis (details to follow). If a failure, cache nothing. This provides protection against brute-forcing attacks while speeding up future authentications.
Since
bcryptprovides a high level of security, we'd like to continue to use it for authentication. However, since it is known to be extremely slow, we should cache the authentication result after the first authentication attempt.The design would look something like:
irst auth attempt should use the
bcryptmodule to check the integrity of the given API key. If successful, cache the result in redis (details to follow). If a failure, cache nothing. This provides protection against brute-forcing attacks while speeding up future authentications.