Skip to content

Commit

Permalink
create a replacement self-signed server certificate with 10 years lif… (
Browse files Browse the repository at this point in the history
#4009)

…espan

This certificate is only used for testing, so 10 years lifespan is
acceptable.

fixes: #3998

<!-- start metadata -->
---

**Checklist**

Complete the checklist (and note appropriate exceptions) before the PR
is marked ready-for-review.

- [x] Changes are compatible[^1]
- [x] Documentation[^2] completed
- [x] Performance impact assessed and acceptable
- Tests added and passing[^3]
    - [x] Unit Tests
    - [ ] Integration Tests
    - [ ] Manual Tests

**Exceptions**

*Note any exceptions here*

**Notes**

[^1]: It may be appropriate to bring upcoming changes to the attention
of other (impacted) groups. Please endeavour to do this before seeking
PR approval. The mechanism for doing this will vary considerably, so use
your judgement as to how and when to do this.
[^2]: Configuration is an important part of many changes. Where
applicable please try to document configuration examples.
[^3]: Tick whichever testing boxes are applicable. If you are adding
Manual Tests, please document the manual testing (extensively) in the
Exceptions.
  • Loading branch information
garypen authored Oct 10, 2023
2 parents f967a4a + 08a4943 commit e1af2ec
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changesets/maint_garypen_3998_fix_tls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Create a replacement self-signed server certificate: 10 years lifespan ([Issue #3998](https://github.com/apollographql/router/issues/3998))

This certificate is only used for testing, so 10 years lifespan is acceptable.

By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/4009
13 changes: 12 additions & 1 deletion apollo-router/src/services/subgraph_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2781,7 +2781,18 @@ mod tests {
server.await.unwrap()
}

#[ignore]
// Note: This test relies on a checked in certificate with the following validity
// characteristics:
// Validity
// Not Before: Oct 10 07:32:39 2023 GMT
// Not After : Oct 7 07:32:39 2033 GMT
// If this test fails and it is October 7th 2033, you will need to generate a
// new self signed cert. Currently, we use openssl to do this, in the future I
// hope we have something better...
// In the testdata directory run:
// openssl x509 -req -in server_self_signed.csr -signkey server.key -out server_self_signed.crt -extfile server.ext -days 3650
// That will give you another 10 years, assuming nothing else in the signing
// framework has expired.
#[tokio::test(flavor = "multi_thread")]
async fn tls_self_signed() {
let certificate_pem = include_str!("./testdata/server_self_signed.crt");
Expand Down
28 changes: 14 additions & 14 deletions apollo-router/src/services/testdata/server_self_signed.crt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-----BEGIN CERTIFICATE-----
MIIFmTCCA4GgAwIBAgIUDJn4No8XZo+1xUEEMqpAqRi1xmUwDQYJKoZIhvcNAQEL
MIIFmTCCA4GgAwIBAgIUclTyqDAyR3+sL7KvR1kkGIQY+cgwDQYJKoZIhvcNAQEL
BQAwJjELMAkGA1UEBhMCRlIxFzAVBgNVBAoMDkFwb2xsbyBHcmFwaFFMMB4XDTIz
MDkwODE1MjM1M1oXDTIzMTAwODE1MjM1M1owJjELMAkGA1UEBhMCRlIxFzAVBgNV
MTAxMDA3MzIzOVoXDTMzMTAwNzA3MzIzOVowJjELMAkGA1UEBhMCRlIxFzAVBgNV
BAoMDkFwb2xsbyBHcmFwaFFMMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC
AgEAsJ8bwoJJ8OLL0U5lrhYUeWpYej+eS5yibX02yWXCpzEgmailiugChwWwJrPE
laarKQUYPTAlhgmFj342TWjTu8fYVAJO3AoHchJtkaQnyJSipagOB+nZQ936T0E6
Expand All @@ -16,17 +16,17 @@ EgRFuJ/D80PFRmPtxKxlPhBvgfD/1U1dWI2XO97Gp3a70RAdJhDkAKIQQesPFHFe
zb9ExT7BcLJCkmXy21oY4Xf+nudfj0ts50yyZcmmFF0Yig0CAwEAAaOBvjCBuzAd
BgNVHQ4EFgQUgv2yxjcZxbXqJBASiv1MdiesIo4wYQYDVR0jBFowWIAUgv2yxjcZ
xbXqJBASiv1MdiesIo6hKqQoMCYxCzAJBgNVBAYTAkZSMRcwFQYDVQQKDA5BcG9s
bG8gR3JhcGhRTIIUDJn4No8XZo+1xUE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