SSO Login is being implemented on this site. Existing users: Your existing password must be reset the first time you login using SSO. Click here to reset your password first before login. Your new username will be your email.

API & Integration, DevOps,NetOps,SecOps

Reply

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

[ Edited ]
Techie
Posts: 4
1701     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)

Adviser
Posts: 113
1702     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
1702     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: 162
1702     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
1702     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
1702     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