fix(platform_global_role): remove hardcoded actions validation - #338
Open
kingcrunch wants to merge 2 commits into
Open
fix(platform_global_role): remove hardcoded actions validation#338kingcrunch wants to merge 2 commits into
kingcrunch wants to merge 2 commits into
Conversation
The hardcoded list of allowed action values did not include all values returned by the JFrog platform for predefined global roles (e.g. READ_APPLICATION, READ_APPLICATION_VERSION, READ_APPTRUST_POLICY). Removing the OneOf validator lets the platform API be the source of truth for valid action values and allows importing existing roles with their complete action list. Closes jfrog#332 Assisted-by: opencode:kimi-k2.7-code
Issue: jfrog#332 Assisted-by: opencode:kimi-k2.7-code
kingcrunch
had a problem deploying
to
development
August 10, 2026 08:53 — with
GitHub Actions
Failure
Collaborator
|
Hi @kingcrunch , Thank you for your contribution. Our CI pipeline issues have been resolved, and we are now accepting contributions again. If you are still interested in submitting this change, please rebase your branch on master and update the CHANGELOG. We look forward to reviewing your pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #332
Problem
platform_global_role.actionsused a hard-coded allow-list of action values. That list did not include all values returned by the JFrog platform for predefined global roles (e.g.READ_APPLICATION,READ_APPLICATION_VERSION,READ_APPTRUST_POLICY). As a result, importing an existing role with its full action list failed with:Change
This PR removes the
OneOfvalidator for theactionsattribute. The API itself remains the authoritative source for valid action values. The set still requires at least one element.Note on the action list
The previous list was based on the values that the provider initially supported, but the official JFrog Access/Platform API documentation does not specify an exhaustive enum for the
actionsparameter. For anyone outside of JFrog's internal engineering, the complete set of allowed values can therefore only be inferred from platform behavior and responses. Maintaining a hard-coded list in the provider is not sustainable and inevitably breaks whenever the platform adds new actions.Checklist
go vetandgo buildpassDisclaimer: This PR was created with AI assistance (opencode:kimi-k2.7-code). The human author has read, understood, and takes responsibility for the entire Pull Request.