TeamCity provides an AuthorizationInterceptor interface in its Open API, which you can enter into your plugin code, which allows you to control the authorization requirement,
shamelessPlug This is what I used when writing the tcMonitor ./ShamelessPlug status page
Here is a sample code on how to use it:
public StatusPageController(SBuildServer server,
AuthorizationInterceptor authorizationInterceptor,
UrlMapping urlMapper) {
authorizationInterceptor.addPathNotRequiringAuth(myUrl);
source
share