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(rust/rbac-registration): Introduce Cip0134UriSet type #119

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

stanislav-tkach
Copy link
Contributor

@stanislav-tkach stanislav-tkach commented Dec 20, 2024

Description

  • The Cip0134UriSet type was added.
  • Option<Vec<_>> fields of the Cip509RbacMetadata structure were changed to Vec<_>.
  • Error handling becomes stricter.

Related Issue(s)

Closes #104.

Description of Changes

I have renamed Cip0134UriList to Cip0134UriSet because I don't think that "list" is a proper description for the current structure.

This pull request should be merged into the rbac-registration-improvements branch instead of main. The goal is to have separate smaller incremental changes that can be reviewed together in a separate pull request (from rbac-registration-improvements to main).

Please confirm the following checks

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream module

@stanislav-tkach stanislav-tkach added the do not merge yet PR is not ready to merge yet label Dec 20, 2024
@stanislav-tkach stanislav-tkach self-assigned this Dec 20, 2024
@stanislav-tkach stanislav-tkach changed the title feat(rust/rbac-registration): Introduce Cip0134UriSet type feat(rust/rbac-registration): Introduce Cip0134UriSet type Dec 20, 2024
@stanislav-tkach stanislav-tkach force-pushed the cip0134set branch 2 times, most recently from d1251df to 5d20379 Compare December 25, 2024 14:51
@stanislav-tkach stanislav-tkach force-pushed the cip0134set branch 3 times, most recently from a4366b2 to 6bb16b6 Compare December 25, 2024 17:11
@stanislav-tkach stanislav-tkach marked this pull request as ready for review December 25, 2024 17:12
@stanislav-tkach stanislav-tkach added review me PR is ready for review and removed do not merge yet PR is not ready to merge yet labels Dec 25, 2024
Copy link
Contributor

github-actions bot commented Dec 25, 2024

Test Report | ${\color{lightgreen}Pass: 230/230}$ | ${\color{red}Fail: 0/230}$ |

///
/// This field isn't present in the encoded format and is populated by processing both
/// `x509_certs` and `c509_certs` fields.
pub certificate_uris: Cip0134UriSet,
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like this certificate_uris is too specific for Cip509Metadata (specific to role 0)
Might be useful to add it in RegistrationChain.
What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps I'm missing something, but certificates be present in the next registrations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DIscussed: we decided to proceed with this approach for now because it isn't going to be merged directly to the main branch. But we will consider this again during the final review.

@stanislav-tkach stanislav-tkach force-pushed the cip0134set branch 3 times, most recently from 4c4d4e4 to 448899b Compare December 28, 2024 14:04
Copy link
Contributor

@bkioshn bkioshn left a comment

Choose a reason for hiding this comment

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

LGTM🥳

},
}
} else {
// Handle the x509 chunks 10 11 12
let x509_chunks = X509Chunks::decode(d, ctx)?;
cip509_metadatum.x509_chunks = x509_chunks;
// Technically it is possible to store multiple copies (or different instances) of
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for miscommunication, storing multiple violate the CDDL spec, so only 1 is allowed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you were clear, perhaps it is a misunderstanding from my side. What I wanted to say with this comment is that it is possible to produce metadata with multiple different types, but it indeed would violate the specification.

@stanislav-tkach stanislav-tkach merged commit 6ad8cdc into rbac-registration-improvements Dec 30, 2024
21 of 24 checks passed
@stanislav-tkach stanislav-tkach deleted the cip0134set branch December 30, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review me PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants