Skip to content

Commit

Permalink
chore: FoD usage updates, cleanup, deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
rsenden committed Aug 29, 2023
1 parent 70459d7 commit 64d81e2
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public class FoDUserCreateCommand extends AbstractFoDJsonNodeOutputCommand imple
private String phoneNumber;
@Option(names = {"--role"}, required = true)
private String roleNameOrId;
@Option(names = {"--groups"}, required = false, split = ",", descriptionKey = "fcli.fod.group.group-name-or-id")
@Option(names = {"--groups"}, required = false, split = ",", descriptionKey = "fcli.fod.group.group-names-or-ids")
private ArrayList<String> userGroups;
@Option(names = {"--applications"}, required = false, split=",", descriptionKey = "fcli.fod.app-name-or-id")
@Option(names = {"--applications"}, required = false, split=",", descriptionKey = "fcli.fod.app.app-names-or-ids")
private ArrayList<String> applications;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ public class FoDUserUpdateCommand extends AbstractFoDJsonNodeOutputCommand imple
private Boolean isSuspended = false;
@Option(names = {"--must-change"})
private Boolean mustChange = false;
@Option(names = {"--add-groups"}, required = false, split = ",", descriptionKey = "fcli.fod.group.group-name-or-id")
@Option(names = {"--add-groups"}, required = false, split = ",", descriptionKey = "fcli.fod.group.group-names-or-ids")
private ArrayList<String> addUserGroups;
@Option(names = {"--remove-groups"}, required = false, split = ",", descriptionKey = "fcli.fod.group.group-name-or-id")
@Option(names = {"--remove-groups"}, required = false, split = ",", descriptionKey = "fcli.fod.group.group-names-or-ids")
private ArrayList<String> removeUserGroups;
@Option(names = {"--add-apps", "--add-applications"}, required = false, split = ",", descriptionKey = "fcli.fod.app-name-or-id")
@Option(names = {"--add-apps", "--add-applications"}, required = false, split = ",", descriptionKey = "fcli.fod.app.app-names-or-ids")
private ArrayList<String> addApplications;
@Option(names = {"--remove-apps", "--remove-applications"}, required = false, split = ",", descriptionKey = "fcli.fod.app-name-or-id")
@Option(names = {"--remove-apps", "--remove-applications"}, required = false, split = ",", descriptionKey = "fcli.fod.app.app-names-or-ids")
private ArrayList<String> removeApplications;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
public class FoDUserGroupCreateCommand extends AbstractFoDJsonNodeOutputCommand implements IRecordTransformer, IActionCommandResultSupplier {
@Getter @Mixin private OutputHelperMixins.Create outputHelper;

@Parameters(index = "0", descriptionKey = "group-name")
@Parameters(index = "0", descriptionKey = "fcli.fod.user-group.create.name")
private String groupName;
@Option(names = {"--add-all-users"})
private Boolean addAllUsers = false;
@Option(names = {"--users"}, required = false, split = ",", descriptionKey = "fcli.fod.user.user-name-or-id")
@Option(names = {"--users"}, required = false, split = ",", descriptionKey = "fcli.fod.user.user-names-or-ids")
private ArrayList<String> users;
@Option(names = {"--applications"}, required = false, split = ",", descriptionKey = "fcli.fod.app-name-or-id")
@Option(names = {"--applications"}, required = false, split = ",", descriptionKey = "fcli.fod.app.app-names-or-ids")
private ArrayList<String> applications;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ public class FoDUserGroupUpdateCommand extends AbstractFoDJsonNodeOutputCommand

@Mixin private FoDUserGroupResolverMixin.PositionalParameter userGroupResolver;

@Option(names = {"--new-name"})
@Option(names = {"--name"})
private String newName;
@Option(names = {"--add-all-users"})
private Boolean addAllUsers = false;
@Option(names = {"--remove-all-users"})
private Boolean removeAllUsers = false;
@Option(names = {"--add-users"}, required = false, split = ",", descriptionKey = "fcli.fod.user.user-name-or-id")
@Option(names = {"--add-users"}, required = false, split = ",", descriptionKey = "fcli.fod.user.user-names-or-ids")
private ArrayList<String> addUsers;
@Option(names = {"--remove-users"}, required = false, split = ",", descriptionKey = "fcli.fod.user.user-name-or-id")
@Option(names = {"--remove-users"}, required = false, split = ",", descriptionKey = "fcli.fod.user.user-names-or-ids")
private ArrayList<String> removeUsers;
@Option(names = {"--add-apps", "--add-applications"}, required = false, split = ",", descriptionKey = "fcli.fod.app-name-or-id")
@Option(names = {"--add-apps", "--add-applications"}, required = false, split = ",", descriptionKey = "fcli.fod.app.app-names-or-ids")
private ArrayList<String> addApplications;
@Option(names = {"--remove-apps", "--remove-applications"}, required = false, split = ",", descriptionKey = "fcli.fod.app-name-or-id")
@Option(names = {"--remove-apps", "--remove-applications"}, required = false, split = ",", descriptionKey = "fcli.fod.app.app-names-or-ids")
private ArrayList<String> removeApplications;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,20 @@ fcli.fod.group.group-name-or-id = Group id or name. Note that numeric values are
fcli.fod.filters-param = Server-side queries are automatically generated from the -q / --query option if possible; \
generated queries can be viewed in the debug log. The --q-param option can be used to override the automatically generated query, \
for example to further optimize the request. See the Fortify on Demand REST API documentation for information on supported formats.
fcli.fod.app-name-or-id = One or more comma-separated application id's or name's. Note that numeric values \
are always interpreted as id's. If you have numeric application names, you will need to specify the \
application id.

# User/group/app assignment preview options
fcli.fod.app.app-names-or-ids = (DEPRECATED) One or more comma-separated application id's or name's. Note that numeric values \
are always interpreted as id's. If you have numeric application names, you will need to specify the application id. \
This functionality will likely be moved to a different command in an upcoming minor fcli release, potentially affecting \
any workflows in which this option is being used.
fcli.fod.group.group-names-or-ids = (DEPRECATED) One or more comma-separated group id's or name's. Note that numeric values \
are always interpreted as id's. If you have numeric group names, you will need to specify the group id. \
This functionality will likely be moved to a different command in an upcoming minor fcli release, potentially affecting \
any workflows in which this option is being used.
fcli.fod.user.user-names-or-ids = (DEPRECATED) One or more comma-separated user id's or name's. Note that numeric values \
are always interpreted as id's. If you have numeric user names, you will need to specify the user id. \
This functionality will likely be moved to a different command in an upcoming minor fcli release, potentially affecting \
any workflows in which this option is being used.

# Shared options
scan-id's[0] = One or more scan id's; supports '-' to reference a scan id previously stored using '--store -'
Expand Down Expand Up @@ -301,7 +312,9 @@ fcli.fod.scan.start-sast.using-remediation-entitlement = Running scan using enti
fcli.fod.scan.start-dast.usage.header = Start a new DAST scan (PREVIEW).
fcli.fod.scan.start-dast.usage.description = This command is not fully implemented and is intended for preview only. \
It can only be used for starting a configured Dynamic scan and does not support file uploads (i.e. API definitions \
or workflows).
or workflows). \
Command name, options and behavior may change at any time, even between patch or minor releases, potentially affecting \
any workflows in which this command is being used.
fcli.fod.scan.start-dast.assessment-type = The type of Dynamic assessment to carry out. Valid values: ${COMPLETION-CANDIDATES}
fcli.fod.scan.start-dast.start-date = ${fcli.fod.scan.start-sast.start-date}
fcli.fod.scan.start-dast.entitlement-id = ${fcli.fod.scan.start-sast.entitlement-id}
Expand All @@ -315,7 +328,9 @@ fcli.fod.scan.start-dast.using-entitlement = Running scan using entitlement %s.
fcli.fod.scan.start-dast.validating-remediation-entitlement = Validating remediation entitlements.
fcli.fod.scan.start-dast.using-remediation-entitlement = Running scan using entitlement %s.
fcli.fod.scan.start-mobile.usage.header = Start a new Mobile scan (PREVIEW).
fcli.fod.scan-start-mobile.usage.description = This command is not fully implemented and is intended for preview only.
fcli.fod.scan-start-mobile.usage.description = This command is not fully implemented and is intended for preview only. \
Command name, options and behavior may change at any time, even between patch or minor releases, potentially affecting \
any workflows in which this command is being used.
fcli.fod.scan.start-mobile.start-date = ${fcli.fod.scan.start-sast.start-date}
fcli.fod.scan.start-mobile.assessment-type = The type of Mobile assessment to carry out. Valid values: ${COMPLETION-CANDIDATES}.
fcli.fod.scan.start-mobile.entitlement-id = ${fcli.fod.scan.start-sast.entitlement-id}
Expand All @@ -330,18 +345,28 @@ fcli.fod.scan.start-mobile.using-entitlement = Running scan using entitlement %s
fcli.fod.scan.start-mobile.validating-remediation-entitlement = Validating remediation entitlements.
fcli.fod.scan.start-mobile.using-remediation-entitlement = Running scan using entitlement %s.

fcli.fod.scan-config.usage.header = Setup scan configurations on FoD.
fcli.fod.scan-config.usage.header = Setup scan configurations on FoD (PREVIEW).
fcli.fod.scan-config.usage.description = This command and all sub-commands are intended for preview purposes only. \
Command names, options and behavior may change at any time, even between patch or minor releases, potentially affecting \
any workflows in which these commands are being used.
fcli.fod.scan-config.get-dast.usage.header = Get current DAST scan configuration (PREVIEW).
fcli.fod.scan-config.get-dast.usage.description = This command is not fully implemented and is intended for preview only.
fcli.fod.scan-config.get-dast.usage.description = This command is not fully implemented and is intended for preview only. \
Command name, options and behavior may change at any time, even between patch or minor releases, potentially affecting \
any workflows in which this command is being used.
fcli.fod.scan-config.get-mobile.usage.header = Get current Mobile scan configuration (UNAVAILABLE).
fcli.fod.scan-config.get-mobile.usage.description = This command will currently fail as FoD doesn't provide \
an API endpoint for retrieving mobile scan configuration. For now, this command only exists for consistency \
with the other get-* commands, to not leave users wondering why there is no 'get-mobile' command. \
If the necessary endpoint is added to a future FoD version, this command should start functioning \
automatically, and this message will be removed.
fcli.fod.scan-config.get-sast.usage.header = Get current SAST scan configuration.
automatically, and this message will be removed in a next fcli release.
fcli.fod.scan-config.get-sast.usage.header = Get current SAST scan configuration (PREVIEW).
fcli.fod.scan-config.get-sast.usage.description = This command is intended for preview only. \
Command name, options and behavior may change at any time, even between patch or minor releases, potentially affecting \
any workflows in which this command is being used.
fcli.fod.scan-config.setup-sast.usage.header = Configure the release for enabling SAST scans (PREVIEW).
fcli.fod.scan-config.setup-sast.usage.description = This command is not fully implemented and is intended for preview only.
fcli.fod.scan-config.setup-sast.usage.description = This command is not fully implemented and is intended for preview only. \
Command name, options and behavior may change at any time, even between patch or minor releases, potentially affecting \
any workflows in which this command is being used.
fcli.fod.scan-config.setup-sast.entitlement-frequency = The Entitlement Frequency to use. Valid values: ${COMPLETION-CANDIDATES}.
fcli.fod.scan-config.setup-sast.entitlement-id = Entitlement Id to use. If not specified Frequency and Assessment Type will be used to find one.
fcli.fod.scan-config.setup-sast.validate-entitlement = Check if the entitlement assigned is still valid, e.g. it has not expired.
Expand Down Expand Up @@ -377,8 +402,6 @@ fcli.fod.user.create.firstname = The first name of the user.
fcli.fod.user.create.lastname = The last name of the user.
fcli.fod.user.create.phone = The phone number of the user.
fcli.fod.user.create.role = The id or name of the role the user should be given.
fcli.fod.user.create.group = The id or name of a group the user should be added to.
fcli.fod.user.create.application = The id or name of an application to give the user permission to.
fcli.fod.user.delete.usage.header = Delete a user.
fcli.fod.user.list.usage.header = List users.
fcli.fod.user.get.usage.header = Get user details.
Expand All @@ -392,10 +415,6 @@ fcli.fod.user.update.password = Updated user password.
fcli.fod.user.update.password-never-expires = Set a flag to indicate that the user's password will never expire.
fcli.fod.user.update.suspended = Suspend the user.
fcli.fod.user.update.must-change = Set a flag to indicate that user's password must be changed on next login.
fcli.fod.user.update.add-group = The id or name of a group the user should be added to.
fcli.fod.user.update.remove-group = The id or name of a group the user should be removed from.
fcli.fod.user.update.add-application = The id or name of an application the user should be added to.
fcli.fod.user.update.remove-application = The id or name of an application the user should be removed from.

### For the "fod user-group" command ###
fcli.fod.user-group.usage.header = Manage FoD user groups.
Expand All @@ -406,22 +425,21 @@ fcli.fod.user-group.output.header.assignedUsersCount = Assigned Users
fcli.fod.user-group.output.header.assignedApplicationsCount = Assigned Applications

fcli.fod.user-group.create.usage.header = Create a new user group.
fcli.fod.user-group.create.group-name = The name of the user group.
fcli.fod.user-group.create.add-all-users = Add all tenant users to the user group.
fcli.fod.user-group.create.user = The id or name of a user to add to the user group.
fcli.fod.user-group.create.application = The id or name of an application to give the user group permission to.
fcli.fod.user-group.create.name = The name of the user group.
fcli.fod.user-group.create.add-all-users = (DEPRECATED) Add all tenant users to the user group. \
This functionality will likely be moved to a different command in an upcoming minor fcli release, potentially affecting \
any workflows in which this option is being used.
fcli.fod.user-group.delete.usage.header = Delete a user group.
fcli.fod.user-group.list.usage.header = List user groups.
fcli.fod.user-group.get.usage.header = Get user group details.
fcli.fod.user-group.update.usage.header = Update a user group.
fcli.fod.user-group.update.new-name = The updated name of the user group.
fcli.fod.user-group.update.add-all-users = Add all tenant users to the user group.
fcli.fod.user-group.update.remove-all-users = Remove all tenant users to the user group.
fcli.fod.user-group.update.add-user = The id or name of a user to add to the user group.
fcli.fod.user-group.update.remove-user = The id or name of a user to remove from the user group.
fcli.fod.user-group.update.add-application = The id or name of an application to give the user group permission to.
fcli.fod.user-group.update.remove-application = The id or name of an application to remove the user group permission to.

fcli.fod.user-group.update.name = The updated name of the user group.
fcli.fod.user-group.update.add-all-users = (DEPRECATED) Add all tenant users to the user group. \
This functionality will likely be moved to a different command in an upcoming minor fcli release, potentially affecting \
any workflows in which this option is being used.
fcli.fod.user-group.update.remove-all-users = (DEPRECATED) Remove all tenant users to the user group. \
This functionality will likely be moved to a different command in an upcoming minor fcli release, potentially affecting \
any workflows in which this option is being used.

#################################################################################################################
# The following are technical properties that shouldn't be internationalized ####################################
Expand Down

0 comments on commit 64d81e2

Please sign in to comment.