ui - add tf icons to tf-managed roles, services, policies; show zms-cli command.#3373
ui - add tf icons to tf-managed roles, services, policies; show zms-cli command.#3373ArtjomsPorss wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive system for identifying and managing Terraform-owned resources within the Athenz UI. It adds visual indicators (Terraform icons) to roles, policies, and services, and provides users with copyable zms-cli command suggestions when UI-based modifications are blocked by resource ownership. The implementation includes new utility modules for ownership detection and CLI command formatting, along with extensive updates to component headers and action modals. Feedback focuses on improving the robustness of the generated CLI commands—specifically regarding proper shell quoting and subcommand accuracy—and ensuring better lifecycle management for the clipboard copy functionality.
a031908 to
78da31b
Compare
…p set; show zms-cli command when attempting to make change to these resources Signed-off-by: ArtjomsPorss <art.porss@yahooinc.com>
Description
Terraform icons in Athenz UI
This is a change to Athenz UI where for TF-owned roles, services, policies a TF icon will is displayed.
The icon is shown in these places:
objectOwnerormetaOwner)membersOwner) — not on individual member rowsobjectOwnerorassertionsOwner)objectOwner)Athenz UI provides zms-cli command to use
If you try to change a Terraform-managed resource through the UI (delete role, add/remove member, edit role settings, add/delete policy assertion, delete service, delete public key, and similar), the operation fails with a warning instead of applying the change. The dialog then shows a copy-ready
zms-clicommand that can perform the same action while bypassing resource-owner enforcement.When ownership blocks the action, the UI generates a command appropriate to what you attempted, including (non-exhaustive):
zms-clisubcommanddelete-roleset-role-description,set-role-member-expiry, or relatedset-role-*add-member,add-temporary-member, ordelete-memberdelete-policyadd-assertion/delete-assertiondelete-serviceadd-public-key/delete-public-keyRecommended Workflow for the users
zms-cli -r ignoreexcept for documented emergencies.Screenshots