{"id":18073383,"url":"https://github.com/blakewilliams/sentinel","last_synced_at":"2026-02-23T18:09:35.200Z","repository":{"id":246885532,"uuid":"824226235","full_name":"BlakeWilliams/sentinel","owner":"BlakeWilliams","description":"proof-of-concept auth gateway","archived":false,"fork":false,"pushed_at":"2024-07-06T16:34:23.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-19T22:12:58.260Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlakeWilliams.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-07-04T16:17:29.000Z","updated_at":"2024-07-06T16:34:26.000Z","dependencies_parsed_at":"2024-07-05T19:00:12.311Z","dependency_job_id":"be42c5d9-e837-4742-a490-d70ce1b0ecea","html_url":"https://github.com/BlakeWilliams/sentinel","commit_stats":null,"previous_names":["blakewilliams/sentinel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BlakeWilliams/sentinel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlakeWilliams%2Fsentinel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlakeWilliams%2Fsentinel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlakeWilliams%2Fsentinel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlakeWilliams%2Fsentinel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlakeWilliams","download_url":"https://codeload.github.com/BlakeWilliams/sentinel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlakeWilliams%2Fsentinel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29750053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"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-10-31T10:06:41.638Z","updated_at":"2026-02-23T18:09:35.183Z","avatar_url":"https://github.com/BlakeWilliams.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sentinel APi Gateway\n\nSentinel is a basic proof-of-concept API gateway that attempts to:\n\n- Centralize opaque authentication through a single point of entry using JWTs\n- Route requests to the appropriate back-end service\n- Handle rate limiting requests through middleware\n- Be extensible to customize or extend the behavior of the gateway\n\n## Usage\n\nThere's some boilerplate required to get started for setting up the JWT type in\naddition the communication with the auth server. You also likely want to include\nand configure rate limiting middleware. Here's a basic (and rough) example of\nhow to get started:\n\n```go\n// Setup the type that will be encoded into a JWT and passed to subsequent back-ends\ntype AuthData struct {\n\tIdentifier string\n\tEmail string\n\tjwt.RegisteredClaims\n}\n\n// Implement the IdentifierValue method for the IdentifiableClaims interface that\n// will be used to identify the user for add-ons like rate limiting,\nfunc (a *AuthData) IdentifierValue() {\n\treturn Identifier\n}\n\ntype MyAuthenticator struct {\n\t// ... your fields here\n}\n\nfunc (a *MyAuthenticator) Authenticate(w http.ResponseWriter, r *http.Request) (AuthData, error) {\n\tdata, err := MyAuthenticator.GetForCookie(r.Cookie(\"my-cookie\"))\n\tif err != nil {\n\t\treturn AuthData{}, err\n\t}\n\n\treturn AuthData{\n\t\tIdentifier: data.Identifier,\n\t\tEmail: data.Email,\n\t\tRegisteredClaims: jwt.RegisteredClaims{\n\t\t\tIssuer: \"my-auth-server\",\n\t\t\tExpiration: jwt.NewNumericDate(time.Now().Add(time.Hour)),\n\t\t\tIssuedAt: jwt.NewNumericDate(time.Now()),\n\t\t},\n\t}, nil\n}\n\n\ts := New[AuthData](\":8080\", mySigningKey, WithAuthenticator(MyAuthenticator{}))\n\n\ts.PostAuth(ratelimit.RateLimiter{\n\t\tRedis: myRedis,\n\t\tMaxRequests: 100,\n\t\tDuration: time.Minute*10,\n\t\tLogger: myLogger\n\t}.Middleware)\n\n\ts.AddRoute(\"*\", \"http://some-service:8080\")\n\ts.AddRoute(\"/foo/bar\", \"http://another-service:2047\")\n\n\ts.ListenAndServe(\":8080\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakewilliams%2Fsentinel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblakewilliams%2Fsentinel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakewilliams%2Fsentinel/lists"}