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

feat: soft binding for plugin flexibility #3010

Merged
merged 5 commits into from
Jun 6, 2024

Conversation

dbluhm
Copy link
Contributor

@dbluhm dbluhm commented Jun 3, 2024

This PR introduces a way to bind providers in profiles in such a way that they may be overridden by a plugin.

I have a fairly pointed use case: my goal is to be able to provide an alternate implementation of VC Holder. To see an example of this in use, check out this demo I put together: https://github.com/dbluhm/acapy-vc-holder. This demo uses an external KMS, delegating secure storage and retrieval of received LDP-VCs to an external component.

The "soft-binding" functionality has so far only been applied to the binding of a VC Holder instance.

An alternative to this approach would be to move the VC Holder provider binding code outside of the profile. This is possible now that the profile itself is bound to the context after #2997. I think this would create a pattern where we have dynamic providers based on wallet type. I don't think that's necessarily a bad thing but it moves logic specific to a wallet type out of the Profile definition for the wallet type. This seemed less than desirable. However, making a special case binding mechanism also feels a bit less than desirable, though it was straightforward to implement.

I'm open to feedback on this one.

@dbluhm dbluhm requested review from ianco and jamshale June 3, 2024 14:53
Signed-off-by: Daniel Bluhm <[email protected]>
@jamshale
Copy link
Contributor

jamshale commented Jun 3, 2024

FYI. The code coverage check is 80%. I think this is the default from sonarcloud. We can adjust it if we feel it's too high.

Copy link
Contributor

@ianco ianco left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link

sonarqubecloud bot commented Jun 5, 2024

@dbluhm dbluhm merged commit 44555f9 into openwallet-foundation:main Jun 6, 2024
8 checks passed
@jamshale jamshale mentioned this pull request Jul 23, 2024
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.

4 participants