Skip to content
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

Default to browser token auth in dashboard standalone #3427

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Apr 5, 2024

Based on offline discussion, I've changed dashboard standalone to the default to browser token auth. Also, I noticed a number of bugs in dashboard standalone mode related to browser token auth. They're fixed in this PR.

This PR:

  • Changes dashboard to default to browser token auth in the frontend, and unsecured in OTLP endpoint
  • Displays a warning about the unsecured OTLP endpoint in the console and in the UI with a message bar
  • Fixes the browser token being generated multiple times
  • Fixes the addresses written to the console to be the first address (matches host) instead of the last address
  • Fixes the addresses written to the console to be localhost if localhost is specified.

Demo:

standalone-browser-token

Microsoft Reviewers: Open in CodeFlow

@davidfowl
Copy link
Member

Very nice! Lets get this in for GA.

Copy link
Member

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left feedback

@JamesNK JamesNK enabled auto-merge (squash) April 7, 2024 23:32
@JamesNK JamesNK force-pushed the jamesnk/dashboard-standalone-browsertoken branch from f4fff6c to f94604f Compare April 7, 2024 23:39
@JamesNK JamesNK merged commit e763713 into main Apr 8, 2024
8 checks passed
@JamesNK JamesNK deleted the jamesnk/dashboard-standalone-browsertoken branch April 8, 2024 00:35
@JamesNK
Copy link
Member Author

JamesNK commented Apr 8, 2024

/backport to release/8.0

Copy link
Contributor

github-actions bot commented Apr 8, 2024

Started backporting to release/8.0: https://github.com/dotnet/aspire/actions/runs/8592957835

Copy link
Contributor

github-actions bot commented Apr 8, 2024

@JamesNK backporting to release/8.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Default to browser token auth in dashboard standalone
.git/rebase-apply/patch:359: trailing whitespace.
        
.git/rebase-apply/patch:368: trailing whitespace.
        
.git/rebase-apply/patch:377: trailing whitespace.
        
warning: 3 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	src/Aspire.Dashboard/DashboardWebApplication.cs
M	src/Aspire.Dashboard/wwwroot/css/app.css
M	tests/Aspire.Dashboard.Tests/Integration/StartupTests.cs
Falling back to patching base and 3-way merge...
Auto-merging tests/Aspire.Dashboard.Tests/Integration/StartupTests.cs
CONFLICT (content): Merge conflict in tests/Aspire.Dashboard.Tests/Integration/StartupTests.cs
Auto-merging src/Aspire.Dashboard/wwwroot/css/app.css
Auto-merging src/Aspire.Dashboard/DashboardWebApplication.cs
CONFLICT (content): Merge conflict in src/Aspire.Dashboard/DashboardWebApplication.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Default to browser token auth in dashboard standalone
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link
Contributor

github-actions bot commented Apr 8, 2024

@JamesNK an error occurred while backporting to release/8.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants