-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs https://linear.app/tryghost/issue/AP-288 This makes sure that all of our tests use authentication. We have to stop communicating with the `activitypub-testing` service directly, because we need to replicate how this runs in production. How this generally runs is that there will be a host `example.com` and everything on `/.ghost/activitypub` will hit our service, and everything else will hit a Ghost instance - specifically for us we need the `/ghost/.well-known/jwks.json` endpoint to be reachable for auth to work. We have two wiremock instances, `fake-external-activitypub` is used to mock external services, so we can test things like follow requests and sending to external inboxes. `fake-ghost-activitypub` is the actual service under test, it proxies everything to our underlying `activitypub-testing` container, but allows us to add mocks for the jwks.json file. This essentially behaves as the `nginx` container in dev, or fastly in production. Listening on port 80 gives nicer urls Hardcoded keypair saves generating the keys, and allows us to cache them in the db.
- Loading branch information
Showing
5 changed files
with
163 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDF/DHjumSXbqze | ||
fmOULYZNlddNWpqw6q3T1U/zrwY8XM/sZhRKzUBcEUVDucQTbSPpuo46FoNOhJT7 | ||
ws57ltNlwLxJkzwTmkY2QUX2lmvRzXYwfjb4Q0y0ynYgDop213stJLORnpA4CjWP | ||
gfvOtqpbEDI5L6luXEOR8G69Mfu3FzJ7C83WfpzuU5ErPSEBZZ0TT2ZXn8g6YXWu | ||
EyDUz4GPNaDpRnaYU/5jNpURwzaB92Hmbb99zeUjPHMsrcRrAILDT46T66ISSi6J | ||
Jpv1OcYkedCxjdRWSGz8jPXy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6G4rKM22S1sooy2Nr7ktwTOpt60EFOs86UkhaL3lhmUD8KU1QouY5TkB7MPC2q | ||
eOoO/Zn6CRFgtGferQ56ualskMglb4QrUF+/Ps65AoGAK89IUXy0AZe6Mu/Cel8c | ||
vqy/162x6s3WjBVNB9Yv2SyyRDNi08/5j1IDBAsSAbFXI4GMY/SnqF7E5YhSvCwa | ||
A9thv/Im0kF/72POO6UpEfe2QWqjOpUI8FCMWUOVDP4tVQ9b8eTqNTMkB3W4MgTo | ||
2EOtiOrc9Wd+E7gpDsVMCNA= | ||
-----END PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-----BEGIN PUBLIC KEY----- | ||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxfwx47pkl26s3n5jlC2G | ||
TZXXTVqasOqt09VP868GPFzP7GYUSs1AXBFFQ7nEE20j6bqOOhaDToSU+8LOe5bT | ||
ZcC8SZM8E5pGNkFF9pZr0c12MH42+ENMtMp2IA6Kdtd7LSSzkZ6QOAo1j4H7zraq | ||
WxAyOS+pblxDkfBuvTH7txcyewvN1n6c7lORKz0hAWWdE09mV5/IOmF1rhMg1M+B | ||
jzWg6UZ2mFP+YzaVEcM2gfdh5m2/fc3lIzxzLK3EawCCw0+Ok+uiEkouiSab9TnG | ||
JHnQsY3UVkhs/Iz18juOqtwq3B9pIYsEZJNiOXZ/vICZIDih2wnNz1A9DiNZyoXx | ||
BQIDAQAB | ||
-----END PUBLIC KEY----- |
Oops, something went wrong.