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

Add aggregation layer support #316

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomleb
Copy link
Contributor

@tomleb tomleb commented Nov 1, 2024

Issue rancher/rancher#47540

Implements the default authentication.

This was original part of #287 but was split up to make it easier to review.

// auth := NewUnionAuthenticator(customAuth, default)
// err = auth.RunOnce(ctx)
func NewUnionAuthenticator(authenticators ...authenticator.Request) *UnionAuthenticator {
caContentProviders := make([]dynamiccertificates.CAContentProvider, 0, len(authenticators))

Choose a reason for hiding this comment

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

This could be simplified to...

var caContentProviders []dynamiccertificates.CAContentProvider

opts.Authenticator = auth
}, nil)
require.NoError(t, err)
defer cleanup()

Choose a reason for hiding this comment

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

It feels like setupExtensionAPIServer could call t.Cleanup() rather than having to return a cleanup function?

},
},
}
req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("https://127.0.0.1:%d%s", port, "/openapi/v2"), nil)

Choose a reason for hiding this comment

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

This could be simplified to fmt.Sprintf("https://127.0.0.1:%d/openapi/v2", port) ?

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.

2 participants