diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a7c68b36..903ab8a40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ * [edge/#396](https://github.com/openziti/edge/issues/396) Process checks can incorrectly pass * [edge/#403](https://github.com/openziti/edge/issues/403) Support multiple executable signers signatures per process * [edge/#401](https://github.com/openziti/edge/issues/401) Improve OS checks to support X.Y.Z semver comparisons + * [edge/#406](https://github.com/openziti/edge/issues/406) Adds `WindowsServer` in addition to `Windows` for server vs desktop os checks ### Improve OS checks to support X.Y.Z semver comparisons diff --git a/go.mod b/go.mod index e010beb4a..55bf6a5d7 100644 --- a/go.mod +++ b/go.mod @@ -2,15 +2,15 @@ module github.com/openziti/ziti go 1.14 -// replace github.com/openziti/foundation => ../foundation +//replace github.com/openziti/foundation => ../foundation // replace github.com/michaelquigley/dilithium => ../../q/research/dilithium -// replace github.com/openziti/fabric => ../fabric +//replace github.com/openziti/fabric => ../fabric -// replace github.com/openziti/sdk-golang => ../sdk-golang +//replace github.com/openziti/sdk-golang => ../sdk-golang -// replace github.com/openziti/edge => ../edge +//replace github.com/openziti/edge => ../edge require ( github.com/Jeffail/gabs v1.4.0 @@ -25,10 +25,10 @@ require ( github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 github.com/michaelquigley/pfxlog v0.0.0-20190813191113-2be43bd0dccc - github.com/openziti/edge v0.17.16 + github.com/openziti/edge v0.17.18 github.com/openziti/fabric v0.14.16 github.com/openziti/foundation v0.14.16 - github.com/openziti/sdk-golang v0.14.9 + github.com/openziti/sdk-golang v0.14.10 github.com/pborman/uuid v1.2.0 github.com/pkg/errors v0.9.1 github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 diff --git a/go.sum b/go.sum index 21eaeafc6..0dd81273f 100644 --- a/go.sum +++ b/go.sum @@ -496,18 +496,17 @@ github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoT github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/openziti/edge v0.17.16 h1:uQ5DCYNmynPNaknG4z5DzAEvXwMW9FUMO2QaKCwLqv4= -github.com/openziti/edge v0.17.16/go.mod h1:fawL4+h2LewOKoUHoT23XHecYAqNo8dsr9DEZGsWqf4= +github.com/openziti/edge v0.17.18 h1:50qAK2cgxRmmQbXHXn+ZV17eaYd4X1jaWFm2MaqKwu0= +github.com/openziti/edge v0.17.18/go.mod h1:4TwpD7s/uEwVjM5HK1PJTyPakR2WEVraQbVQF9u+4es= github.com/openziti/fabric v0.14.16 h1:l+5ZX4FoXHusYDq7bFRaqOFtLpIVuZ/lqYibTKEJwg0= github.com/openziti/fabric v0.14.16/go.mod h1:aNECd87kH0bKntsHwPHtjbYf/9bk3MnlzQj21maO6FQ= github.com/openziti/foundation v0.14.15 h1:9QqOqo82wzws8zf5bfqezrmRj9E7AU1hnZHz8wiI9JY= github.com/openziti/foundation v0.14.15/go.mod h1:z98OIbCyr2B57EtamNgvDVIoQXct+zVVxOif9KsOOaM= github.com/openziti/foundation v0.14.16 h1:37jQVIVc3ZB/5Eb6FNS5uH6jQauTEbMWeIgblZCCnyQ= github.com/openziti/foundation v0.14.16/go.mod h1:z98OIbCyr2B57EtamNgvDVIoQXct+zVVxOif9KsOOaM= -github.com/openziti/sdk-golang v0.14.8 h1:b1BELh/n0heuwaCmjOKJvyLRhtc3ePOPRWnpuXcRuPY= -github.com/openziti/sdk-golang v0.14.8/go.mod h1:oD18qkd+NQrT0oRuq6eckKcmvgCum8lmP3wV7R8yWBg= -github.com/openziti/sdk-golang v0.14.9 h1:R6tv7ZH313uGUtyeq+D0tsbcDntHR57rEXI+0wphkwE= github.com/openziti/sdk-golang v0.14.9/go.mod h1:oD18qkd+NQrT0oRuq6eckKcmvgCum8lmP3wV7R8yWBg= +github.com/openziti/sdk-golang v0.14.10 h1:XzbCDkJy+bh2M2uY1QvudksB+W8eXwZtIyp/QuLaVCk= +github.com/openziti/sdk-golang v0.14.10/go.mod h1:oD18qkd+NQrT0oRuq6eckKcmvgCum8lmP3wV7R8yWBg= github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6 h1:lNCW6THrCKBiJBpz8kbVGjC7MgdCGKwuvBgc7LoD6sw= github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= diff --git a/ziti/cmd/ziti/cmd/edge_controller/create_posture_check.go b/ziti/cmd/ziti/cmd/edge_controller/create_posture_check.go index 383b0b525..f66ea59bc 100644 --- a/ziti/cmd/ziti/cmd/edge_controller/create_posture_check.go +++ b/ziti/cmd/ziti/cmd/edge_controller/create_posture_check.go @@ -176,7 +176,7 @@ func newCreatePostureCheckProcessCmd(f cmdutil.Factory, out io.Writer, errOut io } cmd := &cobra.Command{ - Use: fmt.Sprintf("process ", OsLinux, OsMacOs, OsWindows), + Use: fmt.Sprintf("process ", OsLinux, OsMacOs, OsWindows, OsWindowsServer), Short: "creates a posture check for an OS specific process", Args: func(cmd *cobra.Command, args []string) error { if err := cobra.ExactArgs(3)(cmd, args); err != nil { @@ -184,7 +184,7 @@ func newCreatePostureCheckProcessCmd(f cmdutil.Factory, out io.Writer, errOut io } os := normalizeOsType(args[1]) if os == "" || os == OsAndroid || os == OsIOS { - return fmt.Errorf("invalid os type [%s]: expected %s|%s|%s", args[1], OsLinux, OsMacOs, OsWindows) + return fmt.Errorf("invalid os type [%s]: expected %s|%s|%s|%s", args[1], OsLinux, OsMacOs, OsWindows, OsWindowsServer) } options.normalizedOs = os @@ -214,11 +214,12 @@ func newCreatePostureCheckProcessCmd(f cmdutil.Factory, out io.Writer, errOut io } const ( - OsAndroid = "Android" - OsWindows = "Windows" - OsMacOs = "macOS" - OsIOS = "iOS" - OsLinux = "Linux" + OsAndroid = "Android" + OsWindows = "Windows" + OsWindowsServer = "WindowsServer" + OsMacOs = "macOS" + OsIOS = "iOS" + OsLinux = "Linux" PostureCheckTypeDomain = "DOMAIN" PostureCheckTypeProcess = "PROCESS" @@ -240,6 +241,8 @@ func normalizeOsType(os string) string { return OsIOS case "linux": return OsLinux + case "windowsserver": + return OsWindowsServer } return "" diff --git a/ziti/cmd/ziti/cmd/edge_controller/update_posture_check.go b/ziti/cmd/ziti/cmd/edge_controller/update_posture_check.go index 7380183af..52aba4786 100644 --- a/ziti/cmd/ziti/cmd/edge_controller/update_posture_check.go +++ b/ziti/cmd/ziti/cmd/edge_controller/update_posture_check.go @@ -304,7 +304,7 @@ func runUpdatePostureCheckProcess(o *updatePostureCheckProcessOptions) error { os := normalizeOsType(o.os) if os == "" || os == OsAndroid || os == OsIOS { - return fmt.Errorf("invalid os type [%s]: expected %s|%s|%s", o.os, OsLinux, OsMacOs, OsWindows) + return fmt.Errorf("invalid os type [%s]: expected %s|%s|%s|%s", o.os, OsLinux, OsMacOs, OsWindows, OsWindowsServer) } setJSONValue(entityData, o.os, "process", "osType")