Are you interested in our Early Access Program (EAP)? This program allows you to preview code, test in your lab and provide feedback prior to General Availability (GA) release of all Infoblox products. If so, please click the link here.

API & Integration, DevOps,NetOps,SecOps

Reply

Unable to Access infoblox API from CLI (Curl/Automation)

[ Edited ]
Techie
Posts: 4
2006     0

Hi Team,

While doing some automation tasks, we noticed the infoblox API is not accessible from cli using curl or other tools. (We are not sure this is the right issue yet; please see scenario below)

 

$ curl -k -s \
  -H 'content-type: application/json' \
  -X GET \
  --user username:password \
  "https://INFOBLOX_IP/wapi/v2.9/record:rpz:a?zone=my-list07&_return_as_object=1&name=exampleurl.org.my-list07" 


- API is working from a browser window - we can access WAPI after username/password authentication.
- But the same API is not able to access from another machine using curl (auth is happening but says Forbidden)

- Firewall/route are fine as the API is resonding with Error message after Authentication (Forbidden)

 

Any idea if there is any whitelisting of source IP to access the API ?

 

Note: We have tested with another test infoblox machine, and no such issues. So, this is something to do with current production infoblox node (we guess)

 

Thank you in advance.

Re: Unable to Access infoblox API from CLI (Curl/Automation)

Superuser
Posts: 115
2007     0

Can you please post the curl example Smiley Happy

 

Change your password to "password"

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

https://sifbaksh.com

Re: Unable to Access infoblox API from CLI (Curl/Automation)

Techie
Posts: 4
2007     0

Hi @SBaksh,

Thank you for replying. 

 

I missed to add that in hurry, updated the question with `curl` sample.

Thank you in adavnce.

Re: Unable to Access infoblox API from CLI (Curl/Automation)

Community Manager
Community Manager
Posts: 184
2007     0

At first glance your example looks good.  I ran it against my gridmaster and it returns an empty list (which is what I expected).

 

Can you check if there is an ACL configured on the grid manager, which prevents access from your IP address:

 

named-acl.png

 

Also check if your account is in a group that doesn't have API permissions:

 

api-access.png

 

Or your account doesn't have access to RPZ records, either by not given access, or by denying access:

 

rpz-access.png

 

 

Re: Unable to Access infoblox API from CLI (Curl/Automation)

Techie
Posts: 4
2007     0

Thank you so much @MRichard,
Sure, I will check this and update back.

Re: Unable to Access infoblox API from CLI (Curl/Automation)

Techie
Posts: 4
2007     0

@MRichard, Thank you.

Here see the update:

- We have checked all those items and everything found normal.

- Luckily we noticed some automated proxy settings in system which was causing this issue !!!. So tried with -x "" in curl and it worked. 

 

thank you again for sharing those trubleshooting tips. 

 

#staysafe

Showing results for 
Search instead for 
Did you mean: 

Recommended for You