Support using the Entra SDK sidecar container to validate Azure access tokens#447
Support using the Entra SDK sidecar container to validate Azure access tokens#447AzureMarker wants to merge 25 commits into
Conversation
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
The cluster role and role binding were removed but E2E was not updated: kubeguard#369 Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
7664882 to
c1ee28a
Compare
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
| }, | ||
| }, | ||
| InitialDelaySeconds: int32(30), | ||
| InitialDelaySeconds: 1, |
There was a problem hiding this comment.
this change will be a behavior change. though, it's unclear who's really using the installer. but is it really necessary?
There was a problem hiding this comment.
It's not necessary, but a 30 second wait is unnecessary and slows down the tests a lot.
|
generally LGTM. I pinged few people from AKS to review as well. We can aim to merge it later this week if they don't have other feedback. |
|
Seems the CI does not contain E2E, do we have an E2E test result for the new code? |
|
My comments are mainly about nit and those are non-blocking. The code's functionality LGTM. |
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
@norshtein Yes, the E2E was successful when I ran it locally: There's an old PR to add the E2Es to PR checks: #232 |
Signed-off-by: Mark Drobnak <markdronak@microsoft.com>
|
Thank you for the updates, LGTM! |

NOTE: Most of the changed lines are due to vendoring some packages for the new E2E tests.
There are some systems using Guard that want to perform the Azure access token validation using the "official" dotnet implementation. This is where the Entra SDK container comes in:
https://learn.microsoft.com/en-us/entra/msidweb/agent-id-sdk/overview
https://mcr.microsoft.com/en-us/artifact/mar/entra-sdk/auth-sidecar/about
This PR adds support for using this container as a sidecar for Azure access token validation. It cannot fully validate PoP tokens, so it's only used for the inner access token validation in that scenario.
This feature is enabled only when the new
--azure.entra-sdk-urlflag is set in the Guard options, for example:The PR also fixes up the E2E tests and adds some that run through the full Azure token validation flow. This required some changes in the installer as well.
I added a local E2E testing script that automates the work of building the container image locally, loading it into the kind cluster, and running the E2E with that container image. There is a readme at
test/e2e/README.mdthat explains how to use the script.Closes #448