mirror of
https://github.com/openziti/ziti.git
synced 2026-10-13 07:41:17 +00:00
+200
@@ -1,3 +1,203 @@
|
||||
# Release 0.18.5
|
||||
|
||||
## What's New
|
||||
|
||||
* Update go-openapi libraries
|
||||
* xgress_edge refactor, should fix 'failed to dipsatch to fabric' errors
|
||||
* Update `ziti use` command to work with main branch
|
||||
* MFA Support
|
||||
* Fix deadlock on session close in router when connection is at capacity
|
||||
* Fix issue where end of session didn't get sent in some scenarios
|
||||
|
||||
## MFA Support
|
||||
|
||||
Endpoint MFA is available that is based on RFC 4226 (HOTP: An HMAC-Based One-Time Password
|
||||
Algorithm) and RFC 6238 (TOTP: Time-Based One-Time Password Algorithm). These standards are
|
||||
compatible with standard "Authenticator" apps such as Google Authenticator and Authy. MFA is
|
||||
suggested to be used in situations where human operators are involved and additional security is
|
||||
desired.
|
||||
|
||||
### Restricting Service Access
|
||||
|
||||
Services can now have a Posture Check of type MFA that can be created and associated with a Service
|
||||
Policy. Service Policies that are associated with an MFA Posture Check will restrict access to
|
||||
services if a client has not enrolled in MFA and passed an MFA check on each login.
|
||||
|
||||
MFA Posture Checks support only the basic Posture Check fields:
|
||||
|
||||
- name - a name for the posture check
|
||||
- typeId - should be "MFA"
|
||||
- tags - any tags desired for this object
|
||||
- roleAttributes - role attributes used to select this object from Service Policies
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
POST /posture-checks
|
||||
{
|
||||
"name": "Any MFA",
|
||||
"typeId": "MFA",
|
||||
"roleAttributes": ["mfa"]
|
||||
}
|
||||
```
|
||||
|
||||
### Admin MFA Management
|
||||
|
||||
Admins of the Ziti Edge API can remove MFA from any user. However, they cannot enroll on behalf of
|
||||
the client. The client will have to initiate MFA enrollment via their client.
|
||||
|
||||
Endpoints:
|
||||
|
||||
- `DELETE /identities/<id>/mfa` - remove MFA from an identity
|
||||
- `GET /identities` - has a new field `isMfaEnabled` that is true/false based on the identity's MFA
|
||||
enrollment
|
||||
- `GET /identities/<id>/posture-data` - now includes a `sessionPostureData` field which is a map of
|
||||
sessionId -> session posture data (including MFA status)
|
||||
|
||||
Example Posture Data:
|
||||
|
||||
```
|
||||
{
|
||||
"mac": ["03092ac3bc69", "2b6df1dc52d9"],
|
||||
"domain": "mycorp.com",
|
||||
"os": {
|
||||
...
|
||||
},
|
||||
processes: [
|
||||
...
|
||||
],
|
||||
sessionPostureData: {
|
||||
"xV1442s": {
|
||||
"mfa": {
|
||||
"passedMfa": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Client MFA Enrollment
|
||||
|
||||
Clients must individually enroll in MFA as the enrollment process includes exchanging a symmetric
|
||||
key. During MFA enrollment the related MFA endpoints will return different data and HTTP status
|
||||
codes based upon the state of MFA enrollment (enrollment not started, enrollment started, enrolled).
|
||||
|
||||
The general MFA enrollment flow is:
|
||||
|
||||
1. Authenticate as the identity via `POST /authenticate`
|
||||
2. Start MFA enrollment via `POST /current-identity/mfa`
|
||||
3. Retrieve the MFA provisioning URL or QR code
|
||||
- `GET /current-identity/mfa`
|
||||
- `GET /current-identity/mfa/qr-code`
|
||||
4. Use the provisioning URL or QR code with an authentication app such as Google Authenticator,
|
||||
Authy, etc.
|
||||
5. Use a current code from the authenticator to `POST /current-identity/mfa/verify` with the code in
|
||||
the `code` field `{"code": "someCode"}`
|
||||
|
||||
#### MFA Endpoints Overview:
|
||||
|
||||
This section is an overview for the endpoints. Each endpoint may return errors depending on in input
|
||||
and MFA status.
|
||||
|
||||
- `GET /current-identity/mfa` - returns the current state of MFA enrollment or 404 Not Found
|
||||
- `POST /current-identity/mfa` - initiates MFA enrollment or 409 Conflict
|
||||
- `DELETE /current-identity/mfa` - remove MFA enrollment, requires a valid TOTP or recovery code
|
||||
- `GET /current-identity/mfa/recovery-codes` - returns the current recovery codes, requires a valid
|
||||
TOTP Code
|
||||
- `POST /current-identity/mfa/recovery-codes` - regenerates recovery codes, requires a valid TOTP
|
||||
code
|
||||
- `POST /current-identity/mfa/verify` - allows MFA enrollment to be completed, requires a valid TOTP
|
||||
code
|
||||
- `GET /current-identity/mfa/qr-code` - returns a QR code for use with QR code scanner, MFA
|
||||
enrollment must be started
|
||||
- `POST /authenticate/mfa` - allows MFA authentication checks to be completed, requires a valid TOTP
|
||||
or recovery code
|
||||
|
||||
MFA Enrollment Not Started:
|
||||
|
||||
- `GET /current-identity/mfa` - returns HTTP status 404
|
||||
- `POST /current-identity/mfa` - start MFA enrollment, 200 Ok
|
||||
- `DELETE /current-identity/mfa` - returns 404 Not Found
|
||||
- `GET /current-identity/mfa/recovery-codes` - returns 404 Not Found
|
||||
- `POST /current-identity/mfa` - returns 404 Not Found
|
||||
- `POST /current-identity/mfa/verify` - returns 404 Not Found
|
||||
- `GET /current-identity/mfa/qr-code` - returns 404 Not Found
|
||||
|
||||
MFA Enrollment Started:
|
||||
|
||||
- `GET /current-identity/mfa` - returns the current MFA enrollment and recovery codes
|
||||
- `POST /current-identity/mfa` - returns 409 Conflict
|
||||
- `DELETE /current-identity/mfa` - aborts the current enrollment, a blank `code` may be supplied
|
||||
- `GET /current-identity/mfa/recovery-codes` - returns 404 Not Found
|
||||
- `POST /current-identity/mfa` - returns HTTP status 409 Conflict
|
||||
- `POST /current-identity/mfa/verify` - validates the supplied `code`
|
||||
- `GET /current-identity/mfa/qr-code` - returns a QR code for use with QR code scanner in PNG format
|
||||
|
||||
MFA Completed:
|
||||
|
||||
- `GET /current-identity/mfa` - returns the current MFA enrollment, but not recovery codes
|
||||
- `POST /current-identity/mfa` - returns 409 Conflict
|
||||
- `DELETE /current-identity/mfa` - removes MFA, a valid TOTP or recovery code must be supplied
|
||||
- `GET /current-identity/mfa/recovery-codes` - shows the current recovery codes, a valid TOTP code
|
||||
must be supplied
|
||||
- `POST /current-identity/mfa` - returns HTTP status 409 Conflict
|
||||
- `POST /current-identity/mfa/verify` - returns HTTP status 409 Conflict
|
||||
- `GET /current-identity/mfa/qr-code` - returns 404 Not Found
|
||||
|
||||
### Client MFA Recovery Codes
|
||||
|
||||
Client MFA recovery codes are generated during enrollment and can be regenerated at any time with a
|
||||
valid TOTP code. Twenty codes are generated and are one time use only. Generating new codes replaces
|
||||
all existing recovery codes.
|
||||
|
||||
To view:
|
||||
|
||||
```
|
||||
GET /current-identity/mfa/recovery-codes
|
||||
{
|
||||
"code": "123456"
|
||||
}
|
||||
```
|
||||
|
||||
To Generate new codes:
|
||||
|
||||
```
|
||||
POST /current-identity/mfa/recovery-codes
|
||||
{
|
||||
"code": "123456"
|
||||
}
|
||||
```
|
||||
|
||||
### Authentication
|
||||
|
||||
During API Session authentication a new `authQuery` field is returned. This field will indicate if
|
||||
there are any outstanding authentication Posture Queries that need to be fulfilled before
|
||||
authentication is considered complete.
|
||||
|
||||
When MFA authentication is required a field will now appear as an
|
||||
`authQuery` with the following format:
|
||||
|
||||
```
|
||||
{
|
||||
...
|
||||
"token": "c68a187a-f4af-490c-a9dd-a09076511419",
|
||||
"authQueries": [
|
||||
...,
|
||||
{
|
||||
"typeId": "MFA",
|
||||
"provider": "ZITI",
|
||||
"httpMethod": "POST",
|
||||
"httpUrl": "./authenticate/mfa",
|
||||
"minLength": 4,
|
||||
"maxLength": 6,
|
||||
"format": "alphaNumeric"
|
||||
},
|
||||
...
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
# Release 0.18.4
|
||||
|
||||
## What's New
|
||||
|
||||
@@ -24,10 +24,10 @@ require (
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d
|
||||
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19
|
||||
github.com/michaelquigley/pfxlog v0.3.6
|
||||
github.com/openziti/edge v0.17.49
|
||||
github.com/openziti/fabric v0.15.13
|
||||
github.com/openziti/edge v0.17.53
|
||||
github.com/openziti/fabric v0.15.15
|
||||
github.com/openziti/foundation v0.15.9
|
||||
github.com/openziti/sdk-golang v0.15.10
|
||||
github.com/openziti/sdk-golang v0.15.12
|
||||
github.com/pborman/uuid v1.2.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
|
||||
@@ -40,7 +40,7 @@ require (
|
||||
github.com/spf13/viper v1.7.0
|
||||
github.com/stretchr/testify v1.7.0
|
||||
github.com/urfave/negroni v1.0.0
|
||||
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb
|
||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777
|
||||
google.golang.org/grpc v1.27.0
|
||||
gopkg.in/AlecAivazis/survey.v1 v1.8.7
|
||||
gopkg.in/resty.v1 v1.12.0
|
||||
|
||||
@@ -96,6 +96,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
||||
github.com/deepmap/oapi-codegen v1.3.6/go.mod h1:aBozjEveG+33xPiP55Iw/XbVkhtZHEGLq3nxlX0+hfU=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3 h1:AqeKSZIG/NIC75MNQlPy/LM3LxfpLwahICJBHwSMFNc=
|
||||
github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3/go.mod h1:hEfFauPHz7+NnjR/yHJGhrKo1Za+zStgwUETx3yzqgY=
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
|
||||
@@ -143,6 +145,8 @@ github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9sn
|
||||
github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU=
|
||||
github.com/go-openapi/analysis v0.19.10 h1:5BHISBAXOc/aJK25irLZnx2D3s6WyYaY9D4gmuz9fdE=
|
||||
github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ=
|
||||
github.com/go-openapi/analysis v0.19.16 h1:Ub9e++M8sDwtHD+S587TYi+6ANBG1NRYGZDihqk0SaY=
|
||||
github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk=
|
||||
github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
|
||||
github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
|
||||
github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
|
||||
@@ -151,18 +155,23 @@ github.com/go-openapi/errors v0.19.6 h1:xZMThgv5SQ7SMbWtKFkCf9bBdvR2iEyw9k3zGZON
|
||||
github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
|
||||
github.com/go-openapi/errors v0.19.7 h1:Lcq+o0mSwCLKACMxZhreVHigB9ebghJ/lrmeaqASbjo=
|
||||
github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
|
||||
github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
|
||||
github.com/go-openapi/errors v0.19.9 h1:9SnKdGhiPZHF3ttwFMiCBEb8jQ4IDdrK+5+a0oTygA4=
|
||||
github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
|
||||
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
|
||||
github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
|
||||
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
|
||||
github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w=
|
||||
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
|
||||
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
|
||||
github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
|
||||
github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
|
||||
github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o=
|
||||
github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
|
||||
github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg=
|
||||
github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg=
|
||||
github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM=
|
||||
github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg=
|
||||
github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
|
||||
github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
|
||||
github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
|
||||
@@ -170,14 +179,20 @@ github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix
|
||||
github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI=
|
||||
github.com/go-openapi/loads v0.19.5 h1:jZVYWawIQiA1NBnHla28ktg6hrcfTHsCE+3QLVRBIls=
|
||||
github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY=
|
||||
github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc=
|
||||
github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc=
|
||||
github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4=
|
||||
github.com/go-openapi/loads v0.20.1 h1:LX55ObGRfG+53/1KRKTvCfqC1U2Htf7KgkPBpIVhuUM=
|
||||
github.com/go-openapi/loads v0.20.1/go.mod h1:/6LfFL8fDvTSX8ypmYXIq3U9Q7nfniSOStW22m864WM=
|
||||
github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA=
|
||||
github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64=
|
||||
github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4=
|
||||
github.com/go-openapi/runtime v0.19.15 h1:2GIefxs9Rx1vCDNghRtypRq+ig8KSLrjHbAYI/gCLCM=
|
||||
github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo=
|
||||
github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98=
|
||||
github.com/go-openapi/runtime v0.19.22 h1:vtT7gJwxIK96BVTd9Ce5OPNQfIsk+q1j/+0e98NoVXk=
|
||||
github.com/go-openapi/runtime v0.19.22/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk=
|
||||
github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk=
|
||||
github.com/go-openapi/runtime v0.19.26 h1:K/6PoVNj5WJXUnMk+VEbELeXjtBkCS1UxTDa04tdXE0=
|
||||
github.com/go-openapi/runtime v0.19.26/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M=
|
||||
github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
|
||||
github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
|
||||
github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
|
||||
@@ -185,8 +200,11 @@ github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8
|
||||
github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk=
|
||||
github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg=
|
||||
github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk=
|
||||
github.com/go-openapi/spec v0.19.9 h1:9z9cbFuZJ7AcvOHKIY+f6Aevb4vObNDkTEyoMfO7rAc=
|
||||
github.com/go-openapi/spec v0.19.9/go.mod h1:vqK/dIdLGCosfvYsQV3WfC7N3TiZSnGY2RZKoFK7X28=
|
||||
github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU=
|
||||
github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU=
|
||||
github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ=
|
||||
github.com/go-openapi/spec v0.20.2 h1:pFPUZsiIbZ20kLUcuCGeuQWG735fPMxW7wHF9BWlnQU=
|
||||
github.com/go-openapi/spec v0.20.2/go.mod h1:RW6Xcbs6LOyWLU/mXGdzn2Qc+3aj+ASfI7rvSZh1Vls=
|
||||
github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
|
||||
github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
|
||||
github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY=
|
||||
@@ -195,8 +213,9 @@ github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6
|
||||
github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
|
||||
github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM=
|
||||
github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
|
||||
github.com/go-openapi/strfmt v0.19.6 h1:epWc+q5qSgsy7A7+/HYyxLF37vLEYdPSkNB9G8mRqjw=
|
||||
github.com/go-openapi/strfmt v0.19.6/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
|
||||
github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc=
|
||||
github.com/go-openapi/strfmt v0.20.0 h1:l2omNtmNbMc39IGptl9BuXBEKcZfS8zjrTsPKTiJiDM=
|
||||
github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc=
|
||||
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
||||
github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
||||
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
@@ -204,13 +223,18 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh
|
||||
github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY=
|
||||
github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE=
|
||||
github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY=
|
||||
github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M=
|
||||
github.com/go-openapi/swag v0.19.13 h1:233UVgMy1DlmCYYfOiFpta6e2urloh+sEs5id6lyzog=
|
||||
github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
|
||||
github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
|
||||
github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA=
|
||||
github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo=
|
||||
github.com/go-openapi/validate v0.19.10 h1:tG3SZ5DC5KF4cyt7nqLVcQXGj5A7mpaYkAcNPlDK+Yk=
|
||||
github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8=
|
||||
github.com/go-openapi/validate v0.19.11 h1:8lCr0b9lNWKjVjW/hSZZvltUy+bULl7vbnCTsOzlhPo=
|
||||
github.com/go-openapi/validate v0.19.11/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4=
|
||||
github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4=
|
||||
github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI=
|
||||
github.com/go-openapi/validate v0.20.1 h1:QGQ5CvK74E28t3DkegGweKR+auemUi5IdpMc4x3UW6s=
|
||||
github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0=
|
||||
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
@@ -464,6 +488,8 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu
|
||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=
|
||||
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
@@ -492,19 +518,15 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
|
||||
github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
|
||||
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/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
|
||||
github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
|
||||
github.com/openziti/edge v0.17.49 h1:blLsl7WvVsUItAl1yE6qhTqjopU2y73FI9R1AMmv+Xo=
|
||||
github.com/openziti/edge v0.17.49/go.mod h1:KgQ3i0444fyPVIrmgiYnQ03L9CeNR016g9q0kmDFV9w=
|
||||
github.com/openziti/fabric v0.15.12 h1:ZVQamwVrFzlZCmnqe8g4ZOXsUPo2g+GL8AdDplWUkew=
|
||||
github.com/openziti/fabric v0.15.12/go.mod h1:B8NeRzN+eIdo2Q4JUCbP0covC5SYqerrxwJsBgCU+A8=
|
||||
github.com/openziti/fabric v0.15.13 h1:GgS4Sbce6ubkDUtO2oPQFEzh5S9EiAjtMs50NJbuAvo=
|
||||
github.com/openziti/fabric v0.15.13/go.mod h1:B8NeRzN+eIdo2Q4JUCbP0covC5SYqerrxwJsBgCU+A8=
|
||||
github.com/openziti/foundation v0.15.8 h1:BFKDBkgsuXWgCtU7TS3eBPz2gceA057gK6W6IiyUQfM=
|
||||
github.com/openziti/foundation v0.15.8/go.mod h1:34ifQ24R2EUNjakzZBKY1M4EvnOWeIYJOrJxRGdRNh4=
|
||||
github.com/openziti/edge v0.17.53 h1:LJ2G6x/M+ZG+89yBHLdnKumXmkMIwnl+4LX53Bteb6g=
|
||||
github.com/openziti/edge v0.17.53/go.mod h1:irZJtq0WjOr/kNm35SZQopCxN7EenQsHctFXLxSAZ/U=
|
||||
github.com/openziti/foundation v0.15.9 h1:Do/wohULRt+3H6mlB8SZmIUl/mbxUuN7/Lf7nbz6ZRo=
|
||||
github.com/openziti/foundation v0.15.9/go.mod h1:34ifQ24R2EUNjakzZBKY1M4EvnOWeIYJOrJxRGdRNh4=
|
||||
github.com/openziti/sdk-golang v0.15.10 h1:iwYTmBsEOBxcQlXuwSSBQLipUyT4QuRDFYXkf6zjyYs=
|
||||
github.com/openziti/sdk-golang v0.15.10/go.mod h1:ZC5Tke4NFsRH3qcZnc9X51hGjpXlq0aOCcadgxnICYI=
|
||||
github.com/openziti/sdk-golang v0.15.11/go.mod h1:L1UbvXUV7DV6a3pd50CAJqtt9z6nN53p2cKNJlHZXR8=
|
||||
github.com/openziti/sdk-golang v0.15.12 h1:RDkqznApxSzbftAHsf99fHwSBdSAEKV21TgemjqYKA0=
|
||||
github.com/openziti/sdk-golang v0.15.12/go.mod h1:L1UbvXUV7DV6a3pd50CAJqtt9z6nN53p2cKNJlHZXR8=
|
||||
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=
|
||||
@@ -582,6 +604,8 @@ github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
|
||||
@@ -654,8 +678,10 @@ go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qL
|
||||
go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
|
||||
go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE=
|
||||
go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE=
|
||||
go.mongodb.org/mongo-driver v1.4.2 h1:WlnEglfTg/PfPq4WXs2Vkl/5ICC6hoG8+r+LraPmGk4=
|
||||
go.mongodb.org/mongo-driver v1.4.2/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc=
|
||||
go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc=
|
||||
go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc=
|
||||
go.mongodb.org/mongo-driver v1.4.5 h1:TLtO+iD8krabXxvY1F1qpBOHgOxhLWR7XsT7kQeRmMY=
|
||||
go.mongodb.org/mongo-driver v1.4.5/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc=
|
||||
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 h1:A/5uWzF44DlIgdm/PQFwfMkW0JX+cIcQi/SwLAmZP5M=
|
||||
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk=
|
||||
go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
|
||||
@@ -745,6 +771,11 @@ golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb h1:mUVeFHoDKis5nxCAzoAi7E8Ghb86EXh/RK6wtvJIqRY=
|
||||
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew=
|
||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
@@ -804,12 +835,18 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634 h1:bNEHhJCnrwMKNMmOx3yAynp5vs5/gRy+XWFtZFu7NBM=
|
||||
golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
|
||||
@@ -211,7 +211,7 @@ func (o *CommonOptions) getCurrentZitiSnapshotList() ([]string, error) {
|
||||
children, err := util.GetCurrentSnapshotListFromArtifactory(o.Verbose)
|
||||
|
||||
list := make([]string, 0)
|
||||
list = append(list, "master")
|
||||
list = append(list, "main")
|
||||
|
||||
for _, v := range children {
|
||||
str := strings.Replace(v.URI, "/", "", -1)
|
||||
|
||||
@@ -35,7 +35,7 @@ func TestInstallZitiApp(t *testing.T) {
|
||||
defer os.Unsetenv("HOME")
|
||||
err = os.Setenv("HOME", "/tmp/"+uuid.New())
|
||||
assert.Nil(t, err)
|
||||
err = (&CommonOptions{}).installZitiApp("master", c.ZITI_CONTROLLER, true, "0.0.0-0")
|
||||
err = (&CommonOptions{}).installZitiApp("main", c.ZITI_CONTROLLER, true, "0.0.0-0")
|
||||
|
||||
assert.FileExists(t, os.Getenv("HOME")+"/bin/"+c.ZITI_CONTROLLER)
|
||||
}
|
||||
|
||||
@@ -78,14 +78,14 @@ func NewCmdInstallZitiEdgeTunnel(f cmdutil.Factory, out io.Writer, errOut io.Wri
|
||||
}
|
||||
|
||||
// Run implements the command
|
||||
func (o *InstallZitiEdgeTunnelOptions) Run() error {
|
||||
func (o *InstallOptions) installZitiEdgeTunnel(targetVersion string) error {
|
||||
newVersion, err := o.getLatestGitHubReleaseVersion(version.GetBranch(), c.ZITI_EDGE_TUNNEL_GITHUB)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if o.Version != "" {
|
||||
newVersion, err = semver.Make(o.Version)
|
||||
if targetVersion != "" {
|
||||
newVersion, err = semver.Make(targetVersion)
|
||||
}
|
||||
|
||||
log.Infoln("Attempting to install '" + c.ZITI_EDGE_TUNNEL + "' version: " + newVersion.String())
|
||||
@@ -93,3 +93,8 @@ func (o *InstallZitiEdgeTunnelOptions) Run() error {
|
||||
return o.installGitHubRelease(version.GetBranch(), c.ZITI_EDGE_TUNNEL, c.ZITI_EDGE_TUNNEL_GITHUB, false, newVersion.String())
|
||||
|
||||
}
|
||||
|
||||
// Run implements the command
|
||||
func (o *InstallZitiEdgeTunnelOptions) Run() error {
|
||||
return o.installZitiEdgeTunnel(o.Version)
|
||||
}
|
||||
|
||||
@@ -77,18 +77,22 @@ func NewCmdInstallZitiProxC(f cmdutil.Factory, out io.Writer, errOut io.Writer)
|
||||
return cmd
|
||||
}
|
||||
|
||||
// Run implements the command
|
||||
func (o *InstallZitiProxCOptions) Run() error {
|
||||
func (o *InstallOptions) installZitiProxC(targetVersion string) error {
|
||||
newVersion, err := o.getLatestGitHubReleaseVersion(version.GetBranch(), c.ZITI_SDK_C_GITHUB)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if o.Version != "" {
|
||||
newVersion, err = semver.Make(o.Version)
|
||||
if targetVersion != "" {
|
||||
newVersion, err = semver.Make(targetVersion)
|
||||
}
|
||||
|
||||
log.Infoln("Attempting to install '" + c.ZITI_PROX_C + "' version: " + newVersion.String())
|
||||
|
||||
return o.installGitHubRelease(version.GetBranch(), c.ZITI_PROX_C, c.ZITI_SDK_C_GITHUB, false, newVersion.String())
|
||||
}
|
||||
|
||||
// Run implements the command
|
||||
func (o *InstallZitiProxCOptions) Run() error {
|
||||
return o.installZitiProxC(o.Version)
|
||||
}
|
||||
|
||||
+13
-12
@@ -32,7 +32,7 @@ import (
|
||||
|
||||
// UseOptions are the flags for delete commands
|
||||
type UseOptions struct {
|
||||
CreateOptions
|
||||
InstallOptions
|
||||
|
||||
Version string
|
||||
Branch string
|
||||
@@ -41,7 +41,7 @@ type UseOptions struct {
|
||||
// NewCmdUse creates the command
|
||||
func NewCmdUse(f cmdutil.Factory, out io.Writer, errOut io.Writer) *cobra.Command {
|
||||
options := &UseOptions{
|
||||
CreateOptions: CreateOptions{
|
||||
InstallOptions: InstallOptions{
|
||||
CommonOptions: CommonOptions{
|
||||
Factory: f,
|
||||
Out: out,
|
||||
@@ -78,13 +78,12 @@ build to a feature-branch build.
|
||||
}
|
||||
|
||||
func (o *UseOptions) install(branch string, zitiApp string) error {
|
||||
|
||||
newVersion, err := o.getLatestZitiAppVersionForBranch(branch, zitiApp)
|
||||
if err != nil {
|
||||
log.Infoln("Attempt to fetch latest version of '" + zitiApp + "' for branch '" + branch + "' failed: " + err.Error())
|
||||
|
||||
// Special-case branch fallback (to master) when dealing with ziti-prox-c
|
||||
if zitiApp == c.ZITI_PROX_C && branch != "master" {
|
||||
if zitiApp == c.ZITI_PROX_C || zitiApp == c.ZITI_EDGE_TUNNEL {
|
||||
branch = "master"
|
||||
newVersion, err = o.getLatestZitiAppVersionForBranch(branch, zitiApp)
|
||||
if err != nil {
|
||||
@@ -119,8 +118,8 @@ func (o *UseOptions) Run() error {
|
||||
}
|
||||
|
||||
if o.Staging {
|
||||
if o.Branch != "master" {
|
||||
log.Errorf("Error: --staging can only be used with --branch of 'master'. You specified '%s'", branch)
|
||||
if o.Branch != "main" {
|
||||
log.Errorf("Error: --staging can only be used with --branch of 'main'. You specified '%s'", branch)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -145,10 +144,6 @@ func (o *UseOptions) Run() error {
|
||||
if err != nil {
|
||||
log.Errorf("Error: install failed %s \n", err.Error())
|
||||
}
|
||||
err = o.install(branch, c.ZITI_PROX_C)
|
||||
if err != nil {
|
||||
log.Errorf("Error: install failed %s \n", err.Error())
|
||||
}
|
||||
err = o.install(branch, c.ZITI_ROUTER)
|
||||
if err != nil {
|
||||
log.Errorf("Error: install failed %s \n", err.Error())
|
||||
@@ -157,11 +152,17 @@ func (o *UseOptions) Run() error {
|
||||
if err != nil {
|
||||
log.Errorf("Error: install failed %s \n", err.Error())
|
||||
}
|
||||
err = o.install(branch, c.ZITI_EDGE_TUNNEL)
|
||||
err = o.install(branch, c.ZITI_ENROLLER)
|
||||
if err != nil {
|
||||
log.Errorf("Error: install failed %s \n", err.Error())
|
||||
}
|
||||
err = o.install(branch, c.ZITI_ENROLLER)
|
||||
|
||||
err = o.installZitiProxC("")
|
||||
if err != nil {
|
||||
log.Errorf("Error: install failed %s \n", err.Error())
|
||||
}
|
||||
|
||||
err = o.installZitiEdgeTunnel("")
|
||||
if err != nil {
|
||||
log.Errorf("Error: install failed %s \n", err.Error())
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ func GetLatestVersionFromArtifactory(verbose bool, staging bool, branch string,
|
||||
return semver.Version{}, fmt.Errorf("unable to get latest version for '%s' on branch '%s'; %s", appName, branch, resp.Status())
|
||||
}
|
||||
|
||||
result := (*resp.Result().(*ArtifactoryVersionsData))
|
||||
result := *resp.Result().(*ArtifactoryVersionsData)
|
||||
|
||||
return semver.Make(strings.TrimPrefix(result.Version, "v"))
|
||||
}
|
||||
@@ -174,7 +174,7 @@ func GetLatestGitHubReleaseVersion(verbose bool, appName string) (semver.Version
|
||||
return semver.Version{}, fmt.Errorf("unable to get latest version for '%s'; %s", appName, resp.Status())
|
||||
}
|
||||
|
||||
result := (*resp.Result().(*GitHubReleasesData))
|
||||
result := *resp.Result().(*GitHubReleasesData)
|
||||
|
||||
return semver.Make(strings.TrimPrefix(result.Version, "v"))
|
||||
}
|
||||
@@ -377,13 +377,13 @@ func GetArtifactoryPath(staging bool, appName string, branch string) string {
|
||||
var path string
|
||||
if staging {
|
||||
path = "ziti-staging/"
|
||||
} else if branch == "master" {
|
||||
} else if branch == "main" {
|
||||
path = "ziti-release/"
|
||||
} else {
|
||||
path = "ziti-snapshot/" + branch + "/"
|
||||
}
|
||||
// Special-case the source-repo when dealing with ziti-prox-c
|
||||
if branch == "master" && appName == c.ZITI_PROX_C {
|
||||
if branch == "main" && appName == c.ZITI_PROX_C {
|
||||
path = "ziti-staging/"
|
||||
}
|
||||
|
||||
@@ -394,10 +394,10 @@ func GetArtifactoryPath(staging bool, appName string, branch string) string {
|
||||
|
||||
func GetTerraformProviderArtifactoryPath(provider string, branch string) string {
|
||||
if branch == "" {
|
||||
branch = "master"
|
||||
branch = "main"
|
||||
}
|
||||
var path string
|
||||
if branch == "master" {
|
||||
if branch == "main" {
|
||||
path = c.TERRAFORM_PROVIDER_PREFIX + provider + "-release/"
|
||||
} else {
|
||||
path = c.TERRAFORM_PROVIDER_PREFIX + provider + "-snapshot/" + branch + "/"
|
||||
|
||||
Reference in New Issue
Block a user