beyondcode / beyondcode/herd-community

[Bug]: Failing to secure sites

Open
#1,532 8 comments 1 reaction 0 assignees View on GitHub
macOS
Dominant language
No language data
Stars
122
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### Platform

macOS

### Operating system version

26.0 Tahoe

### System architecture

ARM64 (M1, M2, etc)

### Herd Version

1.22.3 (Build: 55)

### PHP Version

8.4 (latest)

### Bug description

Hello @mpociot,

First of all, great work from you and your team on Herd! It has the promise to be a game changer for us here and we're looking forward to its future development 😊

As a new user of Herd currently provisioning around 23 laptops for our developers, and due to our company’s MDM policy, we cannot grant them root privileges. I understand that Herd requires installation and operation as an admin user, and over the weekend, we’ve managed to address most issues with workarounds, except for securing sites.

Searching through this repo, I came across a comment of yours where you shared the following command that Herd runs to create the certificate for a newly secured site. While it worked well, it does not generate the .key file, among other steps.

> ```
> openssl x509 -req -sha256 -days 368 -CA "/Users/YourUser/Library/Application Support/Herd/config/valet/CA/LaravelValetCASelfSigned.pem" -CAkey "/Users/YourUser/Library/Application Support/Herd/config/valet/CA/LaravelValetCASelfSigned.key" -CAserial "/Users/YourUser/Library/Application Support/Herd/config/valet/CA/LaravelValetCASelfSigned.srl" -in "/Users/YourUser/Library/Application Support/Herd/config/valet/Certificates/yoursite.test.csr" -out "/Users/YourUser/Library/Application Support/Herd/config/valet/Certificates/yoursite.test.crt" -extensions v3_req -extfile "/Users/YourUser/Library/Application Support/Herd/config/valet/Certificates/yoursite.test.conf"
> ```

I suspect that this command is just one part of the overall process for securing a site when we click on the GUI or run the `secure` command. As a temporary workaround for the permissions issue, could you please provide the complete series of commands or steps that Herd executes when securing a site? This would allow us to run them manually on our own while we seek a definitive solution.

I believe this information would be beneficial not only for us, but for many other facing similar challenges, as reflected in the recurring discussions on this topic in this repo. If this would be fine for you to share, perhaps you could include that information in a pinned issue on the repo, and as part of the Troubleshooting section in the official documentation, then everyone would know how to go about saving time and effort for everyone 🙂

Thank you very much in advance!

### Steps to reproduce

1. Work with Herd as a non-admin Mac user.
2. Click on the "lock" icon in the GUI or run the `herd secure yoursite` command in CLI.
3. Herd either fails silently on GUI or asks continuously for admin password in CLI.

As a result, the certificates aren't created and the sites are broken.

### Relevant log output

```shell

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.