Skip to content

Refactor HSM Partition Create cmd to use repository methods#28

Merged
mdrkb merged 2 commits into
stable/2024.2-m3from
impr/hsm-partition-create-cmd
Sep 18, 2025
Merged

Refactor HSM Partition Create cmd to use repository methods#28
mdrkb merged 2 commits into
stable/2024.2-m3from
impr/hsm-partition-create-cmd

Conversation

@mdrkb
Copy link
Copy Markdown

@mdrkb mdrkb commented Aug 19, 2025

ToDo:

  • Use repository method to create HSMPartitionConfig objects in DB
  • Improve hsm_partition_create cmd implementation
  • Add HSM partition config create cmd to barbican manage cmd

@mdrkb mdrkb requested review from dorneanu and rajivmucheli August 19, 2025 16:12
@rajivmucheli
Copy link
Copy Markdown

Hi,

is it better to move this to barbican-manage utility ? https://github.com/sapcc/barbican/blob/stable/2024.2-m3/barbican/cmd/barbican_manage.py#L619

I also have an enhancement PR : #13

@mdrkb
Copy link
Copy Markdown
Author

mdrkb commented Sep 1, 2025

Hi,

is it better to move this to barbican-manage utility ? https://github.com/sapcc/barbican/blob/stable/2024.2-m3/barbican/cmd/barbican_manage.py#L619

I also have an enhancement PR : #13

I have moved this cmd to barbican-manage utility. But I skipped the changes from the old enhancement PR as it is not complete and some of the implementations are missing.

@rajivmucheli
Copy link
Copy Markdown

this PR proposes to execute the barbican-manage utility to map the data ? instead of hsm_partition_create.py. Hope the passwords are now encrypted ? or stored as plain text in DB ?

@mdrkb
Copy link
Copy Markdown
Author

mdrkb commented Sep 2, 2025

this PR proposes to execute the barbican-manage utility to map the data ? instead of hsm_partition_create.py. Hope the passwords are now encrypted ? or stored as plain text in DB ?

@rajivmucheli The changes are mentioned in the PR description. Yes, you can create HSM partition configs in DB using the barbican-manage utility now (It's reusing the same code).
This PR doesn't address the plain text password issue. We need to discuss about that separately.

@rajivmucheli
Copy link
Copy Markdown

logic works, any reason why we create HSMCommands and not move it under SAPCommands ? any plans to add few tests here ? https://github.com/sapcc/barbican/blob/stable/2024.2-m3/barbican/tests/cmd/test_barbican_manage.py ?

@mdrkb
Copy link
Copy Markdown
Author

mdrkb commented Sep 15, 2025

@rajivmucheli The create_hsm_partition_config is already under barbican-manage sap --help SAP commands. Can you check again? I didn't change anything

Copy link
Copy Markdown

@dorneanu dorneanu left a comment

Choose a reason for hiding this comment

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

Seems ok to me.

@mdrkb mdrkb merged commit 3d8c2a1 into stable/2024.2-m3 Sep 18, 2025
2 checks passed
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.

3 participants