rundeck / rundeck-api-java-client

Java client for the Rundeck REST API
http://rundeck.github.com/rundeck-api-java-client
Apache License 2.0
13 stars 17 forks source link

Fix #6 Authentication test incorrectly uses POST after redirect #34

Open Sylvain-Bugat opened 9 years ago

Sylvain-Bugat commented 9 years ago

Fix issue #6, this error occurs only when authenticating with user/password and when the Rundeck host is wrong (IP adresses or "localhost" if hostname is defined).

The fix consits of restarting the authentication sequence if the real Rundeck hostname is different when receiving a HTTP redirect 302 in response of an authentication POST. Because the JSESSIONID cookie is lost if the hostname change during the authentication redirect sequence (debugged with Wireshark).

This fix has been tested successfully with Rundeck Monitor using login/password authentication and IP address instead of Rundeck server host.