caddy-security icon indicating copy to clipboard operation
caddy-security copied to clipboard

question: documentation regarding API keys is a bit sparse

Open jariz opened this issue 3 years ago • 4 comments

I added an API key from the auth portal settings page at /settings, but now what? I passed it as a bearer token a la Authorization: Bearer API_KEY, but that does not seem to work.

The only doc page that mentions API keys is this one: https://authp.github.io/docs/authorize/basic_api_key_auth I have added with api key auth portal myportal realm local to my policy.

Is there something obvious I'm missing here? Or am I just not understanding what purpose API keys are supposed to serve? My goal is to make a never expiring API key that I can use to give external services access to my services behind the authorize directive.

Thanks in advance, this project is great @greenpau.

jariz avatar May 26 '22 14:05 jariz

@jariz , please share your config.

it is not “authorization Bearer”. Rather, pass X-API-Token header with the value of the key you’d created

greenpau avatar May 26 '22 15:05 greenpau

Hi @greenpau, thanks for your quick response.

X-API-Token did not work, but X-Api-Key did 😬 .

Maybe this should be documented a bit more? I can't find any mention of X-API-Key in the docs. I have heard about this header before, but I wouldn't say it's super obvious, perse.

Regardless, thanks!

jariz avatar May 26 '22 15:05 jariz

@jariz , let’s keep it open. Will address it next week

greenpau avatar May 26 '22 15:05 greenpau

@jariz , please help promote this project … if you like of course 😃

greenpau avatar May 26 '22 16:05 greenpau