Consider an API that receives HTTPS requests, and uses HTTP basic authentication. Whenever it receives a request, the application needs to check whether the username/password combination in the header is valid. There can be thousands of users, each one with their own keys.
I'm wondering if Google Secret Manager is suitable for this use case. That is:
- I could store each API username/password in Secret Manager, using the username as secret ID.
- Then, whenever a request comes in, the application would: (1) lookup the credential for the username present in the Authorization header, (2) compare the header password with the one retrieved from Secret Manager, (3) reject the request if there is a mismatch.
Would Google Secret Manager be efficient and advisable for the case described above?