Skip to content

Comments

CDI-258: Add License Subcommand#115

Merged
erikostien-pingidentity merged 3 commits intomainfrom
CDI-258
Jul 15, 2025
Merged

CDI-258: Add License Subcommand#115
erikostien-pingidentity merged 3 commits intomainfrom
CDI-258

Conversation

@erikostien-pingidentity
Copy link
Contributor

  • 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
@erikostien-pingidentity erikostien-pingidentity requested a review from a team as a code owner July 15, 2025 00:38
Copy link
Contributor

@wesleymccollam wesleymccollam left a comment

Choose a reason for hiding this comment

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

I'll go ahead and approve - pending successful pipeline.

@erikostien-pingidentity erikostien-pingidentity merged commit 5a0e8b7 into main Jul 15, 2025
10 checks passed
@erikostien-pingidentity erikostien-pingidentity deleted the CDI-258 branch July 15, 2025 16:12
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)
Copy link
Contributor

Choose a reason for hiding this comment

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

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))
Copy link
Contributor

Choose a reason for hiding this comment

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

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,
Copy link
Contributor

Choose a reason for hiding this comment

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

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"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is sync just a directory license?

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