{"id":26811500,"url":"https://github.com/trois-six/plugin-securelink","last_synced_at":"2025-07-21T13:35:02.900Z","repository":{"id":52378817,"uuid":"283741807","full_name":"trois-six/plugin-securelink","owner":"trois-six","description":"Secure link plugin for Traefik","archived":false,"fork":false,"pushed_at":"2020-10-29T13:15:08.000Z","size":120,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T16:48:32.614Z","etag":null,"topics":["traefik-plugin"],"latest_commit_sha":null,"homepage":"","language":"Go","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/trois-six.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-30T10:30:54.000Z","updated_at":"2022-12-27T16:41:55.000Z","dependencies_parsed_at":"2022-09-03T09:12:43.198Z","dependency_job_id":null,"html_url":"https://github.com/trois-six/plugin-securelink","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/trois-six/plugin-securelink","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trois-six%2Fplugin-securelink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trois-six%2Fplugin-securelink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trois-six%2Fplugin-securelink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trois-six%2Fplugin-securelink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trois-six","download_url":"https://codeload.github.com/trois-six/plugin-securelink/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trois-six%2Fplugin-securelink/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266312190,"owners_count":23909745,"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-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["traefik-plugin"],"created_at":"2025-03-30T01:38:55.629Z","updated_at":"2025-07-21T13:35:02.875Z","avatar_url":"https://github.com/trois-six.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Secure Link\n\nThis [Traefik](https://github.com/traefik/traefik) plugin is as middleware which checks the authenticity of requested links and protects resources from unauthorized access. Authenticity is verified by comparing the checksum value passed in a request with the value computed for the request, using the shared secret.\nThis middleware is inspired by [this](https://github.com/blake/secure-link-filter) WebAssembly filter.\nTraefik sends an HTTP `403 Forbidden` response when the hash doesn't match for protected paths.\n\n## How does it work?\n\nThis plugin has two modes: with queries and without. In both modes, you have to set a secret and \"protected paths\".\nThe secret is used to create a hash with the path of the request under protected path concatenated with the secret.\n\n### Without queries\n\nExample: Imagine that you would like to request http://localhost/video/foo/bar.mp4, your protected path is \"/video\", your secret is \"enigma\".\n* To Access to that resource, you will have to request instead http://localhost/video/[hash]/foo/bar.mp4.\n* ```shell\n  hash=$(echo -n \"/foo/bar.mp4enigma\" | md5sum | awk '{ print $1 }')\n  ```\n* In that example, we should request http://localhost/video/9304fce63530f73802183ef436740e58/foo/bar.mp4\n\n### With queries (query: true)\n\nExample: Imagine that you would like to request http://localhost/video/foo/bar.mp4, your protected path is \"/video\", your secret is \"enigma\".\n* To Access to that resource, you will have to request instead http://localhost/video/foo/bar.mp4?md5=[hash].\n* ```shell\n  hash=$(echo -n \"/foo/bar.mp4enigma\" | md5sum | awk '{ print $1 }')\n  ```\n* In that example, we should request http://localhost/video/foo/bar.mp4?md5=9304fce63530f73802183ef436740e58\n\nWith queries activated, you can also activate another feature: checkExpire.\nWhen this feature is activated, you have to add another query parameter to get your resource: expire.\nThe new url you will have to request, is, for example: http://localhost/video/foo/bar.mp4?md5=[hash]\u0026expire=1597153588.\n\nThis time, the hash is computed differently:\n```shell\nhash=$(echo -n \"${path}${expire}${secret}\" | md5sum | awk '{ print $1 }')\n```\nImagine that you want to expose this resource for 120s, expire will be:\n```shell\nexpire=$(($(date \"+%s\") + 120))\n```\nThis link will be available only for 120s.\n\n## Configuration\n\nTo configure this plugin you should add its configuration to the Traefik dynamic configuration as explained [here](https://docs.traefik.io/getting-started/configuration-overview/#the-dynamic-configuration).\nThe following snippet shows how to configure this plugin with the File provider in TOML and YAML: \n\n```toml\n# Protect /video/ and /playlist paths with a secret \"enigma\"\n[http.middlewares]\n  [http.middlewares.my-securelink.securelink]\n    secret = \"enigma\"\n    protectedPaths = [\"/video/\", \"/playlist\"]\n    query = false\n    checkExpire = false\n```\n\n```yaml\n# Protect /video/ and /playlist paths with a secret \"enigma\"\nhttp:\n  middlewares:\n    my-securelink:\n      plugin:\n        securelink:\n          secret: enigma\n          protectedPaths:\n            - /video/\n            - /playlist\n          query: false\n          checkExpire: false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrois-six%2Fplugin-securelink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrois-six%2Fplugin-securelink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrois-six%2Fplugin-securelink/lists"}