{"id":51052269,"url":"https://github.com/tunahanaliozturk/keyvaultsync","last_synced_at":"2026-06-22T18:01:51.634Z","repository":{"id":366023531,"uuid":"1274305807","full_name":"tunahanaliozturk/KeyVaultSync","owner":"tunahanaliozturk","description":"CLI to sync appsettings.json key-value pairs into Azure Key Vault — adds missing, updates changed, skips identical (DefaultAzureCredential).","archived":false,"fork":false,"pushed_at":"2026-06-19T22:22:59.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-20T00:12:47.061Z","etag":null,"topics":["appsettings","azure","azure-key-vault","cli","csharp","dotnet","secrets-management"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tunahanaliozturk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2026-06-19T11:31:56.000Z","updated_at":"2026-06-19T23:02:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tunahanaliozturk/KeyVaultSync","commit_stats":null,"previous_names":["tunahanaliozturk/keyvaultsync"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tunahanaliozturk/KeyVaultSync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunahanaliozturk%2FKeyVaultSync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunahanaliozturk%2FKeyVaultSync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunahanaliozturk%2FKeyVaultSync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunahanaliozturk%2FKeyVaultSync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tunahanaliozturk","download_url":"https://codeload.github.com/tunahanaliozturk/KeyVaultSync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunahanaliozturk%2FKeyVaultSync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34659896,"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-22T02:00:06.391Z","response_time":106,"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":["appsettings","azure","azure-key-vault","cli","csharp","dotnet","secrets-management"],"created_at":"2026-06-22T18:01:50.531Z","updated_at":"2026-06-22T18:01:51.617Z","avatar_url":"https://github.com/tunahanaliozturk.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KeyVaultSync\n\nConsole tool for Azure Key Vault with two commands:\n\n- **`sync`** — push key-value pairs from a JSON file into a vault (add missing, update changed, skip identical).\n- **`mapping`** — read-only: emit a `SecretMappings`-shaped JSON (`{ suffix: configKey }`) for a vault's prefix-scoped secrets.\n\n## sync\n\n### Mode A — flatten convention (`:` → `--`)\n\n```bash\nKeyVaultSync sync --vault https://myvault.vault.azure.net --file ./appsettings.json\n```\n\nNested keys are flattened (`ConnectionStrings:Default`) and `:` is converted to `--`\n(`ConnectionStrings--Default`), the Microsoft Key Vault configuration default.\n\n### Mode B — prefix + mappings\n\nFor a vault shared by multiple apps, where secrets are named `{prefix}-{suffix}` and\na `SecretMappings` table (suffix → config key) drives reads (as in\n`PrefixKeyVaultSecretManager`). Supply a profile (the KeyVault config section) and a\nvalues file (a real appsettings with filled-in values):\n\n```bash\nKeyVaultSync sync --profile ./keyvault.json --values ./appsettings.Development.json\n```\n\nThe tool reverses `SecretMappings` (config key → suffix), writes `{prefix}-{suffix}`\nsecrets, and reports:\n- **Unmapped** — values keys with no mapping (not managed secrets).\n- **MissingValue** — mappings with no value supplied (still empty in the vault).\n\nThe vault URL comes from the profile's `KeyVault:VaultUri` (override with `--vault`).\n\n## mapping\n\n```bash\nKeyVaultSync mapping --vault https://myvault.vault.azure.net --prefix lm-dev --profile ./keyvault.json --report ./mapping.json\n```\n\nLists the vault's `{prefix}-*` secrets and emits `{ suffix: configKey }` JSON (values\nare never read). With no `--profile`, `configKey` falls back to the suffix. Without\n`--report`, the JSON is written to stdout.\n\n## Prefix isolation\n\nBoth commands operate only on `{prefix}-*` names, so secrets belonging to other apps\nin the same vault are never read, written, or deleted.\n\n## Authentication\n\nUses `DefaultAzureCredential`: locally `az login`; in CI/CD a managed identity or\n`AZURE_*` environment variables. The identity needs the **Key Vault Secrets Officer**\nrole, which includes the list permission used by `mapping`.\n\n## Exit codes\n\n- `sync`: `0` success · `1` fatal (bad input, missing vault, auth failure) · `2` partial (≥1 invalid secret name).\n- `mapping`: `0` success · `1` fatal.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftunahanaliozturk%2Fkeyvaultsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftunahanaliozturk%2Fkeyvaultsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftunahanaliozturk%2Fkeyvaultsync/lists"}