[CONTROLLER-853] API Explorer needs to authenticate for API calls Created: 18/Sep/14  Updated: 16/Jun/15  Resolved: 16/Jun/15

Status: Resolved
Project: controller
Component/s: restconf
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Liem Nguyen Assignee: Ryan Goulding
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 1942
Priority: Normal

 Description   

If AAA is installed/enabled, the API Explorer "Try out" functionality will return a 401 (unauthorized), because Restconf requires authentication.

To authenticate, there are 2 methods:

1) Allow a token header to be submitted (similar to the api_key in SwaggerUI) with the request. The token is in the form of: "Authorization: Bearer <token>". The token can be retrieved by doing a POST to AAA as such:

curl -s -d 'grant_type=password&username=admin&password=admin&scope=sdn' http://<controller>:8181/oauth2/token

2) Use basic auth with "admin/admin".

The first method is preferred.



 Comments   
Comment by Ryan Goulding [ 16/Jun/15 ]

I tried this out with odl-aaa-authn installed, and I am able to "Try it out!" just fine. This was likely fixed but never closed.

Generated at Wed Feb 07 19:54:02 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.