{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes-client/java/issues/458","repository_url":"https://api.github.com/repos/kubernetes-client/java","labels_url":"https://api.github.com/repos/kubernetes-client/java/issues/458/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes-client/java/issues/458/comments","events_url":"https://api.github.com/repos/kubernetes-client/java/issues/458/events","html_url":"https://github.com/kubernetes-client/java/issues/458","id":388209954,"node_id":"MDU6SXNzdWUzODgyMDk5NTQ=","number":458,"title":"AzureActiveDirectoryAuthenticator: invalid token after refresh","user":{"login":"briansolo1985","id":6793849,"node_id":"MDQ6VXNlcjY3OTM4NDk=","avatar_url":"https://avatars1.githubusercontent.com/u/6793849?v=4","gravatar_id":"","url":"https://api.github.com/users/briansolo1985","html_url":"https://github.com/briansolo1985","followers_url":"https://api.github.com/users/briansolo1985/followers","following_url":"https://api.github.com/users/briansolo1985/following{/other_user}","gists_url":"https://api.github.com/users/briansolo1985/gists{/gist_id}","starred_url":"https://api.github.com/users/briansolo1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briansolo1985/subscriptions","organizations_url":"https://api.github.com/users/briansolo1985/orgs","repos_url":"https://api.github.com/users/briansolo1985/repos","events_url":"https://api.github.com/users/briansolo1985/events{/privacy}","received_events_url":"https://api.github.com/users/briansolo1985/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-06T13:18:06Z","updated_at":"2018-12-07T06:18:05Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI'm a bit stuck with AzureActiveDirectoryAuthenticator. After the current access token expires, AzureActiveDirectoryAuthenticator manages to request a new token, which seems to be invalid apparently.\r\n\r\nI can see the following with debug turned on:\r\n`2018-12-06 14:10:17 INFO  AuthenticationAuthority:149 - [Correlation ID: ec162ffd-1a9f-43b8-b1b4-8f0e416fe4d6] Instance discovery was successful\r\n2018-12-06 14:10:19 DEBUG AuthenticationContext:91 - [Correlation ID: ec162ffd-1a9f-43b8-b1b4-8f0e416fe4d6] Access Token and Refresh Token were returned\r\n--> GET https://{ip}:6443/api/v1/namespaces/{nd}/pods/{pod}/exec?stdin=true&stdout=true&stderr=true&tty=true&container=server&command=ls&command=-alh&command=%2Ftmp HTTP/1.1\r\nauthorization: Bearer {new_token_returned_by_azure_authenticator}\r\nSec-WebSocket-Protocol: v4.channel.k8s.io\r\nUser-Agent: Swagger-Codegen/1.0-SNAPSHOT/java\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Key: havfMC/uy3lc2dMDFKB+Ng==\r\nSec-WebSocket-Version: 13\r\n--> END GET\r\n<-- HTTP/1.1 401 Unauthorized (1108ms)\r\nContent-Type: application/json\r\nDate: Thu, 06 Dec 2018 13:10:20 GMT\r\nContent-Length: 129\r\nOkHttp-Sent-Millis: 1544101820479\r\nOkHttp-Received-Millis: 1544101820832`\r\n\r\nMy .kube/config seems to be okay, because if I run the same command with kubectl\r\n`kubectl exec --v=10 -it --namespace={ns} {pod} -- bash -c \"ls -alh\"`\r\nit is able to send the request, and return a valid auth token. Until that token expires, the Java application is able to connect as well.\r\n\r\n(sensitive data is replaced with placeholders on purpose)\r\n\r\nDo you maybe what can be the problem, or at least could you point me toward the right direction?\r\n\r\nMany thanks!"},"comment":{"url":"https://api.github.com/repos/kubernetes-client/java/issues/comments/445134751","html_url":"https://github.com/kubernetes-client/java/issues/458#issuecomment-445134751","issue_url":"https://api.github.com/repos/kubernetes-client/java/issues/458","id":445134751,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTEzNDc1MQ==","user":{"login":"brendandburns","id":5751682,"node_id":"MDQ6VXNlcjU3NTE2ODI=","avatar_url":"https://avatars2.githubusercontent.com/u/5751682?v=4","gravatar_id":"","url":"https://api.github.com/users/brendandburns","html_url":"https://github.com/brendandburns","followers_url":"https://api.github.com/users/brendandburns/followers","following_url":"https://api.github.com/users/brendandburns/following{/other_user}","gists_url":"https://api.github.com/users/brendandburns/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandburns/subscriptions","organizations_url":"https://api.github.com/users/brendandburns/orgs","repos_url":"https://api.github.com/users/brendandburns/repos","events_url":"https://api.github.com/users/brendandburns/events{/privacy}","received_events_url":"https://api.github.com/users/brendandburns/received_events","type":"User","site_admin":false},"created_at":"2018-12-07T06:18:05Z","updated_at":"2018-12-07T06:18:05Z","author_association":"COLLABORATOR","body":"Weird, let me try to repro this. I swear when I tested it, it worked correctly, but something may have regressed."}}
{"actor":{"display_login":"brendandburns"}}