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

Web Api template attempts to retrieve an invalid KeyVault secrent-name #924

Open
fgheysels opened this issue Oct 23, 2024 · 3 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers runtime:dotnet All issues related to templates in pure .NET template-area:web-api All issues related to templates for Web APIs
Milestone

Comments

@fgheysels
Copy link
Member

The Arcus Web API template defines that the AppInsights connection-string must be retrieved from KeyVault, and suggests that the secret that contains this connection-string is named APPLICATIONINSIGHTS_CONNECTION_STRING.

#if Serilog_AppInsights
        #warning Make sure that the Azure Application Insights connection string key is available as a secret.
        private const string ApplicationInsightsConnectionStringKeyName = "APPLICATIONINSIGHTS_CONNECTION_STRING";
        
#endif

However the underscore _ is a character that is not allowed in KeyVault secret-names.
The template must be modified in such a way that we either suggest another secret-name or that the mutateSecretName parameter is specified in the code that adds KeyVault as a secretprovider.

@stijnmoreels
Copy link
Member

stijnmoreels commented Oct 24, 2024

There are multiple providers defined, so we don't force people to use key vault. I even believe that by the name, we kinda suggest this to be an environment variable.
Happy to change this setup, of course. A good one for a first-time contributor.

@stijnmoreels stijnmoreels added this to the v2.1.0 milestone Oct 24, 2024
@github-project-automation github-project-automation bot moved this to To do in Roadmap Oct 24, 2024
@stijnmoreels stijnmoreels added enhancement New feature or request good first issue Good for newcomers template-area:web-api All issues related to templates for Web APIs runtime:dotnet All issues related to templates in pure .NET labels Oct 24, 2024
@fgheysels
Copy link
Member Author

If it's retrieved from KeyVault, this won't work as KeyVault doesn't allow underscores in its secret-name.
Since a KeyVault secretprovider is added via the template , I suggest that we define the mutate-secretname parameter ?

@stijnmoreels
Copy link
Member

If it's retrieved from KeyVault, this won't work as KeyVault doesn't allow underscores in its secret-name. Since a KeyVault secretprovider is added via the template , I suggest that we define the mutate-secretname parameter ?

Yes, we could do that. Agreed. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers runtime:dotnet All issues related to templates in pure .NET template-area:web-api All issues related to templates for Web APIs
Projects
Status: To do
Development

No branches or pull requests

2 participants