- Notifications
You must be signed in to change notification settings - Fork 42k
Closed
Labels
area/securitykind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.official-cve-feedIssues or PRs related to CVEs officially announced by Security Response Committee (SRC)Issues or PRs related to CVEs officially announced by Security Response Committee (SRC)sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.Categorizes an issue or PR as relevant to SIG API Machinery.sig/authCategorizes an issue or PR as relevant to SIG Auth.Categorizes an issue or PR as relevant to SIG Auth.
Description
CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
The rest.AnonymousClientConfig() method returns a copy of the provided config, with credentials removed (bearer token, username/password, and client certificate/key data).
In the following versions, rest.AnonymousClientConfig() did not effectively clear service account credentials loaded using rest.InClusterConfig():
- v1.12.0-v1.12.4
- v1.13.0
What is the impact?
k8s.io/client-gousers that use therest.AnonymousClientConfig()method directly with client config loaded withrest.InClusterConfig()receive back a client config which can still send the loaded service account token with requests.
How was the issue fixed?
- In 1.12.5+ and 1.13.1+,
rest.InClusterConfig()was modified to return a client config that is safe to use with therest.AnonymousClientConfig()method (Plumb token and token file through rest.Config #71713) - In v1.15.0, the
rest.AnonymousClientConfig()will also exclude theconfig.Transportandconfig.WrapTransportfields, in addition to the explicit credential-carrying fields. (Exclude custom transports when constructing AnonymousClientConfig() #75771)
How do I resolve the issue?
- Upgrade
k8s.io/client-gotokubernetes-1.12.5,kubernetes-1.13.1,kubernetes-1.14.0, or higher - or manually clear the
config.WrapTransportandconfig.Transportfields in addition to callingrest.AnonymousClientConfig()
Thanks to Oleg Bulatov of Red Hat for reporting this issue.
/area security
/kind bug
/sig auth
/sig api-machinery
/assign
/close
Metadata
Metadata
Assignees
Labels
area/securitykind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.official-cve-feedIssues or PRs related to CVEs officially announced by Security Response Committee (SRC)Issues or PRs related to CVEs officially announced by Security Response Committee (SRC)sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.Categorizes an issue or PR as relevant to SIG API Machinery.sig/authCategorizes an issue or PR as relevant to SIG Auth.Categorizes an issue or PR as relevant to SIG Auth.