fix(cdk-evals): deny dashboard deploy when auth secret is unavailable#74
Draft
yonib05 wants to merge 1 commit into
Draft
fix(cdk-evals): deny dashboard deploy when auth secret is unavailable#74yonib05 wants to merge 1 commit into
yonib05 wants to merge 1 commit into
Conversation
The dashboard stack injects basic-auth credentials read from the strands-evals/dashboard-auth Secrets Manager secret into the Lambda@Edge function at synth time. When the secret was absent it fell back to fixed placeholder values, so the dashboard could be served with credentials that are not the configured ones. Require the secret to be present and readable before the auth function is built. If the credentials are unavailable, synthesis now fails with guidance to create the secret, instead of deploying with placeholders.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The evals dashboard stack reads basic-auth credentials from the
strands-evals/dashboard-authSecrets Manager secret at synth time and injects them into the Lambda@Edge function. When the secret was absent, the stack fell back to fixed placeholder values, so the dashboard could be deployed and served with credentials that are not the ones an operator configured.Change
This makes the dashboard deny access by default: it is never deployed without the configured credentials in place.
Testing
cd cdk-evals && npx tsc --noEmit lib/dashboard-stack.ts(with project compiler options) passes with no errors.buildscript is justtsc, and there are no*.test.tsfiles or test runner dependencies), so no regression test was added.