Recently, most probaly in TeamCity update 9.1, there was a change that introduced a serious problem for my interactive script based on REST API.
That is: TeamCity server no longer returns correct "RememberMe" cookie after subsequent http requests.
How it worked prior to 9.1:
The first request for authentication, which contains login and password passed via basic authentication ( curl -u login:password ) does return TCSESSIONID cookie, but no RememberMe cookie.
However, if I send more requests with newly acquired TCSESSIONID, all further requests will also contain RememberMe cookie.
If I renew cookie file ( curl -b ./cookie -c ./cookie ), it allowed me to use a signle authentication for a very long time ( 2 weeks actually, and it got prolonged with each renew ), which is very convenient for an interactive script that is used every day.
How it works now:
All request, regardless of whether they contain login and password passed via basic authentication or existing TCSESSIONID cookie will either not return RememberMe at all, or return an empty one.
I wonder if it is possible to make TeamCity return RememberMe in curl requests as iit did before.
Also, I may actually be wrong regarding the statement taht 9.1 update changed this - possibly, it was not even an update, but some server settigns' changes. However, I do not know a way to verify it.
Lastly, I may add that RememberMe is correctly returned in normal authentication requests via GUI.
If I emulate such request via curl ( curl 'http://TeamCity-address/loginSubmit.html' --data-binary 'username=login&remember=true&_remember=&submitLogin=Log+in&publicKey=<...>&encryptedPassword=<...> ), I also get RememberMe cookie correctly, but I have no way of getting publicKey for encription in command line script, or at least I do not know a way to do it.