cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1648
Views
0
Helpful
2
Replies

Sending RESTCONF request on EC2 instance CSR 1000v

khalilmeb
Level 1
Level 1

I'm deploying CSR 1000v on EC2 instance in AWS.
I have enabled `RESTCONF` by the following CLI commands in the router:

csr1# configure terminal
csr1(config)# restconf
csr1(config)# ip http secure-server
csr1(config)# end

The RESTCONF is enabled:

ip-172-0-1-9#show platform software yang-management process 
confd : Running
nesd : Running
syncfd : Running
ncsshd : Not Running
dmiauthd : Running
nginx : Running
ndbmand : Running
pubd : Running

Then, I opened Postman in order to send a simple request in which:

- `host`: is the *EIP* of the router
- `port`: 443

I downloaded a JSON model sample from GitHub in order to use RESTCONF from here Github link
For the authorization, beforehand I created an IAM user and in Postman I passed the AccessKey and SecretKey which I got from IAM console.

Here what I got after sending the request:

{
"errors": {
"error": [
{
"error-tag": "access-denied",
"error-type": "protocol"
}
]
}
}

I have tried the same request on a router deployed in Cisco lab, and it was working. The difference is that in the Cisco lab, username and password were provided. Unless here, access to the EC2 must use SSH key. However, I tried to use IAM secret key and access key as username and password but still did not work.


[1]: https://github.com/CiscoDevNet/dnav3-code/tree/master/postman

1 Accepted Solution

Accepted Solutions

khalilmeb
Level 1
Level 1

I have managed to find the solution.

In the router:

(config)#user any-user-name privilege 15 secret supersecretpassword

Then, it worked!
Thanks to anyone who tried to help :) 

View solution in original post

2 Replies 2

khalilmeb
Level 1
Level 1

I have managed to find the solution.

In the router:

(config)#user any-user-name privilege 15 secret supersecretpassword

Then, it worked!
Thanks to anyone who tried to help :) 

aibrahim9386
Level 1
Level 1

I have also launched a CSR on an EC2 instance and am getting the same error. When I'm testing, I'm attempting to curl from another linux machine. The ultimate goal is for me to use wget in LAMBDA but am testing it from a Linux instance with python first. Any suggestions on how to send the username?