ndejong / pfsense_fauxapi

REST based API interface for pfSense 2.3.x and 2.4.x to facilitate devops
Apache License 2.0
354 stars 61 forks source link

Authentication Failed even when apikey is in configuration.ini #25

Closed Jgerardopine closed 6 years ago

Jgerardopine commented 6 years ago

Hi,

I am faicng an authenticaiton issue. I get the following error

{"ERROR":"20180712Z175234 :: apikey not defined in credential file","DATA":{"apikey":"PFFAzM7GB9aBoXSEwsAH6tZV","filename":"\/etc\/fauxapi\/credentials.ini"},"source":"fauxapi"}

My configuraiton.ini (/etc/fauxapi/configuration.ini) has the following:

[PFFAzM7GB9aBoXSEwsAH6tZV]
secret= zvhBVMGdUF3V03fJLFyMkdOTpMB7uLARwbrZm6g1DXLOPOjqOKe5oMIhOo7t
permit = permit = alias_*, config_*, gateway_*, rule_*, send_*, system_*, function_*
comment = admin token

And this is the curl call:

curl -X GET --silent --insecure --header "fauxapi-auth: PFFAzM7GB9aBoXSEwsAH6tZV:20180712Z174348:833a45d8:ae6af6e76532ca8c37edceb87f492ca827387c250998125265909b7834271961" "https://172.16.20.20/fauxapi/v1/?action=config_get&__debug=true"

I changed the values several times and the error still appears. Could you please provide some guidance on what may be wrong?

Jgerardopine commented 6 years ago

Hi, apparently it was a problem with some packages missing in my environment. I redeploy my container with some needed packages and it worked perfecly.

This can be closed

ndejong commented 6 years ago

Thanks for keeping the thread up-to-date - before I close out and for the benefit of others, do you recall which packages were missing and from where?