-
Notifications
You must be signed in to change notification settings - Fork 240
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
feat: introduce auth configuration #4321
feat: introduce auth configuration #4321
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #4321 +/- ##
==========================================
+ Coverage 71.74% 75.30% +3.56%
==========================================
Files 919 1053 +134
Lines 18457 21159 +2702
Branches 1037 1182 +145
==========================================
+ Hits 13242 15934 +2692
+ Misses 4756 4707 -49
- Partials 459 518 +59 ☔ View full report in Codecov by Sentry. |
0098748
to
d1f2383
Compare
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.
Great stuff!
I think it would be beneficial to have a piece of .md
in the documentation that explains how to secure the APIs, it would be also good to mark the explicit registration of the filter as deprecated so we could get rid of them at the right time.
...ain/java/org/eclipse/edc/api/auth/configuration/ApiAuthenticationConfigurationExtension.java
Outdated
Show resolved
Hide resolved
...gated/src/main/java/org/eclipse/edc/api/auth/delegated/DelegatedAuthenticationExtension.java
Outdated
Show resolved
Hide resolved
b081031
to
66065ce
Compare
added some docs on the md file @paullatzelsperger |
66065ce
to
aab71d0
Compare
What this PR changes/adds
Introduces a configuration extension for associating an auth implementation to a web context with configuration.
Introduces an
ApiAuthenticationProvider
which creates aAuthenticationService
based on the input config.The configuration plugs into the
web.http.<context>
mechanism adding a nested key for configuring the authentication for the specific<context>
. For example for configuring the tokenbased auth for a custom contextcustom
:Why it does that
flexibility, cleanup, decoupling
Further notes
Some API configuration module explicitly register the
AuthenticationRequestFilter
and uses customcontext
name to be used in theApiAuthenticationRegistry
. For backward compatibility that has not been changed. For overriding the AuthenticationService for that specific api context the additional config valuecontext
is availableFor example for the management context:
As future improvement we should remove
ApiAuthenticationProvider
and apply directly theAuthenticationRequestFilter
with the configuredAuthenticationService
. We also might want to incorporatethis extension as default behavior in the web extension.
Linked Issue(s)
Closes #4294
Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.