-
Notifications
You must be signed in to change notification settings - Fork 52
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
Adjust how Watermarks are collected to eliminate redundant OCA Bundles #2342
Comments
@cvarjao, @jeznorth -- It would be nice to do this sooner than later. Its a pain for clients to develop and submit their OCA Bundles into the repo, and eliminating the duplication would be a big help. I'm hoping the impact on the Wallet is small. I have some other ideas that don't impact the wallet, but that will make creating OCA Bundles easier. Thanks |
I don't think the Bifold or BC Wallet will care, but if the path to it changes in the JSON it will break. We can easily look for it in it original locaiton or the new one. I wonder if it will be better to do this or just make a new CredentialCard v1.2. I think as we continue to adjust the OCA over time versioning the credential card may be easier. Just pick a CredentialCard that aligns with a particular OCA Bundle Versions?
Right now it lives with other overlay data:
EDIT: Well, it won't really break since the |
Not entirely clear on what you are saying re CredentialCard (presumably, that is a code module? So that’s a developer to developer discussion). The idea is to add the collection of the watermark data (if available) when finding the OCA Bundle, and only using the the watermark data in the Overlay if it is not already known. So it will take logic changes at the point you indicate. What I do want to know about is what will happen if we add the watermark data into the |
Affirmative. It's an implementation detail.. But I still wonder if we should version the bundles (if not already) and or their location.
Adding fields to JSON won't break anything. Only removing or restructuring. I've manually edited and published one (don't judge me) so I can do a quick conformation test next week. |
Tested. I cleared the cache and data on Android. Updated the URL and re-launched the app. Fetch a new credential. Worked as expected. This change appears to have no impact on the current release. LOG ********* RemoteOCABundleResolver URL = https://raw.githubusercontent.com/swcurran/aries-oca-bundles/refs/heads/identifier-watermark/ |
The current design for letting the BC Wallet know about Credential Watermarks is doubling the work in managing OCA Bundles, and we need to make it easier. The following is a proposal for changing the approach.
PROBLEM The use (or not) of a watermark is not an attribute of the type of credential, but rather where an instance of the credential is rooted -- on a Dev / Test / Prod network. On each of those the OCA Bundle for the credential should be the same, but because we put the watermark in the OCA Bundle itself, we need an OCA Bundle for each credential type in each environment. As a result, we have duplicate OCA Bundles for every credential type, with the only difference being the presence (or not) of the watermark value. Further, it would probably be even better if there were watermark difference between Dev and Test, but in the current situation, that would make things worse -- three OCA Bundles per credential type. We need to make it eliminate the redundency.
SUGGESTION We associate the "watermark" value with the Identifiers to which a Bundle applies (e.g. the CredDevId on CANdy Dev, Test and Prod). We do this by putting a "watermark" item into the
ocabundles.json
file, along with the existing values of<identifier>: { "path": <path to Bundle>, "sha256": <checksum> }
data. The new data element would be optional (assume NULL if not present) and would be array in the form:"watermark": [ { <lang>: <watermark> } ]
"watermark": [ { "en": "Development", }, { "fr", "Développement" } ]
This would require a change in Bifold (or BC Wallet?) to collect the value if present. Proposed handling is that the identifier level watermark value has priority over the one in the OCA Bundle, such that:
This means that the OCA Style Guide does not have to change (more on that below) and has the added benefit that we don't need to coordinate the release of the BC Wallet (or other apps using these OCA Bundles) with an update to the new approach.
TRANSITION The process of changing this would take the following form:
ocabundles.json
. If so, update the Aries OCA Bundles repo to at least gracefully ignore the watermark value in that file.ocabundles.json
file. All of the existing OCA Bundles will continue remain as is, with the "watermark" value will be kept in each OCA Bundle. I can take care of this step.OCA Style Guide Updates Given that we are not precluding the use of "watermark" as part of the OCA Bundle, I propose that we do a "clarification" to the RFC saying, more or less "you can do that, but here is our experience and recommendation...". Thus, the spec is not changed, but best practices are encouraged. We can deprecate the use of "watermark" in the Bundle. A later version can remove the value, as appropriate.
The text was updated successfully, but these errors were encountered: