Skip to content

Store with flags - #85

Merged
alexherrero merged 3 commits into
google:masterfrom
yuval-lom:store-with-flags
Jun 12, 2025
Merged

alexherrero merged 3 commits into
google:masterfrom
yuval-lom:store-with-flags

Conversation

@yuval-lom

Copy link
Copy Markdown
Contributor

I created this pull request for cases where the application using the certificate store is running with least privileges, and needs to be able read certificate and key from the certificate store.

For example in my use case I needed to run as a windows service under network service account.
The best practice I found was to import the certificate into LocalMachine/MY store, and grant read permissions to my service.

The current code does not support this scenario as it tries to open the store with the FullAccess permissions which my service does not have, resulting in access denied error when it tries to execute the windows.CertOpenStore method (newStoreHandle in certtostore_windows.go file)

yuval-lom added 2 commits June 8, 2025 16:27
Needed in cases where the application is running as a windows service with no or least privileges, and still needs to be able read certificate and key from the certificate store
@google-cla

google-cla Bot commented Jun 8, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@yuval-lom yuval-lom closed this Jun 9, 2025
@yuval-lom yuval-lom reopened this Jun 9, 2025
@yuval-lom

Copy link
Copy Markdown
Contributor Author

Hi folks,

Can you please review my changes? 🙏

@alexherrero
alexherrero self-requested a review June 12, 2025 21:41
@alexherrero alexherrero self-assigned this Jun 12, 2025

@alexherrero alexherrero left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, sensibly done.

@alexherrero
alexherrero merged commit f4a238a into google:master Jun 12, 2025
@yuval-lom

yuval-lom commented Jun 16, 2025 via email

Copy link
Copy Markdown
Contributor Author

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