{"id":19109984,"url":"https://github.com/coopdevs/vault_ssh_role","last_synced_at":"2026-06-14T01:34:01.306Z","repository":{"id":210040834,"uuid":"725516841","full_name":"coopdevs/vault_ssh_role","owner":"coopdevs","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-14T12:47:27.000Z","size":37,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-14T01:34:00.044Z","etag":null,"topics":["ansible-role"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coopdevs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-30T10:04:24.000Z","updated_at":"2026-05-14T12:57:20.000Z","dependencies_parsed_at":"2024-11-09T04:25:29.939Z","dependency_job_id":"fb4a8883-c334-4e3b-914c-c1cb21678987","html_url":"https://github.com/coopdevs/vault_ssh_role","commit_stats":null,"previous_names":["coopdevs/vault_ssh_role"],"tags_count":0,"template":false,"template_full_name":"coopdevs/ansible-role-template","purl":"pkg:github/coopdevs/vault_ssh_role","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coopdevs%2Fvault_ssh_role","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coopdevs%2Fvault_ssh_role/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coopdevs%2Fvault_ssh_role/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coopdevs%2Fvault_ssh_role/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coopdevs","download_url":"https://codeload.github.com/coopdevs/vault_ssh_role/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coopdevs%2Fvault_ssh_role/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34306772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible-role"],"created_at":"2024-11-09T04:23:08.814Z","updated_at":"2026-06-14T01:34:01.289Z","avatar_url":"https://github.com/coopdevs.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Role: Vault SSH Role\n\n## Overview\n\nThis role configures a host to use SSH keys signed by HashiCorp Vault, streamlining SSH key management.\n\nInitially, it sets up the Vault client and configures SSH to use Vault-signed keys.\n\nWhen the `hardening` variable is enabled, the role additionally applies enhanced security measures.\n\n## Requirements\n\n- Ansible 2.9 or higher.\n- Operational HashiCorp Vault server.\n- A Vault token with the `create` and `update` capabilities on the `ssh-client-signer` endpoint.\n\n## Role Variables\n\nBelow are the variables you can override, along with their default values:\n\n### `main.yml` Variables\n\nThe most relevant variables are:\n\n- `deploy_user`: User for assigning SSH keys. Default: `\"coopbot\"`\n- `users_list`: Users to configure for SSH access. Default: `[\"{{ deploy_user }}\"]`\n- `hardening`: Apply additional security measures (True/False). Default: `False`\n- `vault_address`: URL of the Vault server. Default: `\"http://127.0.0.1:8200\"`\n- `vault_public_key`: URL or path for the public key of the Vault. Default: `\"\"`\n\n### `secrets.yml` Variables\n\nEnsure to update this file with your own secrets and encrypt them with Ansible Vault.\n\n```yaml\n---\nvault_address: \"https://vault.example.com\"\nvault_token: \"token\"\n```\n\n## Role Behavior\n\n### Without hardening\n\nSets up SSH to use keys signed by HashiCorp Vault (main.yml).\n\n- Download Vault public key.\n- Configure SSH to use Vault-signed keys.\n\n### With hardening Enabled\n\nPerforms the above tasks and applies additional security configurations (`hardening.yml`).\n\n- Install `vault` client.\n- Sign `HostCertificate` with Vault and set up it to be used by SSHD. This allows the host to be authenticated by Vault.\n- Enable `AuthorizedPrincipalsFile`. This file specifies a list of principals (users) who are authorized to access each account, providing an extra layer of control over SSH access.\n\n## Example Playbook\n\nRemember to replace the values in `vars` with ones appropriate for your environment.\nHere's an example playbook on how to use this role:\n\n```yaml\n- hosts: servers\n  roles:\n    - vault_ssh_setup\n  vars:\n    vault_public_key: \"https://example.com/vault-public-key.pem\"\n    users_list: [\"deployuser\", \"anotheruser\"]\n    hardening: True\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoopdevs%2Fvault_ssh_role","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoopdevs%2Fvault_ssh_role","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoopdevs%2Fvault_ssh_role/lists"}