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

Minor cleanup #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

Atrejoe
Copy link

@Atrejoe Atrejoe commented Feb 21, 2022

Added user-secrets to web project, allowing safe storage of credentials during development
Ignored Visual Studio and user-specific files

@AaronAtDuo
Copy link
Contributor

@Atrejoe Thanks for the PR. I've almost committed Duo keys multiple times, so a better way to handle secrets would be welcome. Couple things:

For those (like me) not familiar with the User Secrets functionality in ASP.NET Core, could you also include changes to the README that explain how to use this as an alternative to the appsettings files?

Also, is the User Secrets capability restricted to Windows, or is it cross-platform? Does it only work with Visual Studio, or can it be used from the dotnet CLI? I want to avoid any OS/platform specific limitations as much as possible.

@AaronAtDuo
Copy link
Contributor

The CI failures seem to be due to the certificate issue from yesterday (#10) so the tests should pass on the next run. There is an issue with the linter still which we are looking into.

@AaronAtDuo
Copy link
Contributor

@Atrejoe Circling back to this, I'm still curious about this user secrets capability. Is there any documentation you can share, or answers to my above questions?

@Atrejoe
Copy link
Author

Atrejoe commented Sep 18, 2022

@AaronAtDuo my apologies for not coming back to you, assuming you have already found out, but leaving this for posterity:

Enabling user-secrets in a project allow developers to store secrets in their local user-profile, preventing accidentally committing these secrets to the repo.
The secrets reside in the users profile directory and will be merged only when present. For more information, read:
https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets

TLDR:

  • Open User-Secrets
  • Set or change secrets using dot-notated attributes
    image

@AaronAtDuo
Copy link
Contributor

@Atrejoe This looks promising! Unless I'm misreading this though, there's also changes to Startup.cs that are necessary to actually retrieve the stored secrets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants