cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

This community is for technical, feature, configuration and deployment questions.
For production deployment issues, please contact the TAC! We will not comment or assist with your TAC case in these forums.
Please see How to Ask the Community for Help for other best practices.

1010
Views
5
Helpful
3
Replies
Michal Garcarz
Cisco Employee

Pxgrid 2.0 API - AccountCreate Authentication failing

Hello Team,

I wanted to use a new API to create pxgrid consumer consuming MNT session data:

https://github.com/cisco-pxgrid/pxgrid-rest-ws/wiki/pxGrid-Consumer

I do not really understand this documentation: how to authenticate.

How exactly should i construct this header:

Authorization: Basic [nodeName]:[password if password-based authentication, otherwise empty string]

What is nodeName ? How should i get the password ? Should not the password be received as a result of AccountCreate call (while this is the first step at the same time) ? Chicken and egg problem ?

 

When trying to use basic http auth for admin or admin_ers (those are working fine for all other ERS API calls)

I do receive:

Screen Shot 2018-08-28 at 17.21.39.pngPassword auth enabled in ISE/pxgrid.

Could you please help here ?

Thanks,

Michal

 

UPDATE: OK, got it solved, AccountCreate role does not require authentication and the header should not be attached at all, thanks !

1 ACCEPTED SOLUTION

Accepted Solutions
hslai
Cisco Employee

Please note that the pxGrid API is totally different from ISE ERS API.

It says under the section "pxGrid account authentication",

...

Password-based authentication requires AccountCreate first to obtain a password, and then perform AccountActivate using the credentials obtained.

...

 

For example,

 

curl -X POST -k -H 'Content-Type: application/json' -H 'Accept: application/json' -i 'https://myISE:8910/pxgrid/control/AccountCreate' --data '{
"nodeName":"myTestNodeName1"
}'

View solution in original post

3 REPLIES 3
hslai
Cisco Employee

Please note that the pxGrid API is totally different from ISE ERS API.

It says under the section "pxGrid account authentication",

...

Password-based authentication requires AccountCreate first to obtain a password, and then perform AccountActivate using the credentials obtained.

...

 

For example,

 

curl -X POST -k -H 'Content-Type: application/json' -H 'Accept: application/json' -i 'https://myISE:8910/pxgrid/control/AccountCreate' --data '{
"nodeName":"myTestNodeName1"
}'

View solution in original post

I am trying to get this working for LiveAction in ISE 2.1.  I am trying to do the AccountCreate function but I keep getting 401 Unauthorized error.  The AccountCreate is not supposed to require authorization.

 

I have the following in Postman:

 

Capture.JPG

 

Capture.JPG

 

I am getting this back in the body of the response:

 <body>
        <h1>HTTP Status 401 - Full authentication is required to access this resource</h1>
        <div class="line"></div>
        <p>
            <b>type</b> Status report
        </p>
        <p>
            <b>message</b>
            <u>Full authentication is required to access this resource</u>
        </p>
        <p>
            <b>description</b>
            <u>This request requires HTTP authentication.</u>
        </p>
        <hr class="line">
        <h3></h3>
    </body>

 

I have password based accounts creation enabled.  What am I missing?

Hi Paul,

 

Yep, that is correct, no authentication, it looks perfectly fine, i have the same and it's working fine:

Screen Shot 2018-12-10 at 16.29.26.png

 

 

I do believe you might be using too old version of ISE (2.1) where that API was not yet really there, i remember to have some challenges in 2.3 - upgraded to 2.4 and have it working fine.

 

Cheers,

Michal

Create
Recognize Your Peers
Polls
Which of these topics should we host an event in the Community?

Top Choice: pxGrid (39%)

Content for Community-Ad

ISE Webinars



Did you miss a previous ISE webinar?

CiscoISE YouTube Channel