{"id":18293067,"url":"https://github.com/kubesphere/tower","last_synced_at":"2026-04-06T04:31:25.680Z","repository":{"id":42002984,"uuid":"241372568","full_name":"kubesphere/tower","owner":"kubesphere","description":"Proxy for multiple Kubernetes cluster communication","archived":false,"fork":false,"pushed_at":"2025-06-26T09:37:06.000Z","size":26203,"stargazers_count":99,"open_issues_count":14,"forks_count":68,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-18T23:12:54.828Z","etag":null,"topics":[],"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/kubesphere.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-18T13:48:14.000Z","updated_at":"2025-09-11T10:50:51.000Z","dependencies_parsed_at":"2024-03-25T18:22:49.338Z","dependency_job_id":"369d6929-51e3-4028-9094-3794fdc439b4","html_url":"https://github.com/kubesphere/tower","commit_stats":{"total_commits":48,"total_committers":11,"mean_commits":4.363636363636363,"dds":0.4375,"last_synced_commit":"c458968720ae4759fdc6b2bc24d2686c7c89b6f5"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/kubesphere/tower","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Ftower","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Ftower/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Ftower/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Ftower/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubesphere","download_url":"https://codeload.github.com/kubesphere/tower/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Ftower/sbom","scorecard":{"id":572757,"data":{"date":"2025-08-11","repo":{"name":"github.com/kubesphere/tower","commit":"e471c6b5e673ca6ebde285721c05be18945d7205"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Maintained","score":4,"reason":"5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":8,"reason":"Found 15/17 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/docker.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/kubesphere/tower/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/kubesphere/tower/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/kubesphere/tower/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/kubesphere/tower/docker.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:2","Warn: containerImage not pinned by hash: Dockerfile:27: pin your Docker image by updating alpine:3.17.2 to alpine:3.17.2@sha256:ff6bdca1701f3a8a67e328815ff2346b0e4067d32ec36b7992c1fdc001dc8517","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T16:47:14.192Z","repository_id":42002984,"created_at":"2025-08-20T16:47:14.192Z","updated_at":"2025-08-20T16:47:14.192Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31383634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T23:20:52.058Z","status":"ssl_error","status_checked_at":"2026-04-03T23:20:51.675Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-11-05T14:21:46.745Z","updated_at":"2026-04-06T04:31:25.659Z","avatar_url":"https://github.com/kubesphere.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tower\n\nTower is a network tunnel used to proxy KubeSphere API requests to member clusters. Tower is built on top HTTP, secured via SSH. The main idea is stolen from Chisel(https://github.com/jpillora/chisel).\n\n# How does it work\n\n    Proxy  \u003c------\u003e  Agent |--\u003e ks-apiserver  \n                           |--\u003e kube-apiserver\n\nIn short, agents running in member cluster will connect proxy running in host cluster. After successfully handshaking, agents will establish a secured ssh connection with proxy, allowing traffic from host cluster to forward to local kubernetes apiserver and kubesphere apiserver.\n\n# How to build\nClone the repo and run make under tower. There will be two binaries generated under directory `bin/`\n```bash\n$ make\n$ ls bin/\nproxy agent\n```\n\n# How to use it\n* Install tower crd in host cluster\n```bash\n$ cd config/crd\n$ kustomize build | kubectl create -f -\ncustomresourcedefinition.apiextensions.k8s.io/clusters.cluster.kubesphere.io created\n```\n* Run proxy on host cluster, the publish-service-address needs to be a address accessible for all member clusters.\n```bash\n$ ./bin/proxy  --ca-cert ./certs/ca.crt --ca-key ./certs/ca.key --host 0.0.0.0 --port 8080 --publish-service-address 192.168.100.3 --kubeconfig ~/.kube/config\n\nI1108 09:57:50.145666       1 options.go:46] CA set to \"/ca.crt\".\nI1108 09:57:50.145795       1 options.go:47] CA key file set to \"/ca.key\".\nI1108 09:57:50.145804       1 options.go:48] Host set to 0.0.0.0\nI1108 09:57:50.145811       1 options.go:49] Agent port set to 8080.\nI1108 09:57:50.145823       1 options.go:50] Kubeconfig set to \"\".\nI1108 09:57:50.145842       1 options.go:51] Leader election set to false\nI1108 09:57:50.275180       1 proxy.go:234] Listening on 0.0.0.0:8080...\n```\n* Create a agent object in host cluster\n```bash\n$ cat agent.yaml    \napiVersion: cluster.kubesphere.io/v1alpha1\nkind: Cluster\nmetadata:\n  name: alpha\n  namespace: kubesphere-system\nspec:\n  connection:\n    type: proxy\n    token: \"\"\n  joinFederation: true\n$ kubectl -n kubesphere-system create -f agent.yaml\n```\n\n* Proxy server will generate token and update cluster object. Use following command to get the token.\n```\n$ kubectl get cluster alpha -o jsonpath='{.spec.connection.token}'\n6888951db2eef4323fd4f84d05f490be86af102f43e47c3c58e6a1ddc81cc253\n```\n\n* Run agent in member cluster with token get from previous step\n```bash\n$ ./bin/agent --kubeconfig ~/.kube/config --token 6888951db2eef4323fd4f84d05f490be86af102f43e47c3c58e6a1ddc81cc253 --name alpha --v 4\nI0325 10:25:40.729137       1 agent.go:210] Handshaking...\nI0325 10:25:40.748094       1 agent.go:126] fingerprint7b:fa:2d:64:08:95:4d:d4:74:18:3e:78:39:03:76:ce\nI0325 10:25:40.753106       1 agent.go:222] Sending config\nI0325 10:25:40.757505       1 agent.go:231] Connected.\n```\n\n* Now your member cluster is connected to host cluster, you can access member cluster kube-apiserver or ks-apiserver in host cluster\n```bash\n$ kubectl -n kubesphere-system get cluster alpha -o jsonpath='{.spec.connection.kubeconfig}' | base64 -d \u003e config_alpha\n$ kubectl --kubeconfig config_alpha get node \nNAME     STATUS   ROLES    AGE    VERSION\nmaster   Ready    master   2d3h   v1.17.3\nnode1    Ready    worker   2d3h   v1.17.3\nnode2    Ready    worker   2d3h   v1.17.3\nnode3    Ready    worker   2d3h   v1.17.3\n```\n\n* Use tower to make a member cluster kubeapi accessable to public\n  \nIf you want to make you member cluster kubeapi accessable to public, create a cluster resource as follows:\n\n```\napiVersion: cluster.kubesphere.io/v1alpha1\nkind: Cluster\nmetadata:\n  name: kind-test\n  namespace: kubesphere-system\n  annotations:\n    tower.kubesphere.io/external-lb-service-annoations: '{\"eip.porter.kubesphere.io/v1alpha2\":\"porter-bgp-eip\",\"lb.kubesphere.io/v1alpha1\":\"porter\",\"protocol.porter.kubesphere.io/v1alpha1\":\"bgp\"}'\nspec:\n  connection:\n    type: proxy\n    token: \"\"\n  joinFederation: true\n  externalKubeAPIEnabled: true\n```\n\nWith `externalKubeAPIEnabled=true` and `connection.type=proxy` tower will create the serivce with `LoadBlancer` type, content in annotation with key `tower.kubesphere.io/external-lb-service-annoations` will be applied to the service anntations as k-v, so that your can control how the `ccm` process the service.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubesphere%2Ftower","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubesphere%2Ftower","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubesphere%2Ftower/lists"}