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

Mask proxy credentials in log output #9294

Closed
mpreu opened this issue Oct 17, 2024 · 1 comment · Fixed by #9295
Closed

Mask proxy credentials in log output #9294

mpreu opened this issue Oct 17, 2024 · 1 comment · Fixed by #9295
Assignees
Labels
cli About the Command Line Interface enhancement Issues that are considered to be enhancements

Comments

@mpreu
Copy link

mpreu commented Oct 17, 2024

What is the existing functionality and how should it be enhanced?

In version 35.0.0, with log level info, a summary of relevant environment variables is printed:

Environment variables:                                                        
ORT_CONFIG_DIR = /home/ort/.ort/config                                        
ORT_DATA_DIR = /home/ort/.ort                                                 
HOME = /home/ort                                                              
TERM = xterm                                                                  
http_proxy = http://user:password@host:port                    
https_proxy = http://user:password@host:port                
JAVA_HOME = /opt/java/openjdk

This includes the proxy variables http_proxy and https_proxy. In case these variables contain credentials for an authenticated proxy, they are printed without any masking.

As proxy variables are a well known location where credentials can occur, it should be ensured that secrets are masked in every output:

http_proxy = http://***:***@host:port                    
https_proxy = http:///***:***@host:port      

What is the use-case for your enhancement?

Using the logs in CI/CD systems without distributing secrets to all users with read access. Authenticated proxies are a regular occurrence in corporate environments.

Alternatives you have considered

Remove proxy variables completely from environment summary.

Additional context

@mpreu mpreu added enhancement Issues that are considered to be enhancements to triage Issues that need triaging labels Oct 17, 2024
@sschuberth sschuberth self-assigned this Oct 17, 2024
@sschuberth sschuberth added cli About the Command Line Interface and removed to triage Issues that need triaging labels Oct 17, 2024
sschuberth added a commit that referenced this issue Oct 17, 2024
Do not expose any credentials, e.g. when included in proxy URLs.

Fixes #9294.

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
sschuberth added a commit that referenced this issue Oct 17, 2024
Do not expose any credentials, e.g. when included in proxy URLs.

Fixes #9294.

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
@sschuberth
Copy link
Member

sschuberth commented Oct 17, 2024

Thanks for the report! A fix is underway.

Using the logs in CI/CD systems without distributing secrets to all users with read access.

Just as a note, as I see you're into Kubernetes and OpenShift, you might be interested in operating ORT via the server as well.

sschuberth added a commit that referenced this issue Oct 17, 2024
Do not expose any credentials, e.g. when included in proxy URLs.

Fixes #9294.

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
sschuberth added a commit that referenced this issue Oct 17, 2024
Do not expose any credentials, e.g. when included in proxy URLs.

Fixes #9294.

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli About the Command Line Interface enhancement Issues that are considered to be enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants