-
Notifications
You must be signed in to change notification settings - Fork 855
Update KubernetesClient #2435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Update KubernetesClient #2435
Conversation
|
I want to be clear -- this is still pretty early on. I'm looking for feedback from the GitHub Actions pipelines, once they're approved. |
|
maybe we can get rid of the KubernetesClient dependency in the AspNetCore.HealthChecks.UI, does not seem logical that the UI part needs a Kubernetes dependency. |
|
@vip32 I am trying to keep it as simple as possible. This repository is actively seeking new maintainers so I'm not trying to make anything too complicated so as to reduce the burden to review and maintain my change. |
|
Updating k8s client version will cause error |
|
@AntiPasha I figured I'd look into that once there was enough interest in this PR to at least approve the CI workflow to run. 👍 |
|
Ok, thank you. Faced with this problem when updated |
|
Hi @SeanKilleen , thanks for taking care of this! 🙏 Do you think you could update src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs: @@ -1,4 +1,6 @@
+using System.Net.Http.Headers;
using System.Net.Http.Json;
+using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using HealthChecks.UI.Configuration;
@@ -134,7 +136,7 @@ internal sealed class HealthCheckReportCollector : IHealthCheckReportCollector,
// means you can't use _httpClient.GetAsync and have to use _httpClient.SendAsync
using var requestMessage = new HttpRequestMessage(HttpMethod.Get, absoluteUri);
- requestMessage.Headers.Authorization = new BasicAuthenticationHeaderValue(userInfoArr[0], userInfoArr[1]);
+ requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes($"{userInfoArr[0]}:{userInfoArr[1]}")));
response = await _httpClient.SendAsync(requestMessage, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false);
}
}TL;DR: This removes dependency on IdentityModel and fixes the build. Longer explanation: Previous KubernetesClient 15.0.1 had a transitive dependency on IdentityModel package. To makes things worse, the IdentityModel package is now decommissioned and removed from Nuget. Luckily, the source code for this single class is still available in the archive. |
|
@gleb-osokin I am happy to do that, but as I mentioned before, this repository is a bit dormant so I'm holding off on doing anything until someone approves the GitHub Actions to run, so that I can get better feedback from the official build system as I proceed. If I can't get someone to do that, the likelihood of this being merged is very slim, so I can't spend more time on it. |
|
Any updates on this? As this vulnerability is still there |
|
@Lithrun please see my comment just prior to yours. It reflects the latest update. |
|
Thanks for your reply Sean! Your changes seem fine to me, just a package update. It was more directed towards the maintainers of this repo (i.e. those who can trigger the build). As I think that's what we are waiting for? Apologies for the ping, but according to the ReadMe this should be: @unaizorrilla, @lurumad, @CarlosLanderas , @eiximenis, @evacrespob and @sungam3r. Could any of you take a look into this, as we need to resolve the vulnerability. |
|
Any updates on this? |
|
@SeanKilleen could you move it out of draft? As it seems like someone approved it |
|
|
Hi all, Yeah that's true only maintainers can approve the PR to trigger build |
|
Perhaps the maintainers are awaiting (and not even notified by GitHub) until the PR is out of the draft mode? |
|
Moving this to review, even though it is not quite ready for review, in the hope that it attracts the attention of a maintainer to enable the build process. However, I also understand that this project is largely dormant and unmaintained at this point, based on #1714 and the fact that there hasn't been a release since February 2024. So I do not see a merge being very likely at this point. |

What this PR does / why we need it: Updates KubernetesClient to the earliest version which is not impacted by a security vulnerability (which happens to be the latest version).
Which issue(s) this PR fixes: #2434
Please reference the issue this PR will close: #2434
Special notes for your reviewer:
Does this PR introduce a user-facing change?: No
Please make sure you've completed the relevant tasks for this PR, out of the following list: