{"id":23531708,"url":"https://github.com/ryanprior/conjur-secret-file","last_synced_at":"2025-09-02T04:09:26.442Z","repository":{"id":77898374,"uuid":"279179247","full_name":"ryanprior/conjur-secret-file","owner":"ryanprior","description":"Demo of storing a secret file using Conjur and tar","archived":false,"fork":false,"pushed_at":"2020-07-13T01:25:54.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-28T09:15:51.919Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanprior.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-13T01:22:36.000Z","updated_at":"2021-03-28T11:47:02.000Z","dependencies_parsed_at":"2023-03-04T09:30:30.455Z","dependency_job_id":null,"html_url":"https://github.com/ryanprior/conjur-secret-file","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryanprior/conjur-secret-file","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanprior%2Fconjur-secret-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanprior%2Fconjur-secret-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanprior%2Fconjur-secret-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanprior%2Fconjur-secret-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanprior","download_url":"https://codeload.github.com/ryanprior/conjur-secret-file/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanprior%2Fconjur-secret-file/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273228131,"owners_count":25067731,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"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":[],"created_at":"2024-12-25T22:20:08.616Z","updated_at":"2025-09-02T04:09:26.420Z","avatar_url":"https://github.com/ryanprior.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Using Conjur \u0026 tar to store a secret file\n\nThis is based on the Conjur quick-start, so to get started you follow the [instructions](https://www.conjur.org/get-started/quick-start/oss-environment)\n\nThen: \n1. load `policy/file-policy.yml` (as admin)\n2. run `docker-compose exec client bash` to launch client shell\n3. (in client shell) run `conjur variable values add secret-files/secret-script \u003c/data/secret-file.tar` to load the secret data\n4. exit the client shell\n5. (in host shell) run `docker-compose exec client conjur variable value secret-files/secret-script \u003eround-trip.tar`\n\n## Expected result\n\nHere's where this repo, intended as a demonstration, turns into an issue report. I'd expect to get an identical tar file back.\n\n## Actual result \n\nInstead, `diff secret-file.tar round-trip.tar` reveals that they are different, and hexdumping them shows there's some extra bytes in round-trip.tar which are screwing things up. I don't know where those bytes are coming from, so that's where I got lost.\n\n```sh-session\nryan@swallowtail:~/dev/conjur-secret-file$ xxd secret-file.tar \u003ef.hex\nryan@swallowtail:~/dev/conjur-secret-file$ xxd round-trip.tar \u003et.hex\nryan@swallowtail:~/dev/conjur-secret-file$ diff f.hex t.hex\n34,39c34,39\n\u003c 00000210: 6173 680a 0a73 6574 202d 6575 0a0a 7365  ash..set -eu..se\n\u003c 00000220: 6372 6574 5f64 6174 613d 2263 6f72 7265  cret_data=\"corre\n\u003c 00000230: 6374 2068 6f72 7365 2062 6174 7465 7279  ct horse battery\n\u003c 00000240: 2073 7461 706c 6522 0a65 6368 6f20 2253   staple\".echo \"S\n\u003c 00000250: 6563 7265 7420 6461 7461 3a20 2473 6563  ecret data: $sec\n\u003c 00000260: 7265 745f 6461 7461 220a 0000 0000 0000  ret_data\".......\n---\n\u003e 00000210: 6173 680d 0a0d 0a73 6574 202d 6575 0d0a  ash....set -eu..\n\u003e 00000220: 0d0a 7365 6372 6574 5f64 6174 613d 2263  ..secret_data=\"c\n\u003e 00000230: 6f72 7265 6374 2068 6f72 7365 2062 6174  orrect horse bat\n\u003e 00000240: 7465 7279 2073 7461 706c 6522 0d0a 6563  tery staple\"..ec\n\u003e 00000250: 686f 2022 5365 6372 6574 2064 6174 613a  ho \"Secret data:\n\u003e 00000260: 2024 7365 6372 6574 5f64 6174 6122 0d0a   $secret_data\"..\n640a641\n\u003e 00002800: 0000 0000 0000                           ......\n```\n\n### Note\n\nI created `secret-file.tar` by running `tar zf secret-file.tar secret-file`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanprior%2Fconjur-secret-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanprior%2Fconjur-secret-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanprior%2Fconjur-secret-file/lists"}