You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is extracting a hash from a string encoded cardano address, that can be found inside both C509 and X509 certificates.
It is incorrectly over-processing the data, making the public function not very usable, and requiring it to be rewritten for multiple different use cases.
The data this function is returning (the hash) is available from this type, but this allows the function to also return anything known about the address, not just its hash. This is critical behaviour for the RBAC implementation in cat-gateway.
This function needs to be publicly accessible from the library.
All code which uses this function will need to be adjusted to work with its new result.
One way to do that could be:
Create a new public function: parse_cip00134_uri(uri: &str) -> Result<pallas_addresses::Address> { ... }
Modify extract_cip19_hash to use this function (and make it private to the crate as it should not be used by any consumer of the crate).
NOTE: A second implementation of this function currently exists within catalyst-libs/main/rust/cardano-chain-follower ignore this, as it will be removed at some future point when that library is refactored to use this new rbac-registration library.
stevenj
changed the title
๐ ๏ธ [TASK] : Fix extraction of Cardano Addresses from a X509 or C509 certificate
๐ ๏ธ [TASK] : Fix extraction of Cardano Addresses from a cardano address URI string
Dec 10, 2024
NOTE: A second implementation of this function currently exists within catalyst-libs/main/rust/cardano-chain-follower ignore this, as it will be removed at some future point when that library is refactored to use this new rbac-registration library.
As far as I can see, it was already removed in the #96 pull request. One less thing to worry about.
Summary
Addresss are not being extracted as full addresses by the cip509 library, fix that.
Description
This function:
catalyst-libs/rust/rbac-registration/src/cardano/cip509/utils/cip19.rs
Line 13 in 424cc0a
Is extracting a hash from a string encoded cardano address, that can be found inside both C509 and X509 certificates.
It is incorrectly over-processing the data, making the public function not very usable, and requiring it to be rewritten for multiple different use cases.
The URL format is defined here: https://github.com/cardano-foundation/CIPs/pull/888/files
It needs to be fixed to return an enum type containing this type:
The data this function is returning (the hash) is available from this type, but this allows the function to also return anything known about the address, not just its hash. This is critical behaviour for the RBAC implementation in cat-gateway.
This function needs to be publicly accessible from the library.
All code which uses this function will need to be adjusted to work with its new result.
One way to do that could be:
parse_cip00134_uri(uri: &str) -> Result<pallas_addresses::Address> { ... }
extract_cip19_hash
to use this function (and make it private to the crate as it should not be used by any consumer of the crate).NOTE: A second implementation of this function currently exists within
catalyst-libs/main/rust/cardano-chain-follower
ignore this, as it will be removed at some future point when that library is refactored to use this newrbac-registration
library.Subtask List
The text was updated successfully, but these errors were encountered: