{"id":38810387,"url":"https://github.com/mjtrangoni/oauth2-proxy-nexus3","last_synced_at":"2026-01-17T12:54:45.211Z","repository":{"id":175582142,"uuid":"654026073","full_name":"mjtrangoni/oauth2-proxy-nexus3","owner":"mjtrangoni","description":"Glue between oauth2-proxy, some Auth provider and Sonatype Nexus 3.","archived":false,"fork":false,"pushed_at":"2023-06-19T16:13:48.000Z","size":247,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2023-06-19T18:06:18.042Z","etag":null,"topics":["gitlab","keycloak","nexus","nexus-repository","nexus-repository-manager","nexus3","oauth2","oauth2-proxy"],"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/mjtrangoni.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}},"created_at":"2023-06-15T08:32:59.000Z","updated_at":"2024-04-15T08:02:17.460Z","dependencies_parsed_at":null,"dependency_job_id":"be8ed3a6-bdd6-4569-aeff-d2ea6ce06457","html_url":"https://github.com/mjtrangoni/oauth2-proxy-nexus3","commit_stats":null,"previous_names":["mjtrangoni/oauth2-proxy-nexus3"],"tags_count":2,"template":null,"template_full_name":null,"purl":"pkg:github/mjtrangoni/oauth2-proxy-nexus3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjtrangoni%2Foauth2-proxy-nexus3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjtrangoni%2Foauth2-proxy-nexus3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjtrangoni%2Foauth2-proxy-nexus3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjtrangoni%2Foauth2-proxy-nexus3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mjtrangoni","download_url":"https://codeload.github.com/mjtrangoni/oauth2-proxy-nexus3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjtrangoni%2Foauth2-proxy-nexus3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["gitlab","keycloak","nexus","nexus-repository","nexus-repository-manager","nexus3","oauth2","oauth2-proxy"],"created_at":"2026-01-17T12:54:44.482Z","updated_at":"2026-01-17T12:54:45.181Z","avatar_url":"https://github.com/mjtrangoni.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oauth2-proxy-nexus3\n\n![CI](https://github.com/mjtrangoni/oauth2-proxy-nexus3/workflows/CI/badge.svg)\n![golangci-lint](https://github.com/mjtrangoni/oauth2-proxy-nexus3/workflows/golangci-lint/badge.svg)\n\nThis service is designed to operate as a proxy between [oauth2-proxy](https://github.com/oauth2-proxy/oauth2-proxy),\nan Auth provider (AP), which is the one configured for *oauth2-proxy*, and Sonatype Nexus 3.\nIt was forked from [oauth2-proxy-nexus3](https://github.com/le-garff-yoann/oauth2-proxy-nexus3), updated, and adapted to work\nwith a generic provider.\n\n## Typical setup\n\n```\n********** 1↔↔ ********* 1↔↔ **************** 5↔↔ *********************** 5↔↔ ***********\n*        * 2↔↔ *       * 3↔↔ *              *     * oauth2-proxy-nexus3 *     * Nexus 3 *\n* Client * 3↔↔ * Nginx * 4↔↔ * oauth2-proxy *     ***********************     ***********\n*        * 4↔↔ *       * 5↔↔ *              *     5\n********** 5↔↔ *********     ****************     ↕\n                       2     3                    ↕\n                       ↕     ↕                    ↕\n                       ↔↔↔↔↔ ******************** ↔\n                             * AP (e.g. OICD Generic,*\n                             *          GitLab) *\n                             ********************\n```\n\n1. Sign in and redirect to the AP.\n2. Login and authorize the application.\n3. Ask for a token.\n4. Follow the callback to *oauth2-proxy* and finalize the OAuth flow.\n5. *oauth2-proxy* verify and authorize each request to *oauth2-proxy-nexus3*. The OAuth access token if send through a header to *oauth2-proxy-nexus3* by *oauth2-proxy* and is used to keep in sync the Nexus 3 userbase with the AP (which is the OIDC too).\n\n## Container image\n\nBuilt images are hosted at ghcr.io, and quay.io.\n\n```\n$ docker pull ghcr.io/mjtrangoni/oauth2-proxy-nexus3\n$ docker pull quay.io/mjtrangoni/oauth2-proxy-nexus3\n```\n\n## Configuration\n\n| ENV | Mandatory? | Default value | Description |\n|-|-|-|-|\n| `O2PN3_LISTEN_ON` | ☓ | 0.0.0.0:8080 | The [IP]:PORT on which the HTTP server will listen. |\n| `O2PN3_LOG_LEVEL` | ☓ | info | Set Application log level. |\n| `O2PN3_SSL_INSECURE_SKIP_VERIFY` | ☓ | false | Skip SSL verifications if set to `true`. |\n| `O2PN3_AP` | ☓ | oidc_generic | The name of the Auth Provider to be used. (oicd_generic, gitlab) |\n| `O2PN3_AP_URL` | ✓ | | The AP URL on which OAuth operations will be performed. |\n| `O2PN3_AP_ACCESS_TOKEN_HEADER` | ☓ | X-Forwarded-Access-Token | The name of the HTTP header on which the AP OAuth *access_token* will be provided to this service. |\n| `O2PN3_OAUTH2_PROXY_COOKIE_NAME` | x | `_oauth2_proxy` | The name of the cookie that the *oauth_proxy* creates. Should be changed to use a cookie prefix if --cookie-secure is set. |\n| `O2PN3_NEXUS3_URL` | ✓ | | The Nexus 3 URL on which sync and reverse-proxying will be performed. |\n| `O2PN3_NEXUS3_ADMIN_USER` | ✓ | | A Nexus 3 **admin** user. |\n| `O2PN3_NEXUS3_ADMIN_PASSWORD` | ✓ | | A Nexus 3 **admin** password. |\n| `O2PN3_NEXUS3_RUT_HEADER` | ☓ | X-Forwarded-User | The name of the HTTP header used by the Rut Realm/capability (Nexus 3) for the authentication. |\n| `O2PN3_REDIS_CONNECTION_URL` | ☓ | localhost:6379 | The tcp connection to the redis instance. |\n| `O2PN3_REDIS_PASSWORD` | ☓ | \"\" | The password of the redis instance. Default is empty or no password. |\n| `O2PN3_REDIS_TTL_HOURS` | ☓ | 168 | The number of hours until the *oauth2-proxy* session cookie expire. |\n\n### Prerequisites\n\n#### oauth2-proxy\n\nThe `-pass-access-token` flag or `OAUTH2_PROXY_PASS_ACCESS_TOKEN` environment variable must be set to `true`.\n\n#### Nexus 3\n\nThe Rut Realm/capability must be enabled and configured the use the same HTTP header as configured in via `$O2PN3_NEXUS3_RUT_HEADER`.\n\n#### Redis\n\nA redis instance needs to be reachable to store the *oauth2-proxy* session cookie.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjtrangoni%2Foauth2-proxy-nexus3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmjtrangoni%2Foauth2-proxy-nexus3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjtrangoni%2Foauth2-proxy-nexus3/lists"}