Comments (14)
1/ Make sure you follow what is described in https://github.com/ndejong/pfsense_fauxapi#api-authentication
2/ Make sure your API key follows the rules in credentials.ini
3/ Enable debugging by using &__debug=true
to your API call so that you get logs in pFsense / Status / System Logs. Those logs is the first place to go as they provide very useful information for troubleshooting.
from pfsense_fauxapi.
Hello jullienl,
I am using the same version but i am lil bit confuse how to use this ?
I have done what ever describe on web but unable to execute it properly authetication failed can you please help me out.
from pfsense_fauxapi.
I don't know about your Pytest issue but for the HTTP request header, it is used for the API authentication so you need to build a valid HTTP header with the requested fauxapi-auth
parameter, the value of fauxapi-auth
must use the following format: <apikey>:<timestamp>:<nonce>:<hash>
.
Then this header must be used with your CURL request like:
curl \
-X GET \
--silent \
--insecure \
--header "fauxapi-auth: PFFA4797d073:20161119Z144328:833a45d8:9c4f96ab042f5140386178618be1ae40adc68dd9fd6b158fb82c99f3aaa2bb55" \
"https://<host-address>/fauxapi/v1/?action=system_stats"
from pfsense_fauxapi.
@jullienl thanks for assisting @fahadalishah5 - I've trimmed his comments to keep this ticket focused on your issue.
The latest release https://github.com/ndejong/pfsense_fauxapi/releases/tag/v1.3_4 does pass all tests against an earlier pfSense 2.4.4 - I notice you are running p3 which is probably the first place to start looking for me.
I wonder if you are easily able to test against an "earlier" 2.4.4 to confirm? Not essential but would just be helpful to know where to start tracking this down.
from pfsense_fauxapi.
from pfsense_fauxapi.
Thanks @ndejong
I need to check if I can easily downgrade my pfsense without impacting too many things
from pfsense_fauxapi.
@jullienl were you able to resolve your issue here?
from pfsense_fauxapi.
from pfsense_fauxapi.
Has this API issue been resolved in 2.4.5 or 2.5.0 ? I cannot find any fix reference in the Release Notes
from pfsense_fauxapi.
from pfsense_fauxapi.
@jullienl looking at your report again, FauxAPI was updated recently to v1.4 which may not (yet) address this issue.
Re-reading the description of the issue you have I'm wondering if what you are describing is that after the confg_reload
your services have not picked up the new configuration(s) - is this the case or are you experiencing something else? The reason I ask is that there is a good chance an appropriate send_event
will resolve this which might make sense to add into the config_reload
by default
I know it's been a while but if you are still able to check it out and report back that would be awesome
from pfsense_fauxapi.
Yes this the case, my services did not pick up the new configuration while the API config_reload
call was successful. Sadly I ended using a system reboot to active the new config:
# Reload the pfsense config to validate the patch config change --- NOT WORKING !!!!
# $response = Invoke-WebRequest -Uri "https://$pfsense/fauxapi/v1/?action=config_reload&__debug=true" -Headers $headers -Method GET
# Restarting pfsense instead to activate the new config
$response = Invoke-WebRequest -Uri "https://$pfsense/fauxapi/v1/?action=system_reboot&__debug=true" -Headers $headers -Method GET
from pfsense_fauxapi.
I am having the same issue too. Is there an eta on this fix?
from pfsense_fauxapi.
@ndejong @jullienl
Hello!
I have the same problem, using python pkg: pfsense-fauxapi:
pfs_config = api.config_get()
# Add new acl rule to forwarding backend in haproxy config
new_acl_item = {...}
pfs_config["installedpackages"]["haproxy"]["ha_backends"]["item"][0]["ha_acls"]["item"].insert(0, new_acl_item)
api.config_set(pfs_config)
Tried to envoke
api.config_reload()
api.send_event("service restart haproxy")
It doesn't help.
New configuration starts to work only if I go to Pfsense UI Services / HAProxy / Frontends and click "Save" configuration and apply it.
Is any way to replay this actions with programming?
Will you fix this problem?
from pfsense_fauxapi.
Related Issues (20)
- Can't delete last element of the static map (DHCP Server) HOT 1
- Package Manager "error" after installation HOT 1
- Wake On LAN via fauxapi
- Allow UNIX timestamp auth HOT 1
- Kill states after enabling of rule HOT 1
- pfSense 2.4.4-p3 - URL table alias updating broken (simple fix) HOT 2
- Not executing commands until web browser refresh HOT 8
- Example to add new users and move to member groups HOT 1
- make firewall rule with python fauxapi HOT 2
- pfsense 2.5.x official repo? HOT 3
- Set timeout HOT 3
- fetch : bad request HOT 1
- Instruction Update HOT 2
- config_set does update but new Virtual IP is not added HOT 1
- apikey_value generation HOT 7
- Hash is marked as invalid unless lowercase
- Need to use GUI to save freeradius ?
- List of supported items for config_item_set
- Authentication failed, even though credentials were added HOT 1
- function_call: service_control_stop($name, $extras) not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pfsense_fauxapi.