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

Version 2.1.3 does not provide correct MachineName #35

Open
jehof opened this issue May 20, 2019 · 4 comments
Open

Version 2.1.3 does not provide correct MachineName #35

jehof opened this issue May 20, 2019 · 4 comments
Labels

Comments

@jehof
Copy link

jehof commented May 20, 2019

With the newest version 2.1.3 we are getting the wrong MachineName attached to our logs. At least it is not the machine name. (I have obfuscated the MachineName)

This is an entry written with 2.1.2

{"Timestamp":"2019-05-20T18:12:18.7714079+00:00","Level":"Warning","MessageTemplate":"No XML encryptor configured. Key {KeyId:B} may be persisted to storage in unencrypted form.","Properties":{"KeyId":"2b3669f8-7c20-40da-b5cd-84214c9603f5","EventId":{"Id":35},"SourceContext":"Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager","MachineName":"company.product.environment.service","ThreadId":1},"Renderings":{"KeyId":[{"Format":"B","Rendering":"{2b3669f8-7c20-40da-b5cd-84214c9603f5}"}]}}

This is one written with 2.1.3

{"Timestamp":"2019-05-20T17:36:18.3793019+00:00","Level":"Warning","MessageTemplate":"No XML encryptor configured. Key {KeyId:B} may be persisted to storage in unencrypted form.","Properties":{"KeyId":"17c4225e-a144-4059-b8e5-fc002265e678","EventId":{"Id":35},"SourceContext":"Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager","MachineName":"company","ThreadId":1},"Renderings":{"KeyId":[{"Format":"B","Rendering":"{17c4225e-a144-4059-b8e5-fc002265e678}"}]}}

We are using alpine-images (2.1.10) with non-root user if it is relevant. Opening a shell on the running container and executing ECHO %HOSTNAME prints out "company.product.environment.service". No matter if I use 2.1.2 or 2.1.3.

Some more info about the non-root user. The username is company and it is part of group company

@nblumhardt
Copy link
Member

Thanks for the report. It looks like this is related to: #26

@nblumhardt nblumhardt added the bug label May 20, 2019
@Numpsy
Copy link
Member

Numpsy commented Oct 15, 2023

Is this still an issue if #26 is complete?

@nblumhardt
Copy link
Member

I think this was raised after the changes made for #26.

@Numpsy
Copy link
Member

Numpsy commented Oct 16, 2023

Ok.

On that note, the repo readme.md says

 * `WithMachineName()` - adds `MachineName` based on either `%COMPUTERNAME%` (Windows) or `$HOSTNAME` (macOS, Linux)

which should perhaps be changed if it's actually using Environment.MachineName on all platforms?

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

No branches or pull requests

3 participants