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

Stop the apphost from running if the application url is http and ASPIRE_ALLOW_UNSECURED_TRANSPORT is not set #3177

Merged
merged 41 commits into from
Mar 28, 2024

Conversation

mitchdenny
Copy link
Member

@mitchdenny mitchdenny commented Mar 26, 2024

I'm making use of the options validation APIs to blow up if the URL is http and the allow insecure environment is not set. The environment variable that binds to the option is:

ASPIRE_ALLOW_UNSECURED_TRANSPORT = true
Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 26, 2024
@eerhardt
Copy link
Member

Are there any tests that can be written for this new functionality?

…ributedApplicationOptions.DisableDashboard to do the right thing in terms of validation.
Co-authored-by: Eric Erhardt <[email protected]>
@davidfowl davidfowl changed the title IOptions<DashboardAuthenticationOptions> and IValidateOptions<DashboardAuthenticationOptions> Stop the apphost from running if the application url is http and ASPIRE_ALLOW_UNSECURED_TRANSPORT is not set Mar 27, 2024
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.

small nits but this is good.

@mitchdenny
Copy link
Member Author

/backport to release/8.0-preview5

Copy link
Contributor

Started backporting to release/8.0-preview5: https://github.com/dotnet/aspire/actions/runs/8460970955

Copy link
Contributor

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

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

Applying: Minimal change to kick start the branch.
Using index info to reconstruct a base tree...
M	playground/TestShop/AppHost/Properties/launchSettings.json
Falling back to patching base and 3-way merge...
Auto-merging playground/TestShop/AppHost/Properties/launchSettings.json
No changes -- Patch already applied.
Applying: WIP.
Applying: WIP
Using index info to reconstruct a base tree...
M	playground/TestShop/AppHost/Properties/launchSettings.json
M	src/Aspire.Hosting/Dcp/ApplicationExecutor.cs
M	src/Aspire.Hosting/DistributedApplicationBuilder.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Aspire.Hosting/DistributedApplicationBuilder.cs
Auto-merging src/Aspire.Hosting/Dcp/ApplicationExecutor.cs
CONFLICT (content): Merge conflict in src/Aspire.Hosting/Dcp/ApplicationExecutor.cs
Auto-merging playground/TestShop/AppHost/Properties/launchSettings.json
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 WIP
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

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

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

@mitchdenny mitchdenny merged commit 5f5d3ee into main Mar 28, 2024
8 checks passed
@mitchdenny mitchdenny deleted the mitchdenny/dashboard-auth-basic-plumbing branch March 28, 2024 02:23
mitchdenny added a commit that referenced this pull request Mar 28, 2024
davidfowl pushed a commit that referenced this pull request Mar 28, 2024
@danmoseley danmoseley mentioned this pull request Apr 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants