-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement default server authenticators #4558
Implement default server authenticators #4558
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4558 +/- ##
==========================================
+ Coverage 90.25% 90.26% +0.01%
==========================================
Files 181 181
Lines 10595 10613 +18
==========================================
+ Hits 9562 9580 +18
Misses 805 805
Partials 228 228
Continue to review full report at Codecov.
|
componenthelper.ShutdownFunc | ||
} | ||
|
||
// WithAuthenticate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the general direction looks good, I'll work on the godoc.
host := &mockHost{ | ||
ext: map[config.ComponentID]component.Extension{ | ||
config.NewComponentID("mock"): &configauth.MockServerAuthenticator{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good example of how consumers would be able to use this. I like the new approach, especially as it allows consumers to omit specifying the default implementations to use, like demonstrated by the removal of line 785.
Interesting, the changelog check is failing even though there's a changelog entry... |
3256045
to
684e4e6
Compare
684e4e6
to
715dd36
Compare
Rebased. |
@bogdandrutu, can you take a quick look and see if this is roughly the direction you wanted it to go? If so, I'll add godoc and ask @codeboten to review this. |
I'm converting this to draft, as we would probably re-evaluate this after #4583. |
715dd36
to
b6f0c01
Compare
@bogdandrutu, @pavankrish123, do you still see the need for this PR? The interface now has only one function on its own (Authenticate), plus the ones from the component interface. In any case, I updated this PR to remove the interceptor functions as a follow-up from #4582. |
While the contrib test failures are related to the same area, I don't think they are caused by this PR. Once open-telemetry/opentelemetry-collector-contrib#6922 is merged, I'lll trigger the build again and see how it goes. |
@jpkrohling I like it, please move forward with this. Also consider to enforce everyone using the framework by adding a private func, this way we can extend the interface in the future. |
Allow the interfaces to be extended without affecting implementations by allowing authenticators to provide which functions to override. This is a non-breaking change, and current implementations might be changed in the future to use this. Fixes open-telemetry#4556 Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
b6f0c01
to
7999592
Compare
Sorry, could you expand on this? I just updated this PR with the missing godoc and I think this is now ready to be merged. |
Similar to open-telemetry#4558, this allows client authenticators to be created without having to implement all the functions from the ClientAuthenticator interface. This is non-breaking change. Fixes open-telemetry#4557 Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Similar to open-telemetry#4558, this allows client authenticators to be created without having to implement all the functions from the ClientAuthenticator interface. This is non-breaking change. Fixes open-telemetry#4557 Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Similar to open-telemetry#4558, this allows client authenticators to be created without having to implement all the functions from the ClientAuthenticator interface. This is non-breaking change. Fixes open-telemetry#4557 Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Similar to open-telemetry#4558, this allows client authenticators to be created without having to implement all the functions from the ClientAuthenticator interface. This is non-breaking change. Fixes open-telemetry#4557 Signed-off-by: Juraci Paixão Kröhling <[email protected]>
* Implement default client authenticators Similar to #4558, this allows client authenticators to be created without having to implement all the functions from the ClientAuthenticator interface. This is non-breaking change. Fixes #4557 Signed-off-by: Juraci Paixão Kröhling <[email protected]>
* Implement default client authenticators Similar to open-telemetry#4558, this allows client authenticators to be created without having to implement all the functions from the ClientAuthenticator interface. This is non-breaking change. Fixes open-telemetry#4557 Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Allow the interfaces to be extended without affecting implementations by allowing authenticators to provide which functions to override.
This is a non-breaking change, and current implementations might be changed in the future to use this.
Fixes #4556
Signed-off-by: Juraci Paixão Kröhling [email protected]