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

Update README #27

Merged
merged 2 commits into from
Apr 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ certificate from it.

```yaml
jobs:
build:
deploy:
permissions:
contents: read
id-token: write
Expand All @@ -30,11 +30,11 @@ jobs:
- name: Deploy site
if: github.ref == 'refs/heads/main'
run: >
rsync -e "ssh -i '$SSH_CERT_PATH'"
rsync -e "ssh -i '$SSH_KEY_PATH'"
--verbose --recursive --delete-after --perms --chmod=D755,F644
build/ [email protected]:/var/www/site/
env:
SSH_CERT_PATH: ${{ steps.ssh_cert.outputs.key_path }}
SSH_KEY_PATH: ${{ steps.ssh_cert.outputs.key_path }}
```

Do note that all client certification configuration is expected to
Expand Down Expand Up @@ -108,5 +108,30 @@ resource "vault_jwt_auth_backend_role" "example" {
}
```

```terraform
output "ssh_ca" {
value = vault_ssh_secret_backend_ca.ssh_ca.public_key
}
```

### OpenSSH

```ssh-config
# /etc/ssh/sshd_config
# ...
TrustedUserCAKeys /etc/ssh/sshd_user_ca.pub
AuthorizedPrincipalsFile /etc/ssh/user_principals/%u
```

```text
# /etc/ssh/sshd_user_ca.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI...
```

```text
# /etc/ssh/user_principals/deployer
[email protected]
```


[1]: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect