Giter Site home page Giter Site logo

Comments (8)

ndejong avatar ndejong commented on July 19, 2024

Hi Masifpak,

Your question is not entirely clear to me, I'll attempt to answer as best I can, perhaps you could ask again with more description on what you are having trouble with.

= the identifier of the API key, this is simply an reference value there is nothing secret about it
= the secret value associated with the keep this value private, also, in order to prevent poor choices there are (pedantic) rules around what values are valid here, have a read in the provided sample credentials file /etc/fauxapi/credentials.ini

NB: you MUST set your own and value before you'll be able to use the fauxapi.

Also, try adding __debug=true to the end of your curl request to obtain extra debug information that should help you in determining where the problem is - your request URL would hence become:-

https://192.168.10.10/fauxapi/v1/?action=config_get&__debug=true

from pfsense_fauxapi.

masifpak avatar masifpak commented on July 19, 2024

Here is my credential.ini file. How can this help me in
curl -X GET --silent --insecure --header "fauxapi-auth: PFFA4797d073:20161119Z144328:833a45d8:9c4f96ab042f5140386178618be1ae40adc68dd9fd6b158fb82c99f3aaa2bb55" "https://192.168.10.10/fauxapi/v1/?action=config_get&_debug=true"
I have also tried &_debug=true but nothing happen. Just execute the command without any output or error. Should it not working?
image

[PFFAexample01]
secret = abcdefghijklmnopqrstuvwxyz0123456789abcd
owner = Example01 Firstname Lastname
[PFFAexample02]
secret = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCD
owner = Example02 Firstname Lastname

from pfsense_fauxapi.

masifpak avatar masifpak commented on July 19, 2024

I have also tried like this.

image

from pfsense_fauxapi.

masifpak avatar masifpak commented on July 19, 2024

In below, i am using random apikey and apisecret and facing the following problem
image

from pfsense_fauxapi.

masifpak avatar masifpak commented on July 19, 2024

What is the purpose of Owner. Can i use these same apikey and apisecret?

from pfsense_fauxapi.

phase5 avatar phase5 commented on July 19, 2024

Hi Masifpak,

Based on the credential.ini you posted above, could I point you to the following sentence from the documentation: -

The two sample FauxAPI keys (PFFAexample01 and PFFAexample02) and their associated secrets in the sample credentials.ini file are hard-coded to be inoperative, you must create entirely new values before your client scripts will be able to issue commands to FauxAPI.

Before anything else, you need to add your own credential. for example: -

[PFFAmasifpak1]
secret = abcdefghijklmnopqrstuvwxyz0123456789abcd
owner = Hello my name is masifpak

As far as I am aware, the owner field is purely for display purposes. (I think it is like a comment)

Hope that is of some use.

from pfsense_fauxapi.

ndejong avatar ndejong commented on July 19, 2024

Hi Masifpak,

I've updated the documentation and provided an easy command line example to automatically generate credentials that will be valid:-

apikey_value

$ echo PPFA`head /dev/urandom | base64 -w0 | tr -d /+= | head -c 20`

apisecret_value

$ echo `head /dev/urandom | base64 -w0 | tr -d /+= | head -c 60`

Hope that clears things up for you

from pfsense_fauxapi.

fahadalishah0102 avatar fahadalishah0102 commented on July 19, 2024

Hi,
I am facing some confusion regarding this play how to create API string i am trying to sync this firewall with 3rd party tool.

Here is my Credentials. ini file config.

;; PFFAexample01 is hardcoded to be inoperative
[PFFAfahad09800552]
secret = 8897562242abcdefghijklmnopqrtsuvwxyz09812345
permit = alias_, config_, gateway_, rule_, send_, system_, function_*
comment = PFFAfahad09800552 - hardcoded to be inoperative

How i can check this one working? What is the roll of Python in it? What next configuration i need to do after this? How this API string create in below format?

fauxapi-auth: PFFA4797d073:20161119Z144328:833a45d8:9c4f96ab042f5140386178618be1ae40adc68dd9fd6b158fb82c99f3aaa2bb55

Is this example Auth ??

from pfsense_fauxapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.