Answer the question
In order to leave comments, you need to log in
How to securely store the authentication key?
There is a small php application that connects to an external service using Bearer Authentication
and receives data.
Send headers
...
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $key,
],
...
Answer the question
In order to leave comments, you need to log in
Even from the point of view of common sense, this is impossible. Even if you cunningly encrypt your key, the script will eventually have it in the clear, no one will prevent an attacker from intercepting it at this last moment when it is decrypted.
securely store the keyCan be stored in store in Hashicorp Vault, API access.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question