{"id":19097406,"url":"https://github.com/boxyhq/jackson-cerbos","last_synced_at":"2025-08-01T08:36:02.905Z","repository":{"id":103340237,"uuid":"598944169","full_name":"boxyhq/jackson-cerbos","owner":"boxyhq","description":"This is an example application that demonstrates how to use Cerbos with SAML Jackson","archived":false,"fork":false,"pushed_at":"2025-01-28T09:56:57.000Z","size":152,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-19T04:41:23.919Z","etag":null,"topics":["access-control","authorization","cerbos","policy","saml-authentication","security"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/boxyhq.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":"2023-02-08T05:46:42.000Z","updated_at":"2025-04-12T14:58:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"12ca2d34-19de-42cb-ab3e-c0ce7d8a9d5e","html_url":"https://github.com/boxyhq/jackson-cerbos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxyhq%2Fjackson-cerbos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxyhq%2Fjackson-cerbos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxyhq%2Fjackson-cerbos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxyhq%2Fjackson-cerbos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boxyhq","download_url":"https://codeload.github.com/boxyhq/jackson-cerbos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251722793,"owners_count":21633016,"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","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":["access-control","authorization","cerbos","policy","saml-authentication","security"],"created_at":"2024-11-09T03:40:27.320Z","updated_at":"2025-04-30T14:40:46.645Z","avatar_url":"https://github.com/boxyhq.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js + Enterprise SSO + Cerbos Example App\n\nThis is an example application that demonstrates how to use [Cerbos](https://cerbos.dev) with [SAML Jackson](https://boxyhq.com/docs/jackson/overview)\n\n## Resources\n\n[Blog tutorial](https://boxyhq.com/blog/boxyhq-cerbos-merging-sso-and-authorization)\n\n## Run the Example App\n\nFollow the steps below to run the example app.\n\n### Clone the repository\n\n```bash\ngit clone https://github.com/boxyhq/jackson-cerbos\n```\n\nThen `cd` into the project directory\n\n```bash\ncd jackson-cerbos\n```\n\n### Install dependencies\n\n```bash\nnpm install\n```\n\n### Run SAML Jackson and Cerbos Instances\n\nThis example comes with a `docker-compose` file that you can use to run the SAML Jackson and Cerbos instances locally. See the `docker-compose.yml` file for more details.\n\nTo start the servers, run the following command:\n\n```bash\ndocker-compose up --build\n```\n\nOR\n\n```bash\nsh ./start.sh\n```\n\nThis will start the SAML Jackson server on port `5225` and the Cerbos gRPC server on port `3593`.\n\nThe Jackson endpoint is available at `http://localhost:5225`.\n\nThe Cerbos endpoint is available at `http://localhost:3593`.\n\nTo use a different Cerbos endpoint, update the file `/lib/cerbos.ts` with the new endpoint.\n\n```javascript\nimport { GRPC } from \"@cerbos/grpc\";\n\nexport const cerbos = new GRPC(\"cerbos-instance-endpoint.app\", {\n  tls: false,\n});\n```\n\n## Start the Example App\n\nTo start the Next.js app, run the following command:\n\n```bash\nnpm run dev\n```\n\nThis will start the Next.js app on port `3000`. The app is available at `http://localhost:3000`.\n\n## How to test the Example App\n\nFollow the steps below to test the example app.\n\n### Add SAML Connection\n\nThe first step is to add a SAML connection to the app. To do this, click the menu `SAML Connection` from the top navigation bar.\n\nIn real world applications, the SAML connection is typically configured by the IT team and this page should be accessible only by the users with the appropriate access in the organization.\n\nYou can use any identity provider (IdP) that supports SAML 2.0. For this example, we will use [Okta](https://www.okta.com/).\n\nPaste the `XML Metadata` and click `Create SAML Connection` button.\n\n### Sign in\n\nAfter the SAML connection is created, click the `Sign in` button from the top navigation bar.\n\nEnter the work email you have configured in the SAML app and click the `Continue with SAML SSO` button.\n\nAfter the SAML authentication is successful, you will be redirected to the home page.\n\n### Home\n\nYou'll see the user profile of the authenticated user on the home page.\n\nIn addition to the user profile, you'll also see the list of policies that the user has access to. These are the policies that the user has access to based on the roles assigned to the user on the SAML app.\n\nSee `/api/resources.ts` for more details about how the policies are fetched from Cerbos.\n\n## Tech Stack\n\n- [SAML Jackson](https://boxyhq.com/docs/jackson/overview)\n- [Cerbos](https://cerbos.dev)\n- [Next.js](https://nextjs.org)\n- [Tailwind CSS](https://tailwindcss.com)\n\n## Learn More\n\nTo learn more about SAML Jackson and Cerbos, take a look at the following resources:\n\n- [BoxyHQ Website](https://boxyhq.com)\n- [Cerbos Website](https://cerbos.dev)\n- [SAML Jackson Documentation](https://boxyhq.com/docs/jackson/overview)\n- [Cerbos Documentation](https://docs.cerbos.dev/cerbos/latest/index.html)\n\n## Contributing\n\nThanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody and are appreciated.\n\nPlease try to create bug reports that are:\n\n- _Reproducible._ Include steps to reproduce the problem.\n- _Specific._ Include as much detail as possible: which version, what environment, etc.\n- _Unique._ Do not duplicate existing opened issues.\n- _Scoped to a Single Bug._ One bug per report.\n\n## Community\n\n- [Discord](https://discord.gg/uyb7pYt4Pa) (For live discussion with the Open-Source Community and BoxyHQ team)\n- [Twitter](https://twitter.com/BoxyHQ) (Follow us)\n- [GitHub Issues](https://github.com/boxyhq/jackson-cerbos/issues) (Bug reports, Contributions)\n\n## License\n\n[Apache 2.0 License](https://github.com/boxyhq/jackson/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxyhq%2Fjackson-cerbos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboxyhq%2Fjackson-cerbos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxyhq%2Fjackson-cerbos/lists"}