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

Fix permission issue in pki-server ca-cert-request-import #4606

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

edewata
Copy link
Contributor

@edewata edewata commented Nov 9, 2023

In some cases pki-server ca-cert-request-import fails to import a CSR since the Python code of the command runs as the current user but the Java code runs as PKI user which might not have the permission to read the input file.

To avoid the issue, the Python code has been modified to load the CSR into memory, then pass the CSR to Java via the standard input. The Java code has been updated not to throw an exception if the CSR is provided via the standard input instead of a file.

In some cases pki-server ca-cert-request-import fails to import a
CSR since the Python code of the command runs as the current user
but the Java code runs as PKI user which might not have the
permission to read the input file.

To avoid the issue, the Python code has been modified to load the
CSR into memory, then pass the CSR to Java via the standard input.
The Java code has been updated not to throw an exception if the
CSR is provided via the standard input instead of a file.
@edewata edewata requested a review from fmarco76 November 9, 2023 16:50
Copy link

sonarqubecloud bot commented Nov 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@fmarco76 fmarco76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@edewata
Copy link
Contributor Author

edewata commented Nov 10, 2023

@fmarco76 Thanks!

@edewata edewata merged commit 7d31c73 into dogtagpki:master Nov 10, 2023
131 of 132 checks passed
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