From 2c554a7c91f08fd2ecc4cbe44ff0b4ffb7ee72b4 Mon Sep 17 00:00:00 2001 From: chinthalapalli Date: Tue, 17 Sep 2024 17:44:43 +0530 Subject: [PATCH 1/3] fix virtual address mask issues --- bigip/resource_bigip_ltm_virtual_address.go | 3 ++- vendor/github.com/f5devcentral/go-bigip/ltm.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bigip/resource_bigip_ltm_virtual_address.go b/bigip/resource_bigip_ltm_virtual_address.go index 906d499f..f57f6c49 100644 --- a/bigip/resource_bigip_ltm_virtual_address.go +++ b/bigip/resource_bigip_ltm_virtual_address.go @@ -130,7 +130,8 @@ func resourceBigipLtmVirtualAddressRead(ctx context.Context, d *schema.ResourceD if va.FullPath != name { return diag.FromErr(fmt.Errorf("virtual address %s not found", name)) } - log.Printf("[DEBUG] virtual address configured on bigip is :%v", vas) + log.Printf("[DEBUG] virtual address configured on bigip is :%+v", vas) + _ = d.Set("name", name) _ = d.Set("arp", va.ARP) _ = d.Set("auto_delete", va.AutoDelete) diff --git a/vendor/github.com/f5devcentral/go-bigip/ltm.go b/vendor/github.com/f5devcentral/go-bigip/ltm.go index 9661bbbb..835e9259 100644 --- a/vendor/github.com/f5devcentral/go-bigip/ltm.go +++ b/vendor/github.com/f5devcentral/go-bigip/ltm.go @@ -2808,7 +2808,7 @@ func (b *BigIP) VirtualAddressStatus(vaddr, state string) error { // ModifyVirtualAddress allows you to change any attribute of a virtual address. Fields that // can be modified are referenced in the VirtualAddress struct. func (b *BigIP) ModifyVirtualAddress(vaddr string, config *VirtualAddress) error { - return b.put(config, uriLtm, uriVirtualAddress, vaddr) + return b.patch(config, uriLtm, uriVirtualAddress, vaddr) } func (b *BigIP) DeleteVirtualAddress(vaddr string) error { From 8ad54d7c0cfb89a6a3788025d9be8b91cc119bf5 Mon Sep 17 00:00:00 2001 From: chinthalapalli Date: Tue, 15 Oct 2024 17:47:27 +0530 Subject: [PATCH 2/3] adding crl file support --- bigip/resource_bigip_ltm_profile_ssl_client.go | 12 ++++++++++-- docs/resources/bigip_ltm_profile_client_ssl.md | 4 ++++ vendor/github.com/f5devcentral/go-bigip/ltm.go | 3 ++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/bigip/resource_bigip_ltm_profile_ssl_client.go b/bigip/resource_bigip_ltm_profile_ssl_client.go index 828215e4..71bca8be 100644 --- a/bigip/resource_bigip_ltm_profile_ssl_client.go +++ b/bigip/resource_bigip_ltm_profile_ssl_client.go @@ -278,14 +278,18 @@ func resourceBigipLtmProfileClientSsl() *schema.Resource { Computed: true, Description: "(Advertised Certificate Authorities)Specifies that the CAs that the system advertises to clients is being trusted by the profile. The default is `None`", }, - "crl_file": { Type: schema.TypeString, Optional: true, Computed: true, Description: "Certificate revocation file name", }, - + "allow_expired_crl": { + Type: schema.TypeString, + Optional: true, + Computed: true, + Description: "allow_expired_crl option to be `enabled` / `disabled`. Default is `disabled`.", + }, "forward_proxy_bypass_default_action": { Type: schema.TypeString, Optional: true, @@ -653,6 +657,9 @@ func resourceBigipLtmProfileClientSSLRead(ctx context.Context, d *schema.Resourc if _, ok := d.GetOk("crl_file"); ok { _ = d.Set("crl_file", obj.CrlFile) } + if _, ok := d.GetOk("allow_expired_crl"); ok { + _ = d.Set("allow_expired_crl", obj.AllowExpiredCrl) + } if _, ok := d.GetOk("forward_proxy_bypass_default_action"); ok { _ = d.Set("forward_proxy_bypass_default_action", obj.ForwardProxyBypassDefaultAction) } @@ -891,6 +898,7 @@ func getClientSslConfig(d *schema.ResourceData, config *bigip.ClientSSLProfile) } config.ClientCertCa = d.Get("client_cert_ca").(string) config.CrlFile = d.Get("crl_file").(string) + config.AllowExpiredCrl = d.Get("allow_expired_crl").(string) config.ForwardProxyBypassDefaultAction = d.Get("forward_proxy_bypass_default_action").(string) config.GenericAlert = d.Get("generic_alert").(string) config.HandshakeTimeout = d.Get("handshake_timeout").(string) diff --git a/docs/resources/bigip_ltm_profile_client_ssl.md b/docs/resources/bigip_ltm_profile_client_ssl.md index ecef8be0..2d448292 100644 --- a/docs/resources/bigip_ltm_profile_client_ssl.md +++ b/docs/resources/bigip_ltm_profile_client_ssl.md @@ -55,6 +55,10 @@ Don't insert empty fragments and No TLSv1.3 are listed as Enabled Options. `Usag * `ca_file` - (Optional) (Trusted Certificate Authorities)Specifies a client CA that the system trusts. The default is `None`. +* `crl_file` - (Optional) Specifies the name of a file containing a list of revoked client certificates. The default is `None`. + +* `allow_expired_crl` - (Optional) Instructs the system to use the specified CRL file even if it has expired. The default is `disabled`. + * `client_cert_ca` - (Optional)(Advertised Certificate Authorities)Specifies that the CAs that the system advertises to clients is being trusted by the profile. The default is `None`. * `renegotiation` - (Optional) Enables or disables SSL renegotiation.When creating a new profile, the setting is provided by the parent profile diff --git a/vendor/github.com/f5devcentral/go-bigip/ltm.go b/vendor/github.com/f5devcentral/go-bigip/ltm.go index 9661bbbb..c82bc382 100644 --- a/vendor/github.com/f5devcentral/go-bigip/ltm.go +++ b/vendor/github.com/f5devcentral/go-bigip/ltm.go @@ -98,6 +98,7 @@ type ClientSSLProfile struct { Generation int `json:"generation,omitempty"` AlertTimeout string `json:"alertTimeout,omitempty"` AllowNonSsl string `json:"allowNonSsl,omitempty"` + AllowExpiredCrl string `json:"allowExpiredCrl,omitempty"` Authenticate string `json:"authenticate,omitempty"` AuthenticateDepth int `json:"authenticateDepth,omitempty"` C3dClientFallbackCert string `json:"c3dClientFallbackCert,omitempty"` @@ -2808,7 +2809,7 @@ func (b *BigIP) VirtualAddressStatus(vaddr, state string) error { // ModifyVirtualAddress allows you to change any attribute of a virtual address. Fields that // can be modified are referenced in the VirtualAddress struct. func (b *BigIP) ModifyVirtualAddress(vaddr string, config *VirtualAddress) error { - return b.put(config, uriLtm, uriVirtualAddress, vaddr) + return b.patch(config, uriLtm, uriVirtualAddress, vaddr) } func (b *BigIP) DeleteVirtualAddress(vaddr string) error { From 2baea3390e201cddb4a3fa5d290c91583f91592b Mon Sep 17 00:00:00 2001 From: RavinderReddyF5 Date: Tue, 15 Oct 2024 19:25:23 +0530 Subject: [PATCH 3/3] fix lint issues --- go.mod | 4 ++-- go.sum | 8 ++++---- vendor/modules.txt | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 5244920f..293c9fcd 100644 --- a/go.mod +++ b/go.mod @@ -10,8 +10,8 @@ require ( github.com/Azure/azure-storage-blob-go v0.13.0 github.com/Azure/go-autorest/autorest v0.11.18 github.com/Azure/go-autorest/autorest/adal v0.9.13 - github.com/f5devcentral/go-bigip v0.0.0-20240801101847-64d6eb419ed6 - github.com/f5devcentral/go-bigip/f5teem v0.0.0-20240801101847-64d6eb419ed6 + github.com/f5devcentral/go-bigip v0.0.0-20241015134941-ace8c7550cdb + github.com/f5devcentral/go-bigip/f5teem v0.0.0-20241015134941-ace8c7550cdb github.com/google/uuid v1.3.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.25.0 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index 409e4de3..97ca1a06 100644 --- a/go.sum +++ b/go.sum @@ -51,10 +51,10 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/f5devcentral/go-bigip v0.0.0-20240801101847-64d6eb419ed6 h1:ckTAKRScUrCQLzhr0LjuGEQ+Cdw+DihVacGtk7VHRn4= -github.com/f5devcentral/go-bigip v0.0.0-20240801101847-64d6eb419ed6/go.mod h1:0Lkr0fBU6O1yBxF2mt9JFwXpaFbIb/wAY7oM3dMJDdA= -github.com/f5devcentral/go-bigip/f5teem v0.0.0-20240801101847-64d6eb419ed6 h1:1n8eAKWABMl4ZkjdheVQC19fdyNwO5k/DqP8e3OB2sI= -github.com/f5devcentral/go-bigip/f5teem v0.0.0-20240801101847-64d6eb419ed6/go.mod h1:r7o5I22EvO+fps2u10bz4ZUlTlNHopQSWzVcW19hK3U= +github.com/f5devcentral/go-bigip v0.0.0-20241015134941-ace8c7550cdb h1:fXszVqyYEUktmRzhAfkBa38quBIGN4mCVdgnEgnzZw4= +github.com/f5devcentral/go-bigip v0.0.0-20241015134941-ace8c7550cdb/go.mod h1:0Lkr0fBU6O1yBxF2mt9JFwXpaFbIb/wAY7oM3dMJDdA= +github.com/f5devcentral/go-bigip/f5teem v0.0.0-20241015134941-ace8c7550cdb h1:m7yCTq/MdZ3JKcXBOqwgnOhOmnAuiHuo4iGODW5nJHQ= +github.com/f5devcentral/go-bigip/f5teem v0.0.0-20241015134941-ace8c7550cdb/go.mod h1:r7o5I22EvO+fps2u10bz4ZUlTlNHopQSWzVcW19hK3U= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= diff --git a/vendor/modules.txt b/vendor/modules.txt index 6ec2436f..05a5fb0d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -42,10 +42,10 @@ github.com/apparentlymart/go-textseg/v13/textseg # github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew -# github.com/f5devcentral/go-bigip v0.0.0-20240801101847-64d6eb419ed6 +# github.com/f5devcentral/go-bigip v0.0.0-20241015134941-ace8c7550cdb ## explicit; go 1.20 github.com/f5devcentral/go-bigip -# github.com/f5devcentral/go-bigip/f5teem v0.0.0-20240801101847-64d6eb419ed6 +# github.com/f5devcentral/go-bigip/f5teem v0.0.0-20241015134941-ace8c7550cdb ## explicit; go 1.13 github.com/f5devcentral/go-bigip/f5teem # github.com/fatih/color v1.13.0