-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: bootstrap reload in offline mode. #595
Conversation
After adding support for client and frontend tokens, we did not extend the reloader to check client and frontend token Vecs, this PR extends tokens with FE and Client tokens, to ensure that we refresh the data for all our tokens. In addition we make /internal-backstage/tokens useful for offline mode as well, to at least be able to see which tokens you added to Edge. Fixes: #594
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
srv.call(req).await?.map_into_left_body() | ||
} else { | ||
req.into_response(HttpResponse::Forbidden().finish()) | ||
.map_into_right_body() | ||
} | ||
} | ||
Some(TokenType::Client) => { | ||
trace!("Got Client token validated {:?}", known_token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why we're getting rid of these now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've verified that it triggers, and we have the /internal-backstage/tokens endpoint to see which tokens we know about, so cleaned it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@chriswk Thanks for fixing both things. The question is, when is a new release with the fix available? Do you have an information for me? |
After adding support for client and frontend tokens, we did not extend the reloader to check client and frontend token Vecs, this PR extends tokens with FE and Client tokens, to ensure that we refresh the data for all our tokens.
In addition we make /internal-backstage/tokens useful for offline mode as well, to at least be able to see which tokens you added to Edge.
In addition, since offline mode did not set up a token validator, I extended the auth middleware to check if our offline token has a token type set and if they do, limit their access to what they were intended for (client for /api/client, frontend for /api/frontend | /api/proxy)
Fixes: #594