{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/shield-custom-realm-example/issues/1","labels_url":"https://api.github.com/repos/elastic/shield-custom-realm-example/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/elastic/shield-custom-realm-example/issues/1/comments","events_url":"https://api.github.com/repos/elastic/shield-custom-realm-example/issues/1/events","html_url":"https://github.com/elastic/shield-custom-realm-example/issues/1","id":111583057,"number":1,"title":"Add header to authenticated request/messsage","user":{"login":"salyh","id":3762447,"avatar_url":"https://avatars.githubusercontent.com/u/3762447?v=3","gravatar_id":"","url":"https://api.github.com/users/salyh","html_url":"https://github.com/salyh","followers_url":"https://api.github.com/users/salyh/followers","following_url":"https://api.github.com/users/salyh/following{/other_user}","gists_url":"https://api.github.com/users/salyh/gists{/gist_id}","starred_url":"https://api.github.com/users/salyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salyh/subscriptions","organizations_url":"https://api.github.com/users/salyh/orgs","repos_url":"https://api.github.com/users/salyh/repos","events_url":"https://api.github.com/users/salyh/events{/privacy}","received_events_url":"https://api.github.com/users/salyh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-15T09:55:48Z","updated_at":"2015-10-15T13:04:05Z","closed_at":null,"body":"It seems currently not possible to add a header to an authenticated restrequest/transportmesssage. This is only possible in the AuthenticationFailureHandler when things go wrong. Adding headers to the final HTTP 200 message would be required for implementing GSSAPI mechanisms IMHO. Any plans/advices here? "},"comment":{"url":"https://api.github.com/repos/elastic/shield-custom-realm-example/issues/comments/148378123","html_url":"https://github.com/elastic/shield-custom-realm-example/issues/1#issuecomment-148378123","issue_url":"https://api.github.com/repos/elastic/shield-custom-realm-example/issues/1","id":148378123,"user":{"login":"jaymode","id":4339958,"avatar_url":"https://avatars.githubusercontent.com/u/4339958?v=3","gravatar_id":"","url":"https://api.github.com/users/jaymode","html_url":"https://github.com/jaymode","followers_url":"https://api.github.com/users/jaymode/followers","following_url":"https://api.github.com/users/jaymode/following{/other_user}","gists_url":"https://api.github.com/users/jaymode/gists{/gist_id}","starred_url":"https://api.github.com/users/jaymode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaymode/subscriptions","organizations_url":"https://api.github.com/users/jaymode/orgs","repos_url":"https://api.github.com/users/jaymode/repos","events_url":"https://api.github.com/users/jaymode/events{/privacy}","received_events_url":"https://api.github.com/users/jaymode/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T13:04:05Z","updated_at":"2015-10-15T13:04:05Z","body":"Hi @salyh,\r\n\r\nYou are correct. As realms are currently implemented, we do not intercept the responses of messages or have a way to add such a header on a success. We are looking at how we can enable this type of functionality.\r\n\r\nWhen you refer to GSSAPI, are you mainly thinking of HTTP SPNEGO based Kerberos(RFC 4559)? In terms of an immediate solution/workaround, this type of authentication can work without the final token in the HTTP 200 response. The proper solution though is to comply with the RFC and always send back the token if there is one to return."}}