Skip to content

Conversation

@xdefaulter
Copy link
Contributor

Pull Request check list

  • Commit conforms to CONTRIBUTING.md?y
  • Proper tests/regressions included?y
  • Documentation updated?n

Affected functionality
Instead of using non-persistent Start Parameters in windows services as we do using code below.

 sc.exe create spire-server binpath=c:\spire\bin\spire-server.exe
sc.exe start spire-server run -config c:\spire\conf\server\server.conf

We can use just create service command that will create the service with all the arguments. The arguments are persistent and the service can start automatically.
sc.exe create spire-server binpath= "c:\spire\bin\spire-server.exe run -config c:\spire\conf\server\server.conf"
Description of change
In service_windows enterypoint, I have used os.Args that will accept Arguments form binPath. The code has condition to check if os.Args are valid if not then it will check Start Parameters Args if they are also invalid then it will throw error same as before.

Which issue this PR fixes
fixes #6464

Copy link
Member

@amartinezfayo amartinezfayo left a comment

Choose a reason for hiding this comment

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

Thank you @xdefaulter for this contribution!
Could you please fix DCO and the lint issue so we can have this merged?
Thanks again!

@RodargDev
Copy link

@xdefaulter any idea when you will be able to resolve the merge issues? Don't want to be a prick and push it onto you but currently i can only use the sc start command which doesnt work with recovery so we are very interested in this fix. @amartinezfayo could this be hotfixed to 1.14.1 whenever it is merged?

@xdefaulter xdefaulter force-pushed the bugfix/6464-Windows-Services-Start-binPath-Args-issue branch from 73674d4 to a2ced48 Compare December 16, 2025 02:33
Copy link
Member

@amartinezfayo amartinezfayo left a comment

Choose a reason for hiding this comment

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

🎉

@amartinezfayo amartinezfayo added this to the 1.14.1 milestone Dec 16, 2025
@amartinezfayo amartinezfayo merged commit 5512c9b into spiffe:main Dec 16, 2025
47 checks passed
@amartinezfayo
Copy link
Member

This has been merged and will be included in the 1.14.1 release.
Thanks for the contribution!

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.

Windows service entrypoint only sees service name in Execute args, rejects valid run arguments

3 participants