tao12345666333 commented on code in PR #1588:
URL:
https://github.com/apache/apisix-ingress-controller/pull/1588#discussion_r1066632253
##########
pkg/kube/apisix/apis/config/v2beta3/types.go:
##########
@@ -170,10 +170,11 @@ type ApisixRouteHTTPPluginConfig map[string]interface{}
// ApisixRouteAuthentication is the authentication-related
// configuration in ApisixRoute.
type ApisixRouteAuthentication struct {
- Enable bool `json:"enable" yaml:"enable"`
- Type string `json:"type" yaml:"type"`
- KeyAuth ApisixRouteAuthenticationKeyAuth `json:"keyAuth,omitempty"
yaml:"keyAuth,omitempty"`
- JwtAuth ApisixRouteAuthenticationJwtAuth `json:"jwtAuth,omitempty"
yaml:"jwtAuth,omitempty"`
+ Enable bool `json:"enable" yaml:"enable"`
+ Type string `json:"type" yaml:"type"`
+ KeyAuth ApisixRouteAuthenticationKeyAuth `json:"keyAuth,omitempty"
yaml:"keyAuth,omitempty"`
+ JwtAuth ApisixRouteAuthenticationJwtAuth `json:"jwtAuth,omitempty"
yaml:"jwtAuth,omitempty"`
+ LDAPAuth ApisixRouteAuthenticationLDAPAuth `json:"ldapAuth,omitempty"
yaml:"ldapAuth,omitempty"`
Review Comment:
v2beta3 has been deprecated and we don't need to add any functionality to it.
##########
pkg/providers/apisix/translation/apisix_consumer.go:
##########
@@ -57,6 +57,12 @@ func (t *translator) TranslateApisixConsumerV2beta3(ac
*configv2beta3.ApisixCons
return nil, fmt.Errorf("invaild hmac auth config: %s",
err)
}
plugins["hmac-auth"] = cfg
+ } else if ac.Spec.AuthParameter.LDAPAuth != nil {
+ cfg, err :=
t.translateConsumerLDAPAuthPluginV2beta3(ac.Namespace,
ac.Spec.AuthParameter.LDAPAuth)
Review Comment:
ditto
##########
pkg/providers/apisix/translation/apisix_plugin.go:
##########
@@ -520,3 +520,47 @@ func (t *translator)
translateConsumerHMACAuthPluginV2(consumerNamespace string,
MaxReqBody: maxReqBody,
}, nil
}
+
+func (t *translator) translateConsumerLDAPAuthPluginV2beta3(consumerNamespace
string, cfg *configv2beta3.ApisixConsumerLDAPAuth)
(*apisixv1.LDAPAuthConsumerConfig, error) {
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]