Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/cli/cmd/organization_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func newOrganizationUpdateCmd() *cobra.Command {
blockOnPolicyViolation bool
policiesAllowedHostnames []string
preventImplicitWorkflowCreation bool
disableRequirementsAutoMatching bool
)

cmd := &cobra.Command{
Expand All @@ -45,6 +46,10 @@ func newOrganizationUpdateCmd() *cobra.Command {
opts.PreventImplicitWorkflowCreation = &preventImplicitWorkflowCreation
}

if cmd.Flags().Changed("disable-requirements-auto-matching") {
opts.DisableRequirementsAutoMatching = &disableRequirementsAutoMatching
}

_, err := action.NewOrgUpdate(ActionOpts).Run(cmd.Context(), orgName, opts)
if err != nil {
return err
Expand All @@ -62,5 +67,6 @@ func newOrganizationUpdateCmd() *cobra.Command {
cmd.Flags().BoolVar(&blockOnPolicyViolation, "block", false, "set the default policy violation blocking strategy")
cmd.Flags().StringSliceVar(&policiesAllowedHostnames, "policies-allowed-hostnames", []string{}, "set the allowed hostnames for the policy engine")
cmd.Flags().BoolVar(&preventImplicitWorkflowCreation, "prevent-implicit-workflow-creation", false, "prevent workflows and projects from being created implicitly during attestation init")
cmd.Flags().BoolVar(&disableRequirementsAutoMatching, "disable-requirements-auto-matching", false, "disable automatic matching of policies to requirements based on parameters. When enabled, only explicit requirement references are used")
return cmd
}
1 change: 1 addition & 0 deletions app/cli/documentation/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2763,6 +2763,7 @@ Options

```
--block set the default policy violation blocking strategy
--disable-requirements-auto-matching disable automatic matching of policies to requirements based on parameters. When enabled, only explicit requirement references are used
-h, --help help for update
--name string organization name
--policies-allowed-hostnames strings set the allowed hostnames for the policy engine
Expand Down
2 changes: 2 additions & 0 deletions app/cli/pkg/action/org_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type NewOrgUpdateOpts struct {
BlockOnPolicyViolation *bool
PoliciesAllowedHostnames *[]string
PreventImplicitWorkflowCreation *bool
DisableRequirementsAutoMatching *bool
}

func (action *OrgUpdate) Run(ctx context.Context, name string, opts *NewOrgUpdateOpts) (*OrgItem, error) {
Expand All @@ -42,6 +43,7 @@ func (action *OrgUpdate) Run(ctx context.Context, name string, opts *NewOrgUpdat
Name: name,
BlockOnPolicyViolation: opts.BlockOnPolicyViolation,
PreventImplicitWorkflowCreation: opts.PreventImplicitWorkflowCreation,
DisableRequirementsAutoMatching: opts.DisableRequirementsAutoMatching,
}

if opts.PoliciesAllowedHostnames != nil {
Expand Down
21 changes: 16 additions & 5 deletions app/controlplane/api/controlplane/v1/organization.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions app/controlplane/api/controlplane/v1/organization.proto
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ message OrganizationServiceUpdateRequest {

// restrict_contract_creation_to_org_admins restricts contract creation (org-level and project-level) to only organization admins (owner/admin roles)
optional bool restrict_contract_creation_to_org_admins = 6;

// disable_requirements_auto_matching disables automatic matching of policies to requirements
optional bool disable_requirements_auto_matching = 7;
}

message OrganizationServiceUpdateResponse {
Expand Down
18 changes: 14 additions & 4 deletions app/controlplane/api/controlplane/v1/response_messages.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions app/controlplane/api/controlplane/v1/response_messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ message OrgItem {
bool prevent_implicit_workflow_creation = 7;
// restrict_contract_creation_to_org_admins restricts contract creation (org-level and project-level) to only organization admins (owner/admin roles)
bool restrict_contract_creation_to_org_admins = 8;
// disable_requirements_auto_matching disables automatic matching of policies to requirements
bool disable_requirements_auto_matching = 9;

enum PolicyViolationBlockingStrategy {
POLICY_VIOLATION_BLOCKING_STRATEGY_UNSPECIFIED = 0;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading