{"id":19382838,"url":"https://github.com/tyaga001/java-spring-fine-grained-auth","last_synced_at":"2026-05-13T08:36:12.876Z","repository":{"id":259004517,"uuid":"875947594","full_name":"tyaga001/java-spring-fine-grained-auth","owner":"tyaga001","description":"How to Implement Fine-Grained Authorization in Java and SpringBoot","archived":false,"fork":false,"pushed_at":"2024-10-21T11:43:04.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-21T16:54:39.465Z","etag":null,"topics":["authorization","java","permissions","policies","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/tyaga001.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}},"created_at":"2024-10-21T06:32:11.000Z","updated_at":"2024-10-21T12:02:42.000Z","dependencies_parsed_at":"2024-10-22T13:01:06.037Z","dependency_job_id":null,"html_url":"https://github.com/tyaga001/java-spring-fine-grained-auth","commit_stats":null,"previous_names":["tyaga001/java-spring-fine-grained-auth"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyaga001%2Fjava-spring-fine-grained-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyaga001%2Fjava-spring-fine-grained-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyaga001%2Fjava-spring-fine-grained-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyaga001%2Fjava-spring-fine-grained-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyaga001","download_url":"https://codeload.github.com/tyaga001/java-spring-fine-grained-auth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240521052,"owners_count":19814694,"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":["authorization","java","permissions","policies","spring-boot"],"created_at":"2024-11-10T09:23:29.674Z","updated_at":"2026-05-13T08:36:07.829Z","avatar_url":"https://github.com/tyaga001.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Fine-Grained Authorization in Java and SpringBoot](banner.png)\n\n# Ecommerce Application with Permit.io Authorization\n\nThis example project showcases a simple ecommerce app that implements authorization using permit.io. \n\n📝 **Learn More**: Check out the detailed tutorial on freeCodeCamp: [Fine-Grained Authorization in Java and Spring Boot](https://www.freecodecamp.org/news/fine-grained-authorization-in-java-and-springboot/)\n\n## Features\n\n- **User Authentication**: Users can log in to the application using their credentials.\n- **Product Management**: Authenticated users can create new products, view existing products, update their products, and delete them depending on their authorization level.\n- **Authorization with permit.io**: The application uses permit.io to manage user roles and permissions, ensuring that access to certain actions is appropriately restricted.\n- **Role-Based Access Control**: Defines different roles for users, such as viewer, editor, and admin, each with varying levels of access and permissions.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nBefore you begin, ensure you have the following installed:\n- Java JDK 21\n- Gradle\n- Docker\n\n### Step 1: Setting Up the Project\n\nTo set up the e-commerce application, git clone the source code using the code below:\n\n```bash\ngit clone https://github.com/tyaga001/java-spring-fine-grained-auth.git\n```\n\n### Step 2: Get your Permit Environment API Key\n\nLogin to your Permit.io account and create a new project in your workspace and copy your API key. Set the PERMIT_API_KEY environment variable to your API key:\n\n```bash\nexport PERMIT_API_KEY=\u003cYOUR_API_KEY\u003e\n```\n\n### Step 3: Start your local PDP container\n\nThe PDP (Policy Decision Point) is the component of permit.io that evaluates access control decisions. You can run a local PDP container using Docker:\n\n```bash\ndocker run -it -p 7766:7000 --env PDP_DEBUG=True --env PDP_API_KEY=\u003cYOUR_API_KEY\u003e permitio/pdp-v2:latest\n```\n\n### Step 4: Run the Application\n\nYou can run the application using the following Gradle command:\n\n```bash\n./gradlew bootRun\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyaga001%2Fjava-spring-fine-grained-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyaga001%2Fjava-spring-fine-grained-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyaga001%2Fjava-spring-fine-grained-auth/lists"}