question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Techdocs needs to send Identity information to the backend when requesting documentation and static files

See original GitHub issue

Techdocs plugin currently does not provide authentication information to the backend or has an API to which this information can be passed, when requesting Documentation and static files, such as images and CSS further requested by the Reader

Feature Suggestion

  1. Modify the TechDocs API methods to optionally take in Authentication information
  2. Techdocs fetches this info implicitly (from Identity or from OAuth2 API) before making this request.
  3. Reader rewrites links to static resources (CSS, images) to include authentication information.

Possible Implementation

Modify TechDocs Implementation to request identity info during runtime and pass it along in all the methods in the request https://github.com/backstage/backstage/blob/master/plugins/techdocs/src/api.ts or in https://github.com/backstage/backstage/blob/master/plugins/techdocs/src/reader/components/TechDocsPage.tsx also in the docs links transformer possibly https://github.com/backstage/backstage/blob/master/plugins/techdocs/src/reader/transformers/rewriteDocLinks.ts

Context

Our Backstage application instance is hosted on a publicly accessible endpoint and any request the app makes , to the backend instance, needs to be secure. When the frontend makes CORS requests to the backend, it is not clear who is request these routes/information thus causing a security vulnerability.

In order to mitigate this, the TechDocs plugin should ideally provide the authentication/identity information so that the backend can authenticate the request and provide the requested resource.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
erikxivcommented, May 23, 2021

#4542 together with adding a cookie from adopter code as outlined in https://github.com/backstage/backstage/blob/master/contrib/docs/tutorials/authenticate-api-requests.md works. Not sure whether this satisfies this issue, or if the issue should be kept open awaiting a solution in backstage core to address iit.

0reactions
stale[bot]commented, Oct 13, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TechDocs How-To guides - Backstage.io
If TechDocs is configured to generate docs, it will first download source files based on the value of the backstage.io/techdocs-ref annotation defined in...
Read more >
[Techdocs] : URL Reader is not able to download the files in ...
Steps to Reproduce. Step 1. set app config YAML as below. # Reference documentation http://backstage.io/docs/features/techdocs ...
Read more >
Setting up Techdocs on Backstage | Let's Treat Docs Like Code
When you open a TechDocs site, a request is made. The TechDocs reader calls the TechDocs-backend with the entity id and the path...
Read more >
Backstage - Techdocs AWS Support - My Open Source journey
To render the documentation, TechDocs uses the generated static files. In the "recommended" setup you need to add a cloud storage providers ...
Read more >
Backstage TechDocs - How it works - Roadie.io
TechDocs is the core Backstage feature which transforms markdown ... to move the documentation to plugins/techdocs-backend/static/docs/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found