Skip to content

feat(rust/rbac-registration): Record each role data fields #244

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

Merged
merged 18 commits into from
Mar 31, 2025

Conversation

bkioshn
Copy link
Contributor

@bkioshn bkioshn commented Mar 19, 2025

Description

Record each role data fields + add function for retrieving public key from certs

Related Issue(s)

Closes #241 #255

Description of Changes

Each role data fields are record separately which is stored in role_data_record.
This role_data_record is difference from role_data_history where role_data_history store the whole role data at the specific point in time.

For example, for role 0,

Roledata at point 1222 {
     signing_key: X509_cert(A)
     encryption_key: None
    ......
}

Roledata at point 1322 {
     signing_key: Deleted X509_cert(A)
     encryption_key: C509_cert(B)
    ......
}

Roledata at point 1422 {
     signing_key: Undefined
     encryption_key: X509_cert(C)
    ......
}

Each entry of Roledata as shown above will be store in role_data_history

The role_data_record of role 0 will be

RoleDataRecord {
    signing_keys: [<1222, X509_cert(A)>, <1322, None>]
    encryption_keys: [<1322, C509_cert(B)>,  <1422, X509_cert(C)>]
    ....
}
  • Note that key rotation is a record of any change to the key, so when key is deleted, it is also considered as rotation.

Breaking Changes

Renaming

  • all_role_data -> role_data_history
  • role_data -> role_data_record and the structure changes

Test

This change need to be tested again once test data is fully prepared
input-output-hk/catalyst-voices#2037

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

@bkioshn bkioshn added enhancement New feature or request F14 labels Mar 19, 2025
@bkioshn bkioshn self-assigned this Mar 19, 2025
@bkioshn bkioshn added this to Catalyst Mar 19, 2025
Copy link
Contributor

github-actions bot commented Mar 19, 2025

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

@bkioshn bkioshn moved this from New to 👀 In review in Catalyst Mar 19, 2025
@bkioshn bkioshn added the review me PR is ready for review label Mar 19, 2025
@stanislav-tkach stanislav-tkach requested a review from stevenj March 19, 2025 12:23
@github-project-automation github-project-automation bot moved this from 👀 In review to 🔖 Ready in Catalyst Mar 21, 2025
@bkioshn bkioshn removed the review me PR is ready for review label Mar 24, 2025
@bkioshn bkioshn added the review me PR is ready for review label Mar 25, 2025
@bkioshn bkioshn moved this from 🔖 Ready to 👀 In review in Catalyst Mar 25, 2025
@bkioshn bkioshn requested a review from stevenj March 25, 2025 08:57
@bkioshn bkioshn marked this pull request as draft March 25, 2025 09:54
@bkioshn bkioshn removed the review me PR is ready for review label Mar 26, 2025
@bkioshn bkioshn added the review me PR is ready for review label Mar 26, 2025
@bkioshn bkioshn marked this pull request as ready for review March 26, 2025 07:06
@bkioshn bkioshn requested a review from apskhem March 26, 2025 08:42
@github-project-automation github-project-automation bot moved this from 👀 In review to 🔖 Ready in Catalyst Mar 26, 2025
Mr-Leshiy
Mr-Leshiy previously approved these changes Mar 26, 2025
Copy link
Contributor

@Mr-Leshiy Mr-Leshiy left a comment

Choose a reason for hiding this comment

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

LGTM
but I would also wait an approval from @stanislav-tkach

Copy link
Contributor

@Mr-Leshiy Mr-Leshiy left a comment

Choose a reason for hiding this comment

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

LGTM

@minikin minikin merged commit ed688fc into main Mar 31, 2025
19 of 20 checks passed
@minikin minikin deleted the feat/rbac-role-data-record branch March 31, 2025 08:11
@github-project-automation github-project-automation bot moved this from 🔖 Ready to ✅ Done in Catalyst Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request F14 review me PR is ready for review
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

RBAC registration - record key rotation in role data
5 participants