-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: updated shield provider to support new shield version #180
base: main
Are you sure you want to change the base?
Conversation
plugins/providers/shield/config.go
Outdated
@@ -21,6 +21,7 @@ type Credentials struct { | |||
Host string `json:"host" mapstructure:"host" validate:"required"` | |||
AuthHeader string `json:"auth_header" mapstructure:"auth_header" validate:"required"` | |||
AuthEmail string `json:"auth_email" mapstructure:"auth_email" validate:"required"` | |||
Version string `json:"version" mapstructure:"version"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to rename this to 'ClientVersion' or 'UseNewClient' with a boolean type?
At first glance, it seems that the version represents the credential version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's rename this file to shield_v2_client.go
or similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if err != nil { | ||
return nil, err | ||
} | ||
if credentials.ClientVersion == "new" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of "new" let's go with "v2"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it's not any specific version i.e. v2
or v3
we are upgrading it to.
It is a new shield for us and that new shield versions may also change with changing time.
Therefor renaming it to v2 looks like some exact version of shield, CMIIW?
and also once our shield deployment get's stable, we'll remove this logic and keep only one shield client.
LGTM |
No description provided.