{"id":49341507,"url":"https://github.com/redborder/rb-register","last_synced_at":"2026-04-27T04:04:18.416Z","repository":{"id":11526123,"uuid":"61140140","full_name":"redBorder/rb-register","owner":"redBorder","description":"Application written in Go that allows sensors to be registered by the redBorder Live Cloud","archived":false,"fork":false,"pushed_at":"2026-02-26T14:48:05.000Z","size":153,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-02-26T20:31:28.155Z","etag":null,"topics":["autodelivery","redborder-ng"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redBorder.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-06-14T16:53:12.000Z","updated_at":"2026-02-26T14:45:09.000Z","dependencies_parsed_at":"2023-11-08T12:33:56.224Z","dependency_job_id":"b2828f2f-4056-442d-aee2-1ef0e4cc7c65","html_url":"https://github.com/redBorder/rb-register","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/redBorder/rb-register","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redBorder%2Frb-register","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redBorder%2Frb-register/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redBorder%2Frb-register/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redBorder%2Frb-register/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redBorder","download_url":"https://codeload.github.com/redBorder/rb-register/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redBorder%2Frb-register/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32321945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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":["autodelivery","redborder-ng"],"created_at":"2026-04-27T04:04:17.608Z","updated_at":"2026-04-27T04:04:18.396Z","avatar_url":"https://github.com/redBorder.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/redBorder/rb-register.svg?branch=master)](https://travis-ci.org/redBorder/rb-register)\n[![Coverage Status](https://coveralls.io/repos/github/redBorder/rb-register/badge.svg?branch=master)](https://coveralls.io/github/redBorder/rb-register?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/redBorder/rb-register)](https://goreportcard.com/report/github.com/redBorder/rb-register)\n\n# rb-register\n\nApplication written in GO that allow sensors to be registered by the redBorder\nLive Cloud.\n\n## Installing\n\nTo install this application ensure you have the `GOPATH` environment variable\nset and **[glide](https://glide.sh/)** installed.\n\n```bash\ncurl https://glide.sh/get | sh\n```\n\nAnd then:\n\n1. Clone this repo and cd to the project\n\n    ```bash\n    git clone https://github.com/redBorder/rb-register.git \u0026\u0026 cd rb-register\n    ```\n2. Install dependencies and compile\n\n    ```bash\n    make\n    ```\n3. Install on desired directory\n\n    ```bash\n    prefix=/opt/rb make install\n    ```\n\n## Usage\n\nUsage of **rb-register** and default values:\n\n```\n-cert string\n  \tCertificate file (default \"/opt/rb/etc/chef/client.pem\")\n-daemon\n  \tStart in daemon mode\n-db string\n  \tFile to persist the state\n-debug\n  \tShow debug info\n-hash string\n  \tHash to use in the request (default \"00000000-0000-0000-0000-000000000000\")\n-log string\n  \tLog file (default \"log\")\n-no-check-certificate\n  \tDont check if the certificate is valid\n-nodename string\n  \tFile to store nodename\n-pid string\n  \tFile containing PID (default \"pid\")\n-script string\n  \tScript to call after the certificate has been obtained (default \"/opt/rb/bin/rb_register_finish.sh\")\n-script-log string\n  \tLog to save the result of the script called (default \"/var/log/rb-register/finish.log\")\n-sleep int\n  \tTime between requests in seconds (default 300)\n-type string\n  \tType of the registering device\n-url string\n  \tProtocol and hostname to connect (default \"http://localhost\")\n-version\n  \tDisplay version\n```\n\n## Description\n\nThe status of the sensor can be:\n\n- **Not registered**: The sensor doesn't appear at the cloud and it has never\ncontacted with it. This is the initial status for this sensor.\n- **Registered**: The sensor is registered at the cloud but nobody claimed it.\n- **Claimed**: The sensor registered and claimed by the client but need final\nstep (download certificate).\n\n### Register process\n\nThe sensor will start at \"Not registered\" status so it will try to contact\nto given url (managed by the same process than `live.redborder.com` now). The\nsensor will generate an http post message sending this data:\n\n#### Register request\n\n```javascript\n{\n    \"order\":  \"register\",\n    \"cpu\":    /* Number of CPUs   */,\n    \"memory\": /* Memory available */,\n    \"type\":   /* Type of sensor   */,\n    \"hash\":   /* HASH             */\n}\n```\n\n#### Register response\n\nIf not registered, the cloud generates a **new** `UUID` and returns it in a\nmessage. If a database is provided then the application will persist the UUID\nso its not necessary to send the `register` request everytime the application\nstarts.\n\n  ```javascript\n  {\n    \"status\": \"registered\",\n    \"mac\":  /* HASH */,\n    \"uuid\": /* UUID */\n  }\n  ```\n\n### Verification process\n\nAfter the sensor receives the \"registered\" status, it will send `verify`\nrequests instead of `register` request. A verify request expects a `claimed`\nresponse along with a certificate and node name.\n\n#### Verify request\n\n```javascript\n{\n    \"order\": \"verify\",\n    \"mac\":   /* MAC address */,\n    \"uuid\":  /* UUID        */\n}\n```\n\n#### Verify response\n\nWhen the sensor sends a \"verify\" request expects a certificate, but if the sensor hasn't been claimed the certificate doesn't exists yet.\n\n1. If the sensor hasn't been claimed and there isn't a certificate, the response should be:\n\n```javascript\n{\n    \"status\": \"registered\"\n}\n```\n\n2. If the sensor has been claimed and there is a certificate, the response should be:\n\n```javascript\n{\n    \"status\":   \"claimed\",\n    \"cert\":     /* CERTIFICATE          */,\n    \"nodename\": /* The name of the node */\n}\n```\n\n### Done status\n\nWhen a \"claimed\" status is received, the certificate and the node name are saved\non disk and the application will execute a command before it halts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredborder%2Frb-register","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredborder%2Frb-register","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredborder%2Frb-register/lists"}