{"id":15285879,"url":"https://github.com/delineaxpm/dsv-gitlab","last_synced_at":"2025-07-06T08:34:56.377Z","repository":{"id":62041168,"uuid":"530858374","full_name":"DelineaXPM/dsv-gitlab","owner":"DelineaXPM","description":"Plugin for Gitlab integration with DSV.","archived":false,"fork":false,"pushed_at":"2025-03-13T16:56:31.000Z","size":4364,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-19T18:30:52.609Z","etag":null,"topics":["dsv","gitlab"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DelineaXPM.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-30T22:49:27.000Z","updated_at":"2025-03-13T16:56:34.000Z","dependencies_parsed_at":"2023-12-22T05:23:58.507Z","dependency_job_id":"280ba37e-298a-4436-b9b7-85d9be657910","html_url":"https://github.com/DelineaXPM/dsv-gitlab","commit_stats":{"total_commits":106,"total_committers":7,"mean_commits":"15.142857142857142","dds":0.2735849056603774,"last_synced_commit":"cbe25b5b2c4af170fe2faeb766b970d14f1b55cd"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelineaXPM%2Fdsv-gitlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelineaXPM%2Fdsv-gitlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelineaXPM%2Fdsv-gitlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelineaXPM%2Fdsv-gitlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DelineaXPM","download_url":"https://codeload.github.com/DelineaXPM/dsv-gitlab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252811768,"owners_count":21808008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dsv","gitlab"],"created_at":"2024-09-30T15:08:03.555Z","updated_at":"2025-05-07T04:25:17.764Z","avatar_url":"https://github.com/DelineaXPM.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Delinea DevOps Secrets Vault GitLab Integration\n\n[![codecov](https://codecov.io/gh/delineaxpm/dsv-gitlab/branch/main/graph/badge.svg?token=FPHYYO5ZF2)](https://codecov.io/gh/delineaxpm/dsv-gitlab)\n\nDelinea DevOps Secrets Vault (DSV) CI plugin allows you to access and reference your Secrets data available for use in GitLab Jobs.\n\n## Getting Started\n\n- [Developer](DEVELOPER.md): instructions on running tests, local tooling, and other resources.\n- [DSV Documentation](https://docs.delinea.com/dsv/current?ref=githubrepo)\n\n## Using With Gitlab\n\nReview the file: [.gitlab-ci.yml](examples/.gitlab-ci.yml)\n\nTo test this out, you'll have to create variables in GitLab under: `https://gitlab.com/{org}/{project}/-/settings/ci_cd`.\n\n## Prerequisites\n\nThis plugin uses authentication based on Client Credentials, i.e. via Client ID and Client Secret.\n\n```shell\ndsvprofile=\n\nrolename=\"gitlab-dsv-gitlab-tests\"\nsecretpath=\"ci:tests:dsv-gitlab\"\nsecretpathclient=\"clients:${secretpath}\"\n\ndesc=\"a secret for testing operation of secrets against dsv-gitlab\"\nclientcredfile=\".cache/${rolename}.json\"\nclientcredname=\"${rolename}\"\n\ndsv role create --name \"${rolename}\" --profile $dsvprofile\n\n# Option 1: Less Optimal - Save Credential to local json for testing\n# dsv client create --role \"${rolename}\" --out \"file:${clientcredfile}\"\n\n# Option 2: 🔒 MOST SECURE\n# Create credential info for dsv, and set as variable.\n# Create an org secret instead if you want to share this credential in many repos.\n\n# compress to a single line\nclientcred=$(dsv client create --role \"${rolename}\" --plain | jq -c)\n\n# configure the credentials in gitlab\necho 'DSV_SERVER in GitLab variables, example: mytenant.secretsvaultcloud.com'\necho \"Save DSV_CLIENT_ID in GitLab variables: $(echo \"${clientcred}\" | jq '.clientId' -r)\"\necho \"Save DSV_CLIENT_SECRET in GitLab variables: $(echo \"${clientcred}\" | jq '.clientSecret' -r )\"\n```\n\nFor further setup, here's how you could extend that script block above with also creating a secret and the policy to read just this secret.\n\n```shell\n# Create a secret\nsecretkey=\"secret-01\"\nsecretvalue='{\"value1\":\"taco\",\"value2\":\"burrito\"}'\ndsv secret create \\\n  --path \"secrets:${secretpath}:${secretkey}\" \\\n  --data \"${secretvalue}\" \\\n  --desc \"${desc}\"\n\n# Create a policy to allow role \"$rolename\" to read secrets under \"ci:tests:integration-configs/dsv-gitlab\":\ndsv policy create \\\n  --path \"secrets:${secretpath}\" \\\n  --actions 'read' \\\n  --effect 'allow' \\\n  --subjects \"roles:$rolename\" \\\n  --desc \"${desc}\" \\\n  --resources \"secrets:${secretpath}:\u003c.*\u003e\"\n```\n\n## Usage\n\nSee [integration.yml](examples/.gitlab-ci.yml) for an example of how to use this to retrieve secrets and use outputs on other tasks.\n\n### Retrieve 2 Values from Same Secret\n\nThe json expects an array, so just add a new line.\n\n```yaml\nretrieve: |\n  [\n   {\"secretPath\": \"ci:tests:dsv-github-action:secret-01\", \"secretKey\": \"value1\", \"outputVariable\": \"RETURN_VALUE_1\"},\n   {\"secretPath\": \"ci:tests:dsv-github-action:secret-01\", \"secretKey\": \"value2\", \"outputVariable\": \"RETURN_VALUE_2\"}\n  ]\n```\n\n### Retrieve 2 Values from Different Secrets\n\n\u003e Note: Make sure your generated client credentials are associated a policy that has rights to read the different secrets.\n\n```yaml\nretrieve: |\n  [\n   {\"secretPath\": \"ci:tests:dsv-github-action:secret-01\", \"secretKey\": \"value1\", \"outputVariable\": \"RETURN_VALUE_1\"},\n   {\"secretPath\": \"ci:tests:dsv-github-action:secret-02\", \"secretKey\": \"value1\", \"outputVariable\": \"RETURN_VALUE_2\"}\n  ]\n```\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/mariiatuzovska\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/41679258?v=4?s=100\" width=\"100px;\" alt=\"Mariia\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMariia\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/DelineaXPM/dsv-gitlab/commits?author=mariiatuzovska\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.sheldonhull.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/3526320?v=4?s=100\" width=\"100px;\" alt=\"sheldonhull\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003esheldonhull\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/DelineaXPM/dsv-gitlab/commits?author=sheldonhull\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/andrii-zakurenyi\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/85106843?v=4?s=100\" width=\"100px;\" alt=\"andrii-zakurenyi\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eandrii-zakurenyi\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/DelineaXPM/dsv-gitlab/commits?author=andrii-zakurenyi\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/gg-delinea\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/99193946?v=4?s=100\" width=\"100px;\" alt=\"gg-delinea\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003egg-delinea\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#userTesting-gg-delinea\" title=\"User Testing\"\u003e📓\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n  \u003ctfoot\u003e\n\n  \u003c/tfoot\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelineaxpm%2Fdsv-gitlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelineaxpm%2Fdsv-gitlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelineaxpm%2Fdsv-gitlab/lists"}