-
Notifications
You must be signed in to change notification settings - Fork 245
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(IATP): configurable trusted issuers #3603
feat(IATP): configurable trusted issuers #3603
Conversation
6ab7ba8
to
999b855
Compare
999b855
to
f5cefb1
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.
Few minor questions/comments
@@ -0,0 +1,13 @@ | |||
# Trusted Issuer Configuration Extension |
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.
Can we get rid of this documentation and just use the annotations for this?
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.
Do we support the prefix style in annotations?
var config = context.getConfig(CONFIG_PREFIX); | ||
var issuers = config.partition().map(this::configureIssuer).toList(); | ||
if (issuers.isEmpty()) { | ||
throw new EdcException("The list of trusted issuers is empty"); |
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.
Should this abort the runtime or just issue an error?
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.
I though of just issuing an error message but then in theory it will not work anyway at runtime since the list is empty
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.
Yeah, I thought though it may be "nicer" to not abort, but don't have a strong opinion.
extensions/common/iam/identity-trust/identity-trust-issuers-configuration/build.gradle.kts
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3603 +/- ##
==========================================
- Coverage 72.10% 72.08% -0.03%
==========================================
Files 897 899 +2
Lines 17919 17984 +65
Branches 1018 1023 +5
==========================================
+ Hits 12920 12963 +43
- Misses 4562 4580 +18
- Partials 437 441 +4 ☔ View full report in Codecov by Sentry. |
private Issuer configureIssuer(Config config) { | ||
|
||
var id = config.getString(ID_SUFFIX); | ||
var propertiesConfig = config.getString(PROPERTIES_SUFFIX, "{}"); |
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.
alternatively, pass null
as default value, and instantiate Issuer(id, Map.or())
if the propertiesConfig
is null. saves us a call to the typemanager and makes the code a bit more explicit.
* feat(IATP): configurable trusted issuers * pr remarks
What this PR changes/adds
Adds an extension for configuring the list of trusted issuer in the
TrustedIssuerRegistry
Why it does that
iatp adoption
Linked Issue(s)
Closes #3602