CDI-258: Add License Subcommand#115
Merged
erikostien-pingidentity merged 3 commits intomainfrom Jul 15, 2025
Merged
Conversation
Contributor
erikostien-pingidentity
commented
Jul 15, 2025
- Update github workflow to support DevOps User and Key
- Add License Subcommand, Logic, and Options
- Add License testing and internal testing
- Update existing tests with new Options
- Update to Go 1.24.5 and Update Dependencies
- Update OptionType to be int, and enumerate via 'iota'
- Add LicenseProduct and LicenseVersion custom types
- Update github workflow to support DevOps User and Key - Add License Subcommand, Logic, and Options - Add License testing and internal testing - Update existing tests with new Options - Update to Go 1.24.5 and Update Dependencies - Update OptionType to be int, and enumerate via 'iota' - Add LicenseProduct and LicenseVersion custom types
wesleymccollam
approved these changes
Jul 15, 2025
Contributor
wesleymccollam
left a comment
There was a problem hiding this comment.
I'll go ahead and approve - pending successful pipeline.
| case options.LICENSE_VERSION: | ||
| licenseVersion := new(customtypes.LicenseVersion) | ||
| if err = licenseVersion.Set(vValue); err != nil { | ||
| return fmt.Errorf("value for key '%s' must be a valid license version. Must be of the form 'major.minor': %w", vKey, err) |
Contributor
There was a problem hiding this comment.
Do we want to reject fully-qualified versions like 12.0.0?
| } | ||
|
|
||
| if res.StatusCode < 200 || res.StatusCode >= 300 { | ||
| return "", fmt.Errorf("license request failed with status %d: %s", res.StatusCode, string(body)) |
Contributor
There was a problem hiding this comment.
Just to check: the body never returns the devops user and key in plaintext?
| "\n You can save the DevOps user and key in your profile using the 'pingcli config' commands.", | ||
| Value: cobraValue, | ||
| }, | ||
| Sensitive: false, |
Contributor
There was a problem hiding this comment.
If there's no loss in functionality, might be worth treating this as sensitive too
| ENUM_LICENSE_PRODUCT_PING_AUTHORIZE string = "pingauthorize" | ||
| ENUM_LICENSE_PRODUCT_PING_AUTHORIZE_POLICY_EDITOR string = "pingauthorize-policy-editor" | ||
| ENUM_LICENSE_PRODUCT_PING_CENTRAL string = "pingcentral" | ||
| ENUM_LICENSE_PRODUCT_PING_DIRECTORY string = "pingdirectory" |
Contributor
There was a problem hiding this comment.
Is sync just a directory license?
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.