Skip to content
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

Introduce changes from master to sig-auth-acceptance branch #300

Merged
merged 10 commits into from
Sep 11, 2024

Conversation

ibihim
Copy link
Collaborator

@ibihim ibihim commented Jun 28, 2024

What

  • Version bump sig-auth-acceptance branch.
  • Introduce important changes from master to sig-auth-acceptance branch.
  • Make e2e-tests work on arm64 machines.

Why

  • For some of the change request a newer version of k8s is required, like the wrapper around token audiences.
  • The http/2 disablement is important from master for one of the change requests.
  • Reduce differences in the Makefile to have a smaller context change.
  • Enable e2e tests on ARM64, in particular for MacOS M-Chip users.

@ibihim ibihim requested a review from stlaz June 28, 2024 14:23
@ibihim ibihim force-pushed the sig-auth-acceptance-bump branch 4 times, most recently from f1f64b6 to ee29cc5 Compare June 28, 2024 14:40
@ibihim ibihim force-pushed the sig-auth-acceptance-bump branch 6 times, most recently from 7c1476a to 5c0c8bc Compare July 2, 2024 09:32
.github/workflows/build.yml Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@liouk
Copy link

liouk commented Jul 2, 2024

/lgtm

Copy link
Collaborator

@stlaz stlaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much smaller change than I thought it would be 👍

cmd/kube-rbac-proxy/app/kube-rbac-proxy.go Show resolved Hide resolved
IssuerURL: config.IssuerURL,
ClientID: config.ClientID,
tokenAuthenticator, err := oidc.New(ctx, oidc.Options{
JWTAuthenticator: apiserver.JWTAuthenticator{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove the old options and just wire the new config, since we have the chance?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stlaz, WDYT?

a610979

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite what I had in mind. Keeping the legacy struct for legacy options is fine, and I think preferable.

Perhaps this is not for this PR (I'd rather we removed a610979) but why don't we try to move https://github.com/kubernetes/kubernetes/blob/04434b7bf4f8afe258fed430f163102abe1a24d5/pkg/kubeapiserver/options/authentication.go#L719-L787 somewhere where we could import it - it's how most of the other functionality in that file is implemented and this TODO mentions that it might be preferable here, too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand. Let me remove the change.

Introducing the suggested change, is definitely another PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you create a k/k issue and link it to this PR, please?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you expect me to create an issue for? That we finally need to move that into one place instead of copying it across different places and that this PR is an example of why we need it?

cmd/kube-rbac-proxy/app/options/proxyoptions.go Outdated Show resolved Hide resolved
@ibihim ibihim force-pushed the sig-auth-acceptance-bump branch 3 times, most recently from f356040 to a610979 Compare July 24, 2024 11:55
@ibihim ibihim requested a review from stlaz July 24, 2024 11:56
@stlaz stlaz assigned stlaz and unassigned stlaz Jul 29, 2024
cmd/kube-rbac-proxy/app/options/proxyoptions.go Outdated Show resolved Hide resolved
name: "should pass through",
cfg: &identityheaders.AuthnHeaderConfig{},
req: func() *http.Request {
req, err := http.NewRequest(http.MethodGet, "http://example.com", nil)
Copy link
Collaborator

@stlaz stlaz Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a set of chaining functions that construct a request as necessary

edit: does not have to be chaining

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand the benefit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removal of duplicated code + it's easier to write future unit tests

pkg/authn/identityheaders/identityheaders.go Show resolved Hide resolved
@stlaz
Copy link
Collaborator

stlaz commented Sep 11, 2024

please squash the last two changes to where the code was originally introduced and let's merge this PR

@ibihim ibihim merged commit 155cd10 into brancz:sig-auth-acceptance Sep 11, 2024
7 checks passed
@ibihim ibihim deleted the sig-auth-acceptance-bump branch September 11, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants