{"id":22758803,"url":"https://github.com/clusterlabs/hawk-apiserver","last_synced_at":"2025-10-04T06:09:10.084Z","repository":{"id":19541092,"uuid":"87287797","full_name":"ClusterLabs/hawk-apiserver","owner":"ClusterLabs","description":"Next generation HA cluster interface","archived":false,"fork":false,"pushed_at":"2025-08-27T12:24:39.000Z","size":1307,"stargazers_count":12,"open_issues_count":5,"forks_count":11,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-08-27T21:34:46.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClusterLabs.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":"2017-04-05T08:51:43.000Z","updated_at":"2025-08-27T12:24:43.000Z","dependencies_parsed_at":"2024-06-20T08:20:57.385Z","dependency_job_id":"15a7b54d-5477-4f11-8236-f59eb6b6e5d1","html_url":"https://github.com/ClusterLabs/hawk-apiserver","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ClusterLabs/hawk-apiserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2Fhawk-apiserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2Fhawk-apiserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2Fhawk-apiserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2Fhawk-apiserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClusterLabs","download_url":"https://codeload.github.com/ClusterLabs/hawk-apiserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2Fhawk-apiserver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278272782,"owners_count":25959642,"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-10-04T02:00:05.491Z","response_time":63,"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-11T08:15:57.219Z","updated_at":"2025-10-04T06:09:10.058Z","avatar_url":"https://github.com/ClusterLabs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hawk API Server\n\n[![GoDoc](https://godoc.org/github.com/ClusterLabs/hawk-apiserver?status.svg)](https://godoc.org/github.com/ClusterLabs/hawk-apiserver)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ClusterLabs/hawk-apiserver)](https://goreportcard.com/report/github.com/ClusterLabs/hawk-apiserver)\n\nHTTPS API server / minimalist web proxy for Hawk.\n\n# Table of content\n\n- [Rationale](#Rationale)\n- [Devel](#devel)\n- [Usage](#usage)\n- [Features](#features)\n\n# Rationale\nThis project currently provides a minimalistic web server which\nhandles SSL certificate termination, proxying and static file serving\nfor [HAWK](https://github.com/ClusterLabs/hawk)\n\nThe **primary goal** for this project is to provide the minimal web server\nneeded by Hawk while consuming as few system resources as\npossible. Second, it provides the `/monitor` API endpoint which\nhandles long-lived connections from the frontend to enable instant\nupdates of the interface on cluster events, leveraged by [go-pacemaker](https://github.com/ClusterLabs/go-pacemaker)\n\nThe API server is still under its basic development phase.\n\n# Devel\n\n### Dependencies:\n\n- following pkgs: `libqb-devel libpacemaker-devel`.\n\n* Use `make` to interact with the standards dev lifecycle.\n\nGenerating an SSL certificates:\n\n``` bash\nSSLGEN_KEY=hawk.key SSLGEN_CERT=hawk.pem ./tools/generate-ssl-cert\n```\n\n# Usage:\n\nThe `hawk-api-server` is used currently mainly for hawk usage purposes, and in future as API-server.\n\n## Configuration\n\nPass `-config \u003cconfig\u003e` as an argument to give the server a\nconfiguration file. The format is a json dictionary with key / value\npairs.\n\nThe available configuration values are described below. If a value is\nset both in the configuration file and in a command line argument, the\ncommand line argument takes precedence.\n\n* `key`: Path to SSL key. (argument: -key)\n\n* `cert`: Path to SSL certificate. (argument: -cert)\n\n* `port`: TCP port to listen to for connections. (argument: -port)\n\n* `route`: List of json maps that configure the routing table.\n\nThe route format is very limited and adapted to serving hawk, but\nenable reconfiguration of the exact paths to certificates, files and\nsockets.\n\nExample:\n\n``` json\n{\n  \"key\": \"/etc/hawk/hawk.key\",\n  \"cert\": \"/etc/hawk/hawk.pem\",\n  \"port\": 7630,\n  \"route\": [\n    {\n      \"handler\": \"monitor\",\n      \"path\": \"/monitor\"\n    },\n    {\n      \"handler\": \"file\",\n      \"path\": \"/\",\n      \"target\": \"/usr/share/hawk/public\"\n    },\n    {\n      \"handler\": \"proxy\",\n      \"path\": \"/\",\n      \"target\": \"unix:///var/run/hawk/app.sock\"\n    }\n  ]\n}\n```\n# Features:\n\n- HTTPS server\n- reverse proxy\n- `/monitor`  API endpoint which handles long-lived connections from the frontend to enable instant\n              updates of the interface on cluster events.\n\n\n### Authentication\n\n* Basic auth: Get user:password from HTTP headers. Map to system\n  user. Verify that system user is a member of the haclient group.\n\n* Cookie auth (cookie created by hawk rails app): If a valid cookie is\n  found in the HTTP headers, this is accepted as authentication.\n  Session cookie is stored in attrd.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclusterlabs%2Fhawk-apiserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclusterlabs%2Fhawk-apiserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclusterlabs%2Fhawk-apiserver/lists"}