diff --git a/fastly/fixtures/mutual_authentication/create-cert.yaml b/fastly/fixtures/mutual_authentication/create-cert.yaml index d7cf56e14..d536e1a71 100644 --- a/fastly/fixtures/mutual_authentication/create-cert.yaml +++ b/fastly/fixtures/mutual_authentication/create-cert.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"type":"tls_certificate","attributes":{"cert_blob":"-----BEGIN CERTIFICATE-----\nMIIDWTCCAkGgAwIBAgIITWWCIQf8/VIwDQYJKoZIhvcNAQELBQAwNDEUMBIGA1UE\nAxMLZXhhbXBsZS5jb20xHDAaBgNVBAUTEzU1NzcwMDY3OTE5NDc3Nzk0MTAwHhcN\nMjMwNTMxMTE0ODI2WhcNMjMwODI5MTE0ODI2WjA0MRQwEgYDVQQDEwtleGFtcGxl\nLmNvbTEcMBoGA1UEBRMTNTU3NzAwNjc5MTk0Nzc3OTQxMDCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBALcgLS9FIWYSRw7MLpEV/4nvmlDA95jlXZnejar9\nVbKXxWzEljZZVtp+CniP1ef6OBBwIph9bX9ig+96cMWR1GMlu7kddIisuSFhndPv\nQxCNW6r5Vlh0q9inuizXBdh48Ql4/xWWWHPfGBYFUzHhDaw1qlyH28E1RRp6LsfE\nVh0r5K+NuuL3ZAsXyRM1uzt62mczraVbKLHGjag/5vsgC48Yak9hLC4jUu6cPE9L\nsVX5xAbu21U7TuZslI4nerSsHAMu9463MJh4eTyKhQQiJABql+TiO7+jkDWu/InC\nOvmF3dasTq6HDEKj7Io2m6uTlWCZ0xSdyceWl6h+7OHBbTcCAwEAAaNvMG0wDgYD\nVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA8GA1UdEwEB/wQFMAMB\nAf8wHQYDVR0OBBYEFL3co7IUnrTsHPO6Xhq5e9IGUkfCMBYGA1UdEQQPMA2CC2V4\nYW1wbGUuY29tMA0GCSqGSIb3DQEBCwUAA4IBAQCyKG37ZQbVFC2ATfcgYcJm9sfF\nraLcm0Ft206ZvWZ8++48G4pE6vSWcnMioMv6vffD/wRSo606Yur1GZ2TsrBok9VE\n7yNXQa+zT/pdvK7XheuCQOfX1PHS6Xe1VK657GMHTGAZZZsssTbb1PdbSkOoLR/w\nqdFf1qbwMUb5Nak4xlOlcInbUVljpSKxt0FcZJjWglINaMyVMG/B1IFFtQX3S8+c\nca7fXIvl9Vw1RO/7/HS9veQ9x1IZmuYW2VelwAkhn33qGdKcRBOAm8UOAdKQH4gT\nMrD7Hc0fqiqvwFDmBQIz5beWeUfxZWtBg+ivFmj739EfdmvkjuqK36kj3LtY\n-----END CERTIFICATE-----","name":"My custom certificate"}}} + {"data":{"type":"tls_certificate","attributes":{"cert_blob":"-----BEGIN CERTIFICATE-----\nMIIDWTCCAkGgAwIBAgIITWWCIQf8/VIwDQYJKoZIhvcNAQELBQAwNDEUMBIGA1UE\nAxMLZXhhbXBsZS5jb20xHDAaBgNVBAUTEzU1NzcwMDY3OTE5NDc3Nzk0MTAwHhcN\nMjMwNjAxMTM0MDExWhcNMjMwODMwMTM0MDExWjA0MRQwEgYDVQQDEwtleGFtcGxl\nLmNvbTEcMBoGA1UEBRMTNTU3NzAwNjc5MTk0Nzc3OTQxMDCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAKfm230/fCHtznA1JJMmWArETYorVI+uV9GY12be\nmz5ZcFSJKwklqZyj4J47TFYlSygDV3/1N8yBUeljf/hrByBYB/rcabgR98UILHFo\nHC2An6bI1dX+HmmFXI5ZAqZu+/TtW3/c7031/cJo9nJnP7ZJadtZdKd/w747V1KI\nBHQZKtkX8C9E5IqE/SOJPvC5O4SrbDjMjloaH3KNNF9XNvKe+oqPfr89NTmKH8LX\ndbZ/60qp62R/2iMKbhtSJbKKnLyZa8pynEaq+5AVOMRCw9U1zGdOeKoXVMaqzEJ5\nNd33gXKGVcb0Z+JkXuC/Cpmhqqbr0WMBTZM/neW3bFeywtcCAwEAAaNvMG0wDgYD\nVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA8GA1UdEwEB/wQFMAMB\nAf8wHQYDVR0OBBYEFKVT08Cb2bIDkPd5qom8Zw2hDuD8MBYGA1UdEQQPMA2CC2V4\nYW1wbGUuY29tMA0GCSqGSIb3DQEBCwUAA4IBAQBzerYaKOpvyd68qxb3ysGY+XkJ\npt8Bl3ZXiQDVJHGADXzj2NU7YKhaXoGZpO5pwthmXr55ZEsm3e72ooEn3aBuPkFX\nep5DNOOJXXJrJIiVgU1zXp5bdwJewPdCe8yoPt3/a3oGr3UlqTfwtvuAOCeydT4R\nZRUKQr/8uWz0tNbL26fWhU2ibkp453/dx8uCa5Ls/2SjbPzq+yxGfIJUq0hbTeir\nudkd0XV24Cq2jwAjCoqGLOwoWzKwobNZoLzUTOk4ZHTm+CZUHbztD3gu0wSkIkxD\npquKnpJO343YrMDARMbLnkVK64r9pi1HzEFGujEt3aAnu3o+17V93BHk7jAh\n-----END CERTIFICATE-----","name":"My custom certificate"}}} form: {} headers: Accept: @@ -11,12 +11,12 @@ interactions: Content-Type: - application/vnd.api+json User-Agent: - - FastlyGo/8.3.0 (+github.com/fastly/go-fastly; go1.18.5) + - FastlyGo/8.4.0 (+github.com/fastly/go-fastly; go1.18.5) url: https://api.fastly.com/tls/certificates method: POST response: - body: '{"data":{"id":"vOJL3187my51i5ITgcr7H2","type":"tls_certificate","attributes":{"created_at":"2023-05-31T11:48:27.000Z","issued_to":"example.com","issuer":"example.com","name":"My - custom certificate","not_after":"2023-08-29T11:48:26.000Z","not_before":"2023-05-31T11:48:26.000Z","replace":false,"serial_number":"5577006791947779410","signature_algorithm":"SHA256-RSA","updated_at":"2023-05-31T11:48:27.000Z"},"relationships":{"tls_domains":{"data":[{"id":"example.com","type":"tls_domain"}]}}}}' + body: '{"data":{"id":"KAEO3Gj5ACmMQXTPSgF7s4","type":"tls_certificate","attributes":{"created_at":"2023-06-01T13:40:12.000Z","issued_to":"example.com","issuer":"example.com","name":"My + custom certificate","not_after":"2023-08-30T13:40:11.000Z","not_before":"2023-06-01T13:40:11.000Z","replace":false,"serial_number":"5577006791947779410","signature_algorithm":"SHA256-RSA","updated_at":"2023-06-01T13:40:12.000Z"},"relationships":{"tls_domains":{"data":[{"id":"example.com","type":"tls_domain"}]}}}}' headers: Accept-Ranges: - bytes @@ -27,7 +27,7 @@ interactions: Content-Type: - application/vnd.api+json Date: - - Wed, 31 May 2023 11:48:28 GMT + - Thu, 01 Jun 2023 13:40:13 GMT Pragma: - no-cache Strict-Transport-Security: @@ -41,9 +41,9 @@ interactions: X-Content-Type-Options: - nosniff X-Served-By: - - cache-control-cp-aws-us-east-2-prod-4-CONTROL-AWS-UE2, cache-lhr7383-LHR + - cache-control-cp-aws-us-east-2-prod-5-CONTROL-AWS-UE2, cache-lhr7369-LHR X-Timer: - - S1685533707.484825,VS0,VE1050 + - S1685626812.418135,VS0,VE695 status: 201 Created code: 201 duration: "" diff --git a/fastly/fixtures/mutual_authentication/create-key.yaml b/fastly/fixtures/mutual_authentication/create-key.yaml index c7e5ba5b2..2a0649e91 100644 --- a/fastly/fixtures/mutual_authentication/create-key.yaml +++ b/fastly/fixtures/mutual_authentication/create-key.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"type":"","attributes":{"key":"-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC3IC0vRSFmEkcO\nzC6RFf+J75pQwPeY5V2Z3o2q/VWyl8VsxJY2WVbafgp4j9Xn+jgQcCKYfW1/YoPv\nenDFkdRjJbu5HXSIrLkhYZ3T70MQjVuq+VZYdKvYp7os1wXYePEJeP8Vllhz3xgW\nBVMx4Q2sNapch9vBNUUaei7HxFYdK+Svjbri92QLF8kTNbs7etpnM62lWyixxo2o\nP+b7IAuPGGpPYSwuI1LunDxPS7FV+cQG7ttVO07mbJSOJ3q0rBwDLveOtzCYeHk8\nioUEIiQAapfk4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ro9VOhWOmRIklHbtZIMgbHxxiRJrgnUt4aM32\n3Q8JRjEGXQKKaAlMOnAjL41B8vbzBGAu/8T4UFOtAoGAb3+vWxbDIGk6mMJmUp3c\nGEkZVvZEqTHI2seJ/lT+D+UOnuFWwzACkk1KjRmgkkrVXgwO8qrEfby06OEtxmMK\ntbVtOCK/mDFyddLxEP2i355ZA4606oNMSkpyur1UO740m1Qvy2XzzDk+I0ETQBku\nRTyVXNLXU0ELgTxPQF4Cx/0=\n-----END PRIVATE KEY-----","name":"My private key"}}} + {"data":{"type":"","attributes":{"key":"-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCn5tt9P3wh7c5w\nNSSTJlgKxE2KK1SPrlfRmNdm3ps+WXBUiSsJJamco+CeO0xWJUsoA1d/9TfMgVHp\nY3/4awcgWAf63Gm4EffFCCxxaBwtgJ+myNXV/h5phVyOWQKmbvv07Vt/3O9N9f3C\naPZyZz+2SWnbWXSnf8O+O1dSiAR0GSrZF/AvROSKhP0jiT7wuTuEq2w4zI5aGh9y\njTRfVzbynvqKj36/PTU5ih/C13W2f+tKqetkf9ojCm4bUiWyipy8mWvKcpxGqvuQ\nFTjEQsPVNcxnTniqF1TGqsxCeTXd94FyhlXG9GfiZF7gvwqZoaqm69FjAU2TP53l\nt2xXssLXAgMBAAECggEBAJibZR4nCL2R9xPXyaGRtW471DpkfdyGWz2fjRDr/fCi\nvE2pyxrqR4qfDPbk8NJP3UrGFs6v5IKVfA0Eqfjx1q1YNhCWK+TpN+m3LyX4ubvF\n79ZZLrrs2VmRpHmhf54kvA93ebXy6vNSRc5hNrbvD2KwwW1klnnzz8dlCk5yYJHg\nII5N+rH5wXQ32V4KhRfHIsbVKxZF662F+X9MJe5eVuDI7RoM8UOVTNb9E7o34WCx\nuuH7KZymrEJlPriaCC8MrCcYH+ikywvw8WWlwMC5lldiCIl7E8TbSnAl9m1ibaBu\nfXjqszfqDHOc3xKAHkyx+gPDG9h5O87I80ppu1VZ9zkCgYEAwt4ePFzsIfZko1em\nFIFTBlSBH6A2T7hte5YTPttG8OOhOtUyz/yQs+t5iZ52A0v/M4igmcbY8x8sWir9\nYb0aoUnYF6jE29mR31RIGi5y4774qe7l0urby0+kcFFaXPZJidVgbvGVTJxUfDzp\nHm08PTqDk6A5PDTzWeDTXU3MnDUCgYEA3JMaORWZZTYrTZQfAqnCwp/+1TIqHX1+\nYlDti1FkiqLZd+PWRFsu6YFais7PqsGT4gtJMDtz+JEJGxPxWR425kh+sW03TxNx\nttGUQDZm6sViiafNDH8KyX+eVM9+/ZyyiT0ygH16fWMMbDhWP3WAvHRkSgChDWJi\n1AUcJQMpzFsCgYEAnJ1oL5t/LMyala0cDd7im3PPU1uwSuIvG+TCEwKpQXGxY1d2\nPzL+GZxnUfPJZVzu/rwQV4c5Viz3uIBUpPkXLgnrYxiBHzD9zEAwstoh/Gi/8dPP\nYnTfsceQobTAq3ZGJEEaABCpraj3PeK2eX3RrGQa28sqNPlZnCLVvWeJywECgYAU\n1Ht8epKy4SuzttI64Sc4U/2vyn35rPk7daMJLhWNlhVtYgHBEM9cU8/mHeO0n3VE\nuoYd3O91wNSYTwjSvqy2kJAOV18Kw65QcnhKnBiaASvuDf+qN3EgWEHuhm3aq2qc\n1T+orLDdmHX63lMeyQzwPxmdd3O+HNVyak0fHa5b0wKBgDn3n+pibnp7K2lYzeVd\nEIkRKX/51y5LZjM6/iOG1P/P+UQL+k2wXLFHdHzhKIqkSUQKG4UA7Xqx6nl1O+qY\n5hYYp3n9zpzSoCjxQujHe06FzpsmLv0hUkoEYyoswpqJYIUzYdc94ZPuFaKvwFYb\nCPwvQCG22esGHSHjs8b2VdZO\n-----END PRIVATE KEY-----","name":"My private key"}}} form: {} headers: Accept: @@ -11,12 +11,12 @@ interactions: Content-Type: - application/vnd.api+json User-Agent: - - FastlyGo/8.3.0 (+github.com/fastly/go-fastly; go1.18.5) + - FastlyGo/8.4.0 (+github.com/fastly/go-fastly; go1.18.5) url: https://api.fastly.com/tls/private_keys method: POST response: - body: '{"data":{"id":"0LYME3yUMZpE0lKca6dGr2","type":"tls_private_key","attributes":{"key_length":2048,"key_type":"RSA","name":"My - private key","created_at":null,"replace":false,"public_key_sha1":"29e60e9152953916b47b48e5bc174930c304ddc3"}}}' + body: '{"data":{"id":"eRSQLBCgOyJ8Opwj8pV5J5","type":"tls_private_key","attributes":{"key_length":2048,"key_type":"RSA","name":"My + private key","created_at":null,"replace":false,"public_key_sha1":"d5af6a56b2bffedac5fecd177bfb8abc149df048"}}}' headers: Accept-Ranges: - bytes @@ -27,7 +27,7 @@ interactions: Content-Type: - application/vnd.api+json Date: - - Wed, 31 May 2023 11:48:27 GMT + - Thu, 01 Jun 2023 13:40:12 GMT Pragma: - no-cache Strict-Transport-Security: @@ -41,9 +41,9 @@ interactions: X-Content-Type-Options: - nosniff X-Served-By: - - cache-control-cp-aws-us-east-2-prod-7-CONTROL-AWS-UE2, cache-lhr7383-LHR + - cache-control-cp-aws-us-east-2-prod-5-CONTROL-AWS-UE2, cache-lhr7369-LHR X-Timer: - - S1685533707.959293,VS0,VE488 + - S1685626812.636740,VS0,VE746 status: 201 Created code: 201 duration: "" diff --git a/fastly/fixtures/mutual_authentication/create-tma.yaml b/fastly/fixtures/mutual_authentication/create-tma.yaml index 236d69358..0ec0d78c6 100644 --- a/fastly/fixtures/mutual_authentication/create-tma.yaml +++ b/fastly/fixtures/mutual_authentication/create-tma.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"type":"mutual_authentication","attributes":{"cert_bundle":"-----BEGIN CERTIFICATE-----\nMIIDWTCCAkGgAwIBAgIITWWCIQf8/VIwDQYJKoZIhvcNAQELBQAwNDEUMBIGA1UE\nAxMLZXhhbXBsZS5jb20xHDAaBgNVBAUTEzU1NzcwMDY3OTE5NDc3Nzk0MTAwHhcN\nMjMwNTMxMTE0ODI2WhcNMjMwODI5MTE0ODI2WjA0MRQwEgYDVQQDEwtleGFtcGxl\nLmNvbTEcMBoGA1UEBRMTNTU3NzAwNjc5MTk0Nzc3OTQxMDCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBALcgLS9FIWYSRw7MLpEV/4nvmlDA95jlXZnejar9\nVbKXxWzEljZZVtp+CniP1ef6OBBwIph9bX9ig+96cMWR1GMlu7kddIisuSFhndPv\nQxCNW6r5Vlh0q9inuizXBdh48Ql4/xWWWHPfGBYFUzHhDaw1qlyH28E1RRp6LsfE\nVh0r5K+NuuL3ZAsXyRM1uzt62mczraVbKLHGjag/5vsgC48Yak9hLC4jUu6cPE9L\nsVX5xAbu21U7TuZslI4nerSsHAMu9463MJh4eTyKhQQiJABql+TiO7+jkDWu/InC\nOvmF3dasTq6HDEKj7Io2m6uTlWCZ0xSdyceWl6h+7OHBbTcCAwEAAaNvMG0wDgYD\nVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA8GA1UdEwEB/wQFMAMB\nAf8wHQYDVR0OBBYEFL3co7IUnrTsHPO6Xhq5e9IGUkfCMBYGA1UdEQQPMA2CC2V4\nYW1wbGUuY29tMA0GCSqGSIb3DQEBCwUAA4IBAQCyKG37ZQbVFC2ATfcgYcJm9sfF\nraLcm0Ft206ZvWZ8++48G4pE6vSWcnMioMv6vffD/wRSo606Yur1GZ2TsrBok9VE\n7yNXQa+zT/pdvK7XheuCQOfX1PHS6Xe1VK657GMHTGAZZZsssTbb1PdbSkOoLR/w\nqdFf1qbwMUb5Nak4xlOlcInbUVljpSKxt0FcZJjWglINaMyVMG/B1IFFtQX3S8+c\nca7fXIvl9Vw1RO/7/HS9veQ9x1IZmuYW2VelwAkhn33qGdKcRBOAm8UOAdKQH4gT\nMrD7Hc0fqiqvwFDmBQIz5beWeUfxZWtBg+ivFmj739EfdmvkjuqK36kj3LtY\n-----END CERTIFICATE-----","name":"My mutual authentication"}}} + {"data":{"type":"mutual_authentication","attributes":{"cert_bundle":"-----BEGIN CERTIFICATE-----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q2jwAjCoqGLOwoWzKwobNZoLzUTOk4ZHTm+CZUHbztD3gu0wSkIkxD\npquKnpJO343YrMDARMbLnkVK64r9pi1HzEFGujEt3aAnu3o+17V93BHk7jAh\n-----END CERTIFICATE-----","enforced":false,"name":"My mutual authentication"}}} form: {} headers: Accept: @@ -11,23 +11,23 @@ interactions: Content-Type: - application/vnd.api+json User-Agent: - - FastlyGo/8.3.0 (+github.com/fastly/go-fastly; go1.18.5) + - FastlyGo/8.4.0 (+github.com/fastly/go-fastly; go1.18.5) url: https://api.fastly.com/tls/mutual_authentications method: POST response: - body: '{"data":{"id":"4tFjGkmDCvPr7f4I9RlDq5","type":"mutual_authentication","attributes":{"created_at":"2023-05-31T11:48:28.000Z","enforced":true,"name":"My - mutual authentication","updated_at":"2023-05-31T11:48:28.000Z"},"relationships":{"tls_activations":{"data":[]}}}}' + body: '{"data":{"id":"d6Sql38JQh71sAgelxSo37","type":"mutual_authentication","attributes":{"created_at":"2023-06-01T13:40:13.000Z","enforced":false,"name":"My + mutual authentication","updated_at":"2023-06-01T13:40:13.000Z"},"relationships":{"tls_activations":{"data":[]}}}}' headers: Accept-Ranges: - bytes Cache-Control: - private Content-Length: - - "264" + - "265" Content-Type: - application/vnd.api+json Date: - - Wed, 31 May 2023 11:48:28 GMT + - Thu, 01 Jun 2023 13:40:13 GMT Pragma: - no-cache Strict-Transport-Security: @@ -41,9 +41,9 @@ interactions: X-Content-Type-Options: - nosniff X-Served-By: - - cache-control-cp-aws-us-east-2-prod-4-CONTROL-AWS-UE2, cache-lhr7383-LHR + - cache-control-cp-aws-us-east-2-prod-5-CONTROL-AWS-UE2, cache-lhr7369-LHR X-Timer: - - S1685533709.558327,VS0,VE205 + - S1685626813.130411,VS0,VE186 status: 201 Created code: 201 duration: "" diff --git a/fastly/fixtures/mutual_authentication/delete-cert.yaml b/fastly/fixtures/mutual_authentication/delete-cert.yaml index c107e3a6e..e1f6aed5f 100644 --- a/fastly/fixtures/mutual_authentication/delete-cert.yaml +++ b/fastly/fixtures/mutual_authentication/delete-cert.yaml @@ -6,8 +6,8 @@ interactions: form: {} headers: User-Agent: - - FastlyGo/8.3.0 (+github.com/fastly/go-fastly; go1.18.5) - url: https://api.fastly.com/tls/certificates/vOJL3187my51i5ITgcr7H2 + - FastlyGo/8.4.0 (+github.com/fastly/go-fastly; go1.18.5) + url: https://api.fastly.com/tls/certificates/KAEO3Gj5ACmMQXTPSgF7s4 method: DELETE response: body: "" @@ -17,7 +17,7 @@ interactions: Cache-Control: - private Date: - - Wed, 31 May 2023 11:48:30 GMT + - Thu, 01 Jun 2023 13:40:15 GMT Pragma: - no-cache Strict-Transport-Security: @@ -31,9 +31,9 @@ interactions: X-Content-Type-Options: - nosniff X-Served-By: - - cache-control-cp-aws-us-east-2-prod-2-CONTROL-AWS-UE2, cache-lhr7383-LHR + - cache-control-cp-aws-us-east-2-prod-5-CONTROL-AWS-UE2, cache-lhr7369-LHR X-Timer: - - S1685533710.169246,VS0,VE309 + - S1685626815.919738,VS0,VE321 status: 204 No Content code: 204 duration: "" diff --git a/fastly/fixtures/mutual_authentication/delete-key.yaml b/fastly/fixtures/mutual_authentication/delete-key.yaml index 15e928841..72e4b3260 100644 --- a/fastly/fixtures/mutual_authentication/delete-key.yaml +++ b/fastly/fixtures/mutual_authentication/delete-key.yaml @@ -6,8 +6,8 @@ interactions: form: {} headers: User-Agent: - - FastlyGo/8.3.0 (+github.com/fastly/go-fastly; go1.18.5) - url: https://api.fastly.com/tls/private_keys/0LYME3yUMZpE0lKca6dGr2 + - FastlyGo/8.4.0 (+github.com/fastly/go-fastly; go1.18.5) + url: https://api.fastly.com/tls/private_keys/eRSQLBCgOyJ8Opwj8pV5J5 method: DELETE response: body: "" @@ -17,7 +17,7 @@ interactions: Cache-Control: - private Date: - - Wed, 31 May 2023 11:48:30 GMT + - Thu, 01 Jun 2023 13:40:15 GMT Pragma: - no-cache Strict-Transport-Security: @@ -31,9 +31,9 @@ interactions: X-Content-Type-Options: - nosniff X-Served-By: - - cache-control-cp-aws-us-east-2-prod-7-CONTROL-AWS-UE2, cache-lhr7383-LHR + - cache-control-cp-aws-us-east-2-prod-5-CONTROL-AWS-UE2, cache-lhr7369-LHR X-Timer: - - S1685533710.499519,VS0,VE181 + - S1685626815.271391,VS0,VE178 status: 204 No Content code: 204 duration: "" diff --git a/fastly/fixtures/mutual_authentication/delete-tma.yaml b/fastly/fixtures/mutual_authentication/delete-tma.yaml index fc6d18328..76264b96f 100644 --- a/fastly/fixtures/mutual_authentication/delete-tma.yaml +++ b/fastly/fixtures/mutual_authentication/delete-tma.yaml @@ -6,8 +6,8 @@ interactions: form: {} headers: User-Agent: - - FastlyGo/8.3.0 (+github.com/fastly/go-fastly; go1.18.5) - url: https://api.fastly.com/tls/mutual_authentications/4tFjGkmDCvPr7f4I9RlDq5 + - FastlyGo/8.4.0 (+github.com/fastly/go-fastly; go1.18.5) + url: https://api.fastly.com/tls/mutual_authentications/d6Sql38JQh71sAgelxSo37 method: DELETE response: body: "" @@ -17,7 +17,7 @@ interactions: Cache-Control: - private Date: - - Wed, 31 May 2023 11:48:30 GMT + - Thu, 01 Jun 2023 13:40:14 GMT Pragma: - no-cache Strict-Transport-Security: @@ -31,9 +31,9 @@ interactions: X-Content-Type-Options: - nosniff X-Served-By: - - cache-control-cp-aws-us-east-2-prod-2-CONTROL-AWS-UE2, cache-lhr7383-LHR + - cache-control-cp-aws-us-east-2-prod-4-CONTROL-AWS-UE2, cache-lhr7369-LHR X-Timer: - - S1685533710.907186,VS0,VE239 + - S1685626815.668203,VS0,VE232 status: 204 No Content code: 204 duration: "" diff --git a/fastly/fixtures/mutual_authentication/get.yaml b/fastly/fixtures/mutual_authentication/get.yaml index 814fb5a0d..4d1212e18 100644 --- a/fastly/fixtures/mutual_authentication/get.yaml +++ b/fastly/fixtures/mutual_authentication/get.yaml @@ -6,23 +6,23 @@ interactions: form: {} headers: User-Agent: - - FastlyGo/8.3.0 (+github.com/fastly/go-fastly; go1.18.5) - url: https://api.fastly.com/tls/mutual_authentications/4tFjGkmDCvPr7f4I9RlDq5 + - FastlyGo/8.4.0 (+github.com/fastly/go-fastly; go1.18.5) + url: https://api.fastly.com/tls/mutual_authentications/d6Sql38JQh71sAgelxSo37 method: GET response: - body: '{"data":{"id":"4tFjGkmDCvPr7f4I9RlDq5","type":"mutual_authentication","attributes":{"created_at":"2023-05-31T11:48:28.000Z","enforced":true,"name":"My - mutual authentication","updated_at":"2023-05-31T11:48:28.000Z"},"relationships":{"tls_activations":{"data":[]}}}}' + body: '{"data":{"id":"d6Sql38JQh71sAgelxSo37","type":"mutual_authentication","attributes":{"created_at":"2023-06-01T13:40:13.000Z","enforced":false,"name":"My + mutual authentication","updated_at":"2023-06-01T13:40:13.000Z"},"relationships":{"tls_activations":{"data":[]}}}}' headers: Accept-Ranges: - bytes Cache-Control: - private Content-Length: - - "264" + - "265" Content-Type: - application/vnd.api+json Date: - - Wed, 31 May 2023 11:48:29 GMT + - Thu, 01 Jun 2023 13:40:13 GMT Pragma: - no-cache Strict-Transport-Security: @@ -38,9 +38,9 @@ interactions: X-Content-Type-Options: - nosniff X-Served-By: - - cache-control-cp-aws-us-east-2-prod-7-CONTROL-AWS-UE2, cache-lhr7383-LHR + - cache-control-cp-aws-us-east-2-prod-1-CONTROL-AWS-UE2, cache-lhr7369-LHR X-Timer: - - S1685533709.110117,VS0,VE314 + - S1685626814.512742,VS0,VE196 status: 200 OK code: 200 duration: "" diff --git a/fastly/fixtures/mutual_authentication/list.yaml b/fastly/fixtures/mutual_authentication/list.yaml index 93cc43c26..08c281ca7 100644 --- a/fastly/fixtures/mutual_authentication/list.yaml +++ b/fastly/fixtures/mutual_authentication/list.yaml @@ -8,23 +8,23 @@ interactions: Accept: - application/vnd.api+json User-Agent: - - FastlyGo/8.3.0 (+github.com/fastly/go-fastly; go1.18.5) + - FastlyGo/8.4.0 (+github.com/fastly/go-fastly; go1.18.5) url: https://api.fastly.com/tls/mutual_authentications method: GET response: - body: '{"data":[{"id":"4tFjGkmDCvPr7f4I9RlDq5","type":"mutual_authentication","attributes":{"created_at":"2023-05-31T11:48:28.000Z","enforced":true,"name":"My - mutual authentication","updated_at":"2023-05-31T11:48:28.000Z"},"relationships":{"tls_activations":{"data":[]}}}],"links":{"self":"https://api.fastly.com/tls/mutual_authentications?page%5Bnumber%5D=1\u0026page%5Bsize%5D=100","first":"https://api.fastly.com/tls/mutual_authentications?page%5Bnumber%5D=1\u0026page%5Bsize%5D=100","prev":null,"next":null,"last":"https://api.fastly.com/tls/mutual_authentications?page%5Bnumber%5D=1\u0026page%5Bsize%5D=100"},"meta":{"per_page":100,"current_page":1,"record_count":1,"total_pages":1}}' + body: '{"data":[{"id":"d6Sql38JQh71sAgelxSo37","type":"mutual_authentication","attributes":{"created_at":"2023-06-01T13:40:13.000Z","enforced":false,"name":"My + mutual authentication","updated_at":"2023-06-01T13:40:13.000Z"},"relationships":{"tls_activations":{"data":[]}}}],"links":{"self":"https://api.fastly.com/tls/mutual_authentications?page%5Bnumber%5D=1\u0026page%5Bsize%5D=100","first":"https://api.fastly.com/tls/mutual_authentications?page%5Bnumber%5D=1\u0026page%5Bsize%5D=100","prev":null,"next":null,"last":"https://api.fastly.com/tls/mutual_authentications?page%5Bnumber%5D=1\u0026page%5Bsize%5D=100"},"meta":{"per_page":100,"current_page":1,"record_count":1,"total_pages":1}}' headers: Accept-Ranges: - bytes Cache-Control: - private Content-Length: - - "681" + - "682" Content-Type: - application/vnd.api+json Date: - - Wed, 31 May 2023 11:48:29 GMT + - Thu, 01 Jun 2023 13:40:13 GMT Pragma: - no-cache Strict-Transport-Security: @@ -40,9 +40,9 @@ interactions: X-Content-Type-Options: - nosniff X-Served-By: - - cache-control-cp-aws-us-east-2-prod-6-CONTROL-AWS-UE2, cache-lhr7383-LHR + - cache-control-cp-aws-us-east-2-prod-4-CONTROL-AWS-UE2, cache-lhr7369-LHR X-Timer: - - S1685533709.786855,VS0,VE299 + - S1685626813.339688,VS0,VE154 status: 200 OK code: 200 duration: "" diff --git a/fastly/fixtures/mutual_authentication/update.yaml b/fastly/fixtures/mutual_authentication/update.yaml index a64a3c3ec..9037b64fa 100644 --- a/fastly/fixtures/mutual_authentication/update.yaml +++ b/fastly/fixtures/mutual_authentication/update.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"type":"mutual_authentication","id":"4tFjGkmDCvPr7f4I9RlDq5","attributes":{"cert_bundle":"-----BEGIN CERTIFICATE-----\nMIIDWTCCAkGgAwIBAgIITWWCIQf8/VIwDQYJKoZIhvcNAQELBQAwNDEUMBIGA1UE\nAxMLZXhhbXBsZS5jb20xHDAaBgNVBAUTEzU1NzcwMDY3OTE5NDc3Nzk0MTAwHhcN\nMjMwNTMxMTE0ODI2WhcNMjMwODI5MTE0ODI2WjA0MRQwEgYDVQQDEwtleGFtcGxl\nLmNvbTEcMBoGA1UEBRMTNTU3NzAwNjc5MTk0Nzc3OTQxMDCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBALcgLS9FIWYSRw7MLpEV/4nvmlDA95jlXZnejar9\nVbKXxWzEljZZVtp+CniP1ef6OBBwIph9bX9ig+96cMWR1GMlu7kddIisuSFhndPv\nQxCNW6r5Vlh0q9inuizXBdh48Ql4/xWWWHPfGBYFUzHhDaw1qlyH28E1RRp6LsfE\nVh0r5K+NuuL3ZAsXyRM1uzt62mczraVbKLHGjag/5vsgC48Yak9hLC4jUu6cPE9L\nsVX5xAbu21U7TuZslI4nerSsHAMu9463MJh4eTyKhQQiJABql+TiO7+jkDWu/InC\nOvmF3dasTq6HDEKj7Io2m6uTlWCZ0xSdyceWl6h+7OHBbTcCAwEAAaNvMG0wDgYD\nVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA8GA1UdEwEB/wQFMAMB\nAf8wHQYDVR0OBBYEFL3co7IUnrTsHPO6Xhq5e9IGUkfCMBYGA1UdEQQPMA2CC2V4\nYW1wbGUuY29tMA0GCSqGSIb3DQEBCwUAA4IBAQCyKG37ZQbVFC2ATfcgYcJm9sfF\nraLcm0Ft206ZvWZ8++48G4pE6vSWcnMioMv6vffD/wRSo606Yur1GZ2TsrBok9VE\n7yNXQa+zT/pdvK7XheuCQOfX1PHS6Xe1VK657GMHTGAZZZsssTbb1PdbSkOoLR/w\nqdFf1qbwMUb5Nak4xlOlcInbUVljpSKxt0FcZJjWglINaMyVMG/B1IFFtQX3S8+c\nca7fXIvl9Vw1RO/7/HS9veQ9x1IZmuYW2VelwAkhn33qGdKcRBOAm8UOAdKQH4gT\nMrD7Hc0fqiqvwFDmBQIz5beWeUfxZWtBg+ivFmj739EfdmvkjuqK36kj3LtY\n-----END CERTIFICATE-----","enforced":true,"name":"My mutual authentication updated"}}} + {"data":{"type":"mutual_authentication","id":"d6Sql38JQh71sAgelxSo37","attributes":{"cert_bundle":"-----BEGIN CERTIFICATE-----\nMIIDWTCCAkGgAwIBAgIITWWCIQf8/VIwDQYJKoZIhvcNAQELBQAwNDEUMBIGA1UE\nAxMLZXhhbXBsZS5jb20xHDAaBgNVBAUTEzU1NzcwMDY3OTE5NDc3Nzk0MTAwHhcN\nMjMwNjAxMTM0MDExWhcNMjMwODMwMTM0MDExWjA0MRQwEgYDVQQDEwtleGFtcGxl\nLmNvbTEcMBoGA1UEBRMTNTU3NzAwNjc5MTk0Nzc3OTQxMDCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAKfm230/fCHtznA1JJMmWArETYorVI+uV9GY12be\nmz5ZcFSJKwklqZyj4J47TFYlSygDV3/1N8yBUeljf/hrByBYB/rcabgR98UILHFo\nHC2An6bI1dX+HmmFXI5ZAqZu+/TtW3/c7031/cJo9nJnP7ZJadtZdKd/w747V1KI\nBHQZKtkX8C9E5IqE/SOJPvC5O4SrbDjMjloaH3KNNF9XNvKe+oqPfr89NTmKH8LX\ndbZ/60qp62R/2iMKbhtSJbKKnLyZa8pynEaq+5AVOMRCw9U1zGdOeKoXVMaqzEJ5\nNd33gXKGVcb0Z+JkXuC/Cpmhqqbr0WMBTZM/neW3bFeywtcCAwEAAaNvMG0wDgYD\nVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA8GA1UdEwEB/wQFMAMB\nAf8wHQYDVR0OBBYEFKVT08Cb2bIDkPd5qom8Zw2hDuD8MBYGA1UdEQQPMA2CC2V4\nYW1wbGUuY29tMA0GCSqGSIb3DQEBCwUAA4IBAQBzerYaKOpvyd68qxb3ysGY+XkJ\npt8Bl3ZXiQDVJHGADXzj2NU7YKhaXoGZpO5pwthmXr55ZEsm3e72ooEn3aBuPkFX\nep5DNOOJXXJrJIiVgU1zXp5bdwJewPdCe8yoPt3/a3oGr3UlqTfwtvuAOCeydT4R\nZRUKQr/8uWz0tNbL26fWhU2ibkp453/dx8uCa5Ls/2SjbPzq+yxGfIJUq0hbTeir\nudkd0XV24Cq2jwAjCoqGLOwoWzKwobNZoLzUTOk4ZHTm+CZUHbztD3gu0wSkIkxD\npquKnpJO343YrMDARMbLnkVK64r9pi1HzEFGujEt3aAnu3o+17V93BHk7jAh\n-----END CERTIFICATE-----","enforced":true,"name":"My mutual authentication updated"}}} form: {} headers: Accept: @@ -11,12 +11,12 @@ interactions: Content-Type: - application/vnd.api+json User-Agent: - - FastlyGo/8.3.0 (+github.com/fastly/go-fastly; go1.18.5) - url: https://api.fastly.com/tls/mutual_authentications/4tFjGkmDCvPr7f4I9RlDq5 + - FastlyGo/8.4.0 (+github.com/fastly/go-fastly; go1.18.5) + url: https://api.fastly.com/tls/mutual_authentications/d6Sql38JQh71sAgelxSo37 method: PATCH response: - body: '{"data":{"id":"4tFjGkmDCvPr7f4I9RlDq5","type":"mutual_authentication","attributes":{"created_at":"2023-05-31T11:48:28.000Z","enforced":true,"name":"My - mutual authentication updated","updated_at":"2023-05-31T11:48:29.000Z"},"relationships":{"tls_activations":{"data":[]}}}}' + body: '{"data":{"id":"d6Sql38JQh71sAgelxSo37","type":"mutual_authentication","attributes":{"created_at":"2023-06-01T13:40:13.000Z","enforced":true,"name":"My + mutual authentication updated","updated_at":"2023-06-01T13:40:14.000Z"},"relationships":{"tls_activations":{"data":[]}}}}' headers: Accept-Ranges: - bytes @@ -27,7 +27,7 @@ interactions: Content-Type: - application/vnd.api+json Date: - - Wed, 31 May 2023 11:48:29 GMT + - Thu, 01 Jun 2023 13:40:14 GMT Pragma: - no-cache Strict-Transport-Security: @@ -43,9 +43,9 @@ interactions: X-Content-Type-Options: - nosniff X-Served-By: - - cache-control-cp-aws-us-east-2-prod-7-CONTROL-AWS-UE2, cache-lhr7383-LHR + - cache-control-cp-aws-us-east-2-prod-5-CONTROL-AWS-UE2, cache-lhr7369-LHR X-Timer: - - S1685533709.447637,VS0,VE333 + - S1685626814.737512,VS0,VE464 status: 200 OK code: 200 duration: "" diff --git a/fastly/tls_mutual_authentication.go b/fastly/tls_mutual_authentication.go index a0b190afe..2351009a9 100644 --- a/fastly/tls_mutual_authentication.go +++ b/fastly/tls_mutual_authentication.go @@ -122,6 +122,8 @@ func (c *Client) GetTLSMutualAuthentication(i *GetTLSMutualAuthenticationInput) type CreateTLSMutualAuthenticationInput struct { // CertBundle is one or more certificates. Enter each individual certificate blob on a new line. Must be PEM-formatted (required). CertBundle string `jsonapi:"attr,cert_bundle"` + // Enforced determines whether Mutual TLS will fail closed (enforced) or fail open. + Enforced bool `jsonapi:"attr,enforced"` // ID should not be set (it's internally used to help marshal the JSONAPI request data). ID string `jsonapi:"primary,mutual_authentication"` // Name is a custom name for your mutual authentication (optional). diff --git a/fastly/tls_mutual_authentication_test.go b/fastly/tls_mutual_authentication_test.go index 8788e7fe8..2bb85cf86 100644 --- a/fastly/tls_mutual_authentication_test.go +++ b/fastly/tls_mutual_authentication_test.go @@ -58,6 +58,7 @@ func TestClient_TLSMutualAuthentication(t *testing.T) { record(t, fixtureBase+"create-tma", func(c *Client) { tma, err = c.CreateTLSMutualAuthentication(&CreateTLSMutualAuthenticationInput{ CertBundle: cert, + Enforced: false, Name: "My mutual authentication", }) }) @@ -72,6 +73,10 @@ func TestClient_TLSMutualAuthentication(t *testing.T) { }) }() + if tma.Enforced { + t.Errorf("bad Enforced: %t", tma.Enforced) + } + // List var tmas []*TLSMutualAuthentication record(t, fixtureBase+"list", func(c *Client) {