Fibre Channel (SAN)

Reply
New Contributor
Posts: 2
Registered: ‎11-18-2015

Does anyone know why my BNA's REST API WStoken stays valid after logout?

[ Edited ]

Hi,

 

After successfully connected to a BNA server I received a WStoken to help me with the queries.

After retrieving all of the data I needed, I logged out using the /logout API and received the HTTP status code of 204.

Why does the BNA server allow me to continue querying the API after I logged out and does not tell me the token is invalid?

 

$ curl -ks -X POST -H "WSUsername:Admin" -H "WSPassword:AdminPass" -H "Accept:application/vnd.brocade.networkadvisor+json;version=v1" -i https://1.1.1.1/rest/login
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
WStoken: uwDqBAwAHj6pTzulmONxNoawBXw=
Content-Type: application/vnd.brocade.networkadvisor+json;version="v1"
Content-Length: 251
Date: Wed, 18 Nov 2015 19:19:32 GMT

{"serverName":"Win2012Template","serverIp":"1.1.1.1"}

$ curl -ks -X GET -H "WStoken:uwDqBAwAHj6pTzulmONxNoawBXw=" -H "Accept:application/vnd.brocade.networkadvisor+json;version=v1" https://1.1.1.1/rest/resourcegroups/All/fcswitches
{"fcSwitches":[],"startIndex":null,"itemsPerPage":null,"totalResults":null}

$ curl -ks -X POST -H "WStoken:uwDqBAwAHj6pTzulmONxNoawBXw=" -H "Accept:application/vnd.brocade.networkadvisor+json;version=v1" -i https://1.1.1.1/rest/logout
HTTP/1.1 204 No Content
Server: Apache-Coyote/1.1
Date: Wed, 18 Nov 2015 19:20:04 GMT


$ curl -ks -X GET -H "WStoken:uwDqBAwAHj6pTzulmONxNoawBXw=" -H "Accept:application/vnd.brocade.networkadvisor+json;version=v1" https://1.1.1.1/rest/resourcegroups/All/fcswitches
{"fcSwitches":[],"startIndex":null,"itemsPerPage":null,"totalResults":null}
New Contributor
Posts: 2
Registered: ‎11-18-2015

Re: Does anyone know why my BNA's REST API WStoken stays valid after logout?

This doesn't happen on my other BNA server that is not on it's trial period

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.

vADC is now Pulse Secure
Download FREE NVMe eBook