Joe Porpeglia
ffa0ecfac4
Remove unused dependency
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
f911a60baf
Update api-report
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
cd3c5b132e
Update package exports to align with ADR004
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
ccaa50511f
Make getCacheKey sync
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
63e8b8605e
Disable catalog permission middleware unless permission.enabled = true
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
17ebcb09cd
Refactor router tests
...
Adds a `createApp` helper instead of creating the express app in `beforeEach`. This allows tests to mock behavior of router creation, like toggling certain middleware based on config values.
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
f1918143e5
Compute cache keys from tokens instead of user entity refs
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
e9857d0b82
Remove 403 handling logic
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
d9afa2e882
Add tests to verify /static/docs behavior
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
c2f54048d1
Use catalog: prefix for catalog entity cache
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
413c9fab08
Cancel cache read if it takes too long
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
f5598677bf
Set cache value asynchronously
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
45f37c9835
Use CachedEntityLoader in techdocs router
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
7dcc6b1fe6
Add CachedEntityLoader for techdocs
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
b76fec242d
Verify access to related catalog entities for all techdocs api routes
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
Co-authored-by: Nataliya Issayeva <nissayeva@users.noreply.github.com >
2022-01-18 12:43:35 -05:00
github-actions[bot]
a94a2b8b3f
Version Packages (next)
2022-01-18 13:49:07 +00:00
github-actions[bot]
b04011602b
Version Packages
2022-01-13 14:23:13 +00:00
Fredrik Adelöw
5333451def
Got rid of the last brace-typed and hyphen-less params etc
...
Signed-off-by: Fredrik Adelöw <freben@gmail.com >
2022-01-10 09:48:12 +01:00
github-actions[bot]
7d27a11079
Version Packages
2021-12-30 11:06:46 +00:00
Eric Peterson
26a0296341
Merge pull request #8598 from erikxiv/fix-api-auth-in-techdocs
...
fixes api auth bug in techdocs backend
2021-12-28 17:33:36 +01:00
github-actions[bot]
3d68c45ef7
Version Packages
2021-12-23 12:23:34 +00:00
Erik Larsson
da676a49ab
fixes api auth bug in techdocs backend
...
Signed-off-by: Erik Larsson <erik.larsson@schibsted.com >
2021-12-22 22:16:49 +01:00
Eric Peterson
8c25c3ea5b
Allow TechDocs cache in recommended deployment mode.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-12-21 12:02:45 +01:00
github-actions[bot]
9068128fd8
Version Packages
2021-12-09 12:02:28 +00:00
Fredrik Adelöw
dcd1a0c3f4
Do not unpack arguments directly on exported items
...
Signed-off-by: Fredrik Adelöw <freben@gmail.com >
2021-12-07 19:42:10 +01:00
Otto Sichert
731e9293bd
Merge pull request #6335 from backstage/iameap/techdocs-cache
...
[TechDocs] Optional static resource caching
2021-12-06 10:38:30 +01:00
Eric Peterson
ef600b3c8c
Review feedback.
...
Signed-off-by: Eric Peterson <i.am@eric.pe >
2021-12-05 16:50:09 -06:00
github-actions[bot]
29f2606ed9
Version Packages
2021-12-02 12:35:24 +00:00
Eric Peterson
6e9e82b99d
Review feedback.
...
Signed-off-by: Eric Peterson <i.am@eric.pe >
2021-11-28 13:40:51 -07:00
Eric Peterson
e0930f578e
en-US lowercase locale
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
ef04b09f75
Make cache readTimeout configurable.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
da0867f952
Account for legacy path casing in cache invalidation.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
8cf4684a4e
Remove cache invalidation endpoint from middleware.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
a3909d2c2f
Invalidate stale cache entries on read for external builder config when cache is enabled.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
d011fd61ea
Ensure DocsSynchronizer has access to cache client.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
74ccd66e26
Add tests for cache middleware. Do not cache non-200 responses.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
a16dce0433
Tests for TechDocsCache class
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
693db1da54
Review feedback.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
12ce46b229
Update TechDocs Backend API Report
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
790f02c898
Improve types/documentation.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
0a44eb7d52
Initial implementation of TechDocs cache in backend plugin
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:03 -07:00
Eric Peterson
3e443e8e31
Express middleware for reading/writing data to cache.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:13:30 -07:00
MT Lewis
456bcce6ca
Merge pull request #7943 from backstage/natasha/b2b-auth
...
Support backend to backend authentication
2021-11-26 15:31:52 +00:00
MT Lewis
87f1b59ff9
techdocs-backend: update TokenManager mock in collator test suite
...
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com >
2021-11-26 12:16:38 +00:00
Fredrik Adelöw
de1f77b71c
Merge pull request #8233 from backstage/freben/less-cross
...
🧹 Align on usage of `cross-fetch` vs `node-fetch` in frontend vs backend packages
2021-11-26 10:15:50 +01:00
github-actions[bot]
ef34f5de7b
Version Packages
2021-11-25 12:40:52 +00:00
Fredrik Adelöw
b055a6addc
Align on usage of cross-fetch vs node-fetch in frontend vs backend packages
...
Signed-off-by: Fredrik Adelöw <freben@gmail.com >
2021-11-25 13:05:08 +01:00
Mike Lewis
4b6de2f872
backend-common: remove 'Server' from TokenManager method names
...
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
2021-11-23 18:12:28 +00:00
Mike Lewis
8a001f8202
backend-common: TokenManager throws for invalid tokens rather than returning boolean
...
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
2021-11-23 17:55:47 +00:00
Mike Lewis
14a6c46dff
Merge remote-tracking branch 'origin/master' into natasha/b2b-auth
...
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
2021-11-22 18:22:57 +00:00