Skip to content

Commit

Permalink
refactor: update executePlugins function to operate on a slice of `…
Browse files Browse the repository at this point in the history
…PluginSpec`'s (#206)

## Issue
Resolves #211

## Description
The purpose of this PR is to refactor the `executePlugin` function to
operate on a slice of `PluginSpec`'s as opposed to a `ValidatorConfig`.
This is prep work to help us soon support the `--crd` flag where users
will be able to pass in CRs for various validation rules.

In the process of making these changes, I updated the oci and network
plugins to fully support direct invocation of rules that previously
required k8s secrets. Now those credentials/pubkeys that were defined in
secrets can be defined inline within the oci and network plugin specs.
To get this fully working, this PR also includes changes to:
- Update OCI prompts to support configuring inline signature
verification public keys
- Update Network prompts to support configuring inline auth details for
HTTPFileRules
  • Loading branch information
ahmad-ibra authored Sep 6, 2024
1 parent 57ca6cb commit 97875f3
Show file tree
Hide file tree
Showing 12 changed files with 266 additions and 234 deletions.
2 changes: 1 addition & 1 deletion build
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ require (
github.com/spectrocloud-labs/prompts-tui v0.1.2
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/validator-labs/validator v0.1.9
github.com/validator-labs/validator v0.1.10
github.com/validator-labs/validator-plugin-aws v0.1.7
github.com/validator-labs/validator-plugin-azure v0.0.20
github.com/validator-labs/validator-plugin-maas v0.0.12
github.com/validator-labs/validator-plugin-network v0.0.26
github.com/validator-labs/validator-plugin-network v0.1.0
github.com/validator-labs/validator-plugin-oci v0.3.3
github.com/validator-labs/validator-plugin-vsphere v0.0.34
github.com/vmware/govmomi v0.42.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -862,16 +862,16 @@ github.com/tjfoc/gmsm v1.4.1 h1:aMe1GlZb+0bLjn+cKTPEvvn9oUEBlJitaZiiBwsbgho=
github.com/tjfoc/gmsm v1.4.1/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE=
github.com/transparency-dev/merkle v0.0.2 h1:Q9nBoQcZcgPamMkGn7ghV8XiTZ/kRxn1yCG81+twTK4=
github.com/transparency-dev/merkle v0.0.2/go.mod h1:pqSy+OXefQ1EDUVmAJ8MUhHB9TXGuzVAT58PqBoHz1A=
github.com/validator-labs/validator v0.1.9 h1:jFFp0ovfkdmYBR+FFEQNsc6G7SDj3YMiB/X+nFXPTd0=
github.com/validator-labs/validator v0.1.9/go.mod h1:jErFY8zdH1b1jsRCjpI/RKTDphaE0bXRwKpSqTytz9w=
github.com/validator-labs/validator v0.1.10 h1:0jj6urk4Vp6rNOh3i11qOjoglLmkUvAH3aqDtJ4aFKI=
github.com/validator-labs/validator v0.1.10/go.mod h1:HHozEO20mmN+TtU5zOD9Rw8tVU9pSHXkJrJAs+WH/XQ=
github.com/validator-labs/validator-plugin-aws v0.1.7 h1:0/lxM8vhW8+WI4sahc93bSIzXF4rumB4x3VgzegDmgI=
github.com/validator-labs/validator-plugin-aws v0.1.7/go.mod h1:UTKVDALO3RupW5XKYWNAf97mN8hlx7qv2iR7rkYCzc8=
github.com/validator-labs/validator-plugin-azure v0.0.20 h1:+jbwDSPg0KPmoLkXuQsjf9GEY3Ujz1Lth25ytLJeFWs=
github.com/validator-labs/validator-plugin-azure v0.0.20/go.mod h1:l4K344bZG1biNHRHEAMDTKuRFkcRRfrfPXj6pqp4N5c=
github.com/validator-labs/validator-plugin-maas v0.0.12 h1:MO6F/uDNryrSV2x6prV+Hp4DFKE6ml8XSicNMmRhSrA=
github.com/validator-labs/validator-plugin-maas v0.0.12/go.mod h1:pbwTdZQNlfhoWF4pTucZxoKOflM35pJR3HuIBKNELbE=
github.com/validator-labs/validator-plugin-network v0.0.26 h1:IZKxJsFoAZxrEIrMwGAVt0dCrEJMi9VMRoeAfVRB1mc=
github.com/validator-labs/validator-plugin-network v0.0.26/go.mod h1:dCaAADawusvEWJppwebOzZXcH5vmF/QvysNVo6s7Se8=
github.com/validator-labs/validator-plugin-network v0.1.0 h1:Z/2b/5lMRxssRWHAUHPJi6bfmsTzfJpi+tpXEgrOVJ0=
github.com/validator-labs/validator-plugin-network v0.1.0/go.mod h1:AddRLweCYC+MkLu70P0H2+th+wdZjtEZKhkINSy7Wdw=
github.com/validator-labs/validator-plugin-oci v0.3.3 h1:O7pkKjYc78UX9ffjo+qMRZGWaYuSXPVjmfRvvNtpC50=
github.com/validator-labs/validator-plugin-oci v0.3.3/go.mod h1:ZhN/Jsc2KP0zSQBfj5yHmj1xPCt3/ulo5ab6O3GnJZw=
github.com/validator-labs/validator-plugin-vsphere v0.0.34 h1:AAujEYmGtnHcwLIff15IzC6tcXkaCc9HyCoGdG2Ofis=
Expand Down
Loading

0 comments on commit 97875f3

Please sign in to comment.