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

ASPNET Core Configuration Hierarchy not respected. #516

Open
VictorioBerra opened this issue Apr 15, 2020 · 2 comments
Open

ASPNET Core Configuration Hierarchy not respected. #516

VictorioBerra opened this issue Apr 15, 2020 · 2 comments
Assignees
Labels
enhancement Denotes SDK enhancement related task question

Comments

@VictorioBerra
Copy link

Describe the bug
If you have your access token in a secrets file for example, this will not get loaded. Same with environment vars, CLI args, etc.

https://github.com/rollbar/Rollbar.NET/blob/master/Rollbar/NetCore/AppSettingsUtility.cs#L181

To Reproduce
Create a secrets file. Put { "Rollbar": { "AccessToken": "abc1234"}}. Examine RollbarLocator.RollbarInstance.Config.AccessToken notice its not the one from secrets.

Expected behavior
Get the config setting from configuration and let ASPNET Core decide where to look

@akornich akornich self-assigned this Apr 16, 2020
@akornich akornich added question enhancement Denotes SDK enhancement related task labels Apr 16, 2020
@akornich
Copy link
Contributor

akornich commented Apr 16, 2020

@VictorioBerra , correct, currently, we are only supporting loading configuration either via appsettings.json, or app.config, or any other similarly-formatted file (either JSON or XML based using dedicated Rollbar section): https://docs.rollbar.com/docs/logger-configuration.

It is not really a bug but a scenario we never considered to support yet.

We may consider supporting this scenario but, first, we would like to learn what is the motivation for it. The access token is stored on a server under your control. The token does appear in the web requests posting the payload so it is not an absolute secret on the big scale.

@JohnCampionJr
Copy link

I agree this is a bug.

Rollbar should follow Core standards with regards to reading the appsettings.json file.

For example, I have basic config in appsettings.json with production values in appsettings.Production.json.

Rollbar does not use the values in Production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Denotes SDK enhancement related task question
Projects
None yet
Development

No branches or pull requests

3 participants