From ef78796693a060610ef482b72b22a72c5a753197 Mon Sep 17 00:00:00 2001 From: Mostafa Eltaher Date: Fri, 19 Aug 2016 11:22:31 +0200 Subject: [PATCH] Split the access-control from the sample-issue-tracker --- AbacSpringSecurity.postman_collection.json | 30 +++--- access-control/.gitignore | 7 ++ access-control/pom.xml | 48 +++++++++ .../policy/BasicPolicyEnforcement.java | 0 .../security/policy/PolicyDefinition.java | 0 .../security/policy/PolicyEnforcement.java | 0 .../abac/security/policy/PolicyRule.java | 0 .../policy/SecurityAccessContext.java | 2 - .../policy/SimplePolicyDefinition.java | 0 .../policy/json/JsonFilePolicyDefinition.java | 0 .../policy/json/SpelDeserializer.java | 0 .../spring/AbacPermissionEvaluator.java | 3 +- .../spring/ContextAwarePolicyEnforcement.java | 4 +- .../security/policy/json/default-policy.json | 0 pom.xml | 78 ++------------- sample-issue-tracker/.gitignore | 7 ++ sample-issue-tracker/pom.xml | 98 +++++++++++++++++++ .../abac/config/AbacSecurityInitializer.java | 0 .../abac/config/AbacWebInitializer.java | 0 .../config/HttpAuthenticationEntryPoint.java | 0 .../config/InMemoryUserDetailsService.java | 0 .../abac/config/MethodSecurityConfig.java | 0 .../abac/config/ProjectSecurityUser.java | 0 .../abac/config/RootConfiguration.java | 0 .../ExceptionControllerAdvice.java | 0 .../web/controllers/IssuesController.java | 0 .../web/controllers/ProjectController.java | 0 .../abac/web/model/BasicProjectUser.java | 0 .../edu/mostafa/abac/web/model/Issue.java | 0 .../mostafa/abac/web/model/IssueStatus.java | 0 .../edu/mostafa/abac/web/model/IssueType.java | 0 .../edu/mostafa/abac/web/model/Project.java | 0 .../mostafa/abac/web/model/ProjectUser.java | 0 .../edu/mostafa/abac/web/model/UserRole.java | 0 .../abac/web/services/IssueService.java | 0 .../abac/web/services/ProjectService.java | 0 .../abac/web/services/UserService.java | 0 .../services/impl/InMemoryIssueService.java | 0 .../services/impl/InMemoryProjectService.java | 0 .../web/services/impl/InMemorySequence.java | 0 .../main/resources/application.properties | 0 .../src}/main/resources/logback.xml | 0 42 files changed, 190 insertions(+), 87 deletions(-) create mode 100644 access-control/.gitignore create mode 100644 access-control/pom.xml rename {src => access-control/src}/main/java/edu/mostafa/abac/security/policy/BasicPolicyEnforcement.java (100%) rename {src => access-control/src}/main/java/edu/mostafa/abac/security/policy/PolicyDefinition.java (100%) rename {src => access-control/src}/main/java/edu/mostafa/abac/security/policy/PolicyEnforcement.java (100%) rename {src => access-control/src}/main/java/edu/mostafa/abac/security/policy/PolicyRule.java (100%) rename {src => access-control/src}/main/java/edu/mostafa/abac/security/policy/SecurityAccessContext.java (96%) rename {src => access-control/src}/main/java/edu/mostafa/abac/security/policy/SimplePolicyDefinition.java (100%) rename {src => access-control/src}/main/java/edu/mostafa/abac/security/policy/json/JsonFilePolicyDefinition.java (100%) rename {src => access-control/src}/main/java/edu/mostafa/abac/security/policy/json/SpelDeserializer.java (100%) rename {src => access-control/src}/main/java/edu/mostafa/abac/security/spring/AbacPermissionEvaluator.java (92%) rename {src => access-control/src}/main/java/edu/mostafa/abac/security/spring/ContextAwarePolicyEnforcement.java (91%) rename {src => access-control/src}/main/resources/edu/mostafa/abac/security/policy/json/default-policy.json (100%) create mode 100644 sample-issue-tracker/.gitignore create mode 100644 sample-issue-tracker/pom.xml rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/config/AbacSecurityInitializer.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/config/AbacWebInitializer.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/config/HttpAuthenticationEntryPoint.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/config/InMemoryUserDetailsService.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/config/MethodSecurityConfig.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/config/ProjectSecurityUser.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/config/RootConfiguration.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/controllers/ExceptionControllerAdvice.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/controllers/IssuesController.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/controllers/ProjectController.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/model/BasicProjectUser.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/model/Issue.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/model/IssueStatus.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/model/IssueType.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/model/Project.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/model/ProjectUser.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/model/UserRole.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/services/IssueService.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/services/ProjectService.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/services/UserService.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/services/impl/InMemoryIssueService.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/services/impl/InMemoryProjectService.java (100%) rename {src => sample-issue-tracker/src}/main/java/edu/mostafa/abac/web/services/impl/InMemorySequence.java (100%) rename {src => sample-issue-tracker/src}/main/resources/application.properties (100%) rename {src => sample-issue-tracker/src}/main/resources/logback.xml (100%) diff --git a/AbacSpringSecurity.postman_collection.json b/AbacSpringSecurity.postman_collection.json index 9656f7a..b5a7dcb 100644 --- a/AbacSpringSecurity.postman_collection.json +++ b/AbacSpringSecurity.postman_collection.json @@ -10,7 +10,7 @@ { "name": "Project - Add", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/", + "url": "http://localhost:8080/sample-issue-tracker/projects/", "method": "POST", "header": [ { @@ -35,7 +35,7 @@ { "name": "Project - List", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/", + "url": "http://localhost:8080/sample-issue-tracker/projects/", "method": "GET", "header": [ { @@ -60,7 +60,7 @@ { "name": "Project - Assign PM", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/pm/", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/pm/", "method": "PUT", "header": [ { @@ -85,7 +85,7 @@ { "name": "Project - Assign Developer", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/users/", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/users/", "method": "POST", "header": [ { @@ -110,7 +110,7 @@ { "name": "Project - Assign Tester", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/users/", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/users/", "method": "POST", "header": [ { @@ -135,7 +135,7 @@ { "name": "Project - List Users", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/users/", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/users/", "method": "GET", "header": [ { @@ -155,7 +155,7 @@ { "name": "Project - Delete User", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/users/dev1", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/users/dev1", "method": "DELETE", "header": [ { @@ -175,7 +175,7 @@ { "name": "Project - View", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/", "method": "GET", "header": [ { @@ -200,7 +200,7 @@ { "name": "Project - Delete", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/", "method": "DELETE", "header": [ { @@ -220,7 +220,7 @@ { "name": "Issues - List ", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/issues/", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/issues/", "method": "GET", "header": [ { @@ -240,7 +240,7 @@ { "name": "Issues - Create", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/issues/", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/issues/", "method": "POST", "header": [ { @@ -265,7 +265,7 @@ { "name": "Issues - Update", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/issues/1/", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/issues/1/", "method": "PUT", "header": [ { @@ -290,7 +290,7 @@ { "name": "Issues - Delete", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/issues/1/", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/issues/1/", "method": "DELETE", "header": [ { @@ -310,7 +310,7 @@ { "name": "Issues - Assign", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/issues/1/assignee", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/issues/1/assignee", "method": "PUT", "header": [ { @@ -335,7 +335,7 @@ { "name": "Issues - Change Status", "request": { - "url": "http://localhost:8080/AbacSpringSecurity/projects/1/issues/1/status", + "url": "http://localhost:8080/sample-issue-tracker/projects/1/issues/1/status", "method": "PUT", "header": [ { diff --git a/access-control/.gitignore b/access-control/.gitignore new file mode 100644 index 0000000..9ed5c41 --- /dev/null +++ b/access-control/.gitignore @@ -0,0 +1,7 @@ +# Maven +/target/ + +# Eclipse +.classpath +.project +.settings/ diff --git a/access-control/pom.xml b/access-control/pom.xml new file mode 100644 index 0000000..27565d5 --- /dev/null +++ b/access-control/pom.xml @@ -0,0 +1,48 @@ + + 4.0.0 + access-control + + attribute-based-acccess-control + https://github.com/mostafa8eltaher/AbacSpringSecurity + + jar + + edu.mostafa.security + abac-spring-security-parent + 0.0.1-SNAPSHOT + ../ + + + + + org.springframework.security + spring-security-core + ${spring.security.version} + + + + com.fasterxml.jackson.core + jackson-databind + 2.8.1 + + + org.slf4j + slf4j-api + 1.7.20 + + + + + + + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + + \ No newline at end of file diff --git a/src/main/java/edu/mostafa/abac/security/policy/BasicPolicyEnforcement.java b/access-control/src/main/java/edu/mostafa/abac/security/policy/BasicPolicyEnforcement.java similarity index 100% rename from src/main/java/edu/mostafa/abac/security/policy/BasicPolicyEnforcement.java rename to access-control/src/main/java/edu/mostafa/abac/security/policy/BasicPolicyEnforcement.java diff --git a/src/main/java/edu/mostafa/abac/security/policy/PolicyDefinition.java b/access-control/src/main/java/edu/mostafa/abac/security/policy/PolicyDefinition.java similarity index 100% rename from src/main/java/edu/mostafa/abac/security/policy/PolicyDefinition.java rename to access-control/src/main/java/edu/mostafa/abac/security/policy/PolicyDefinition.java diff --git a/src/main/java/edu/mostafa/abac/security/policy/PolicyEnforcement.java b/access-control/src/main/java/edu/mostafa/abac/security/policy/PolicyEnforcement.java similarity index 100% rename from src/main/java/edu/mostafa/abac/security/policy/PolicyEnforcement.java rename to access-control/src/main/java/edu/mostafa/abac/security/policy/PolicyEnforcement.java diff --git a/src/main/java/edu/mostafa/abac/security/policy/PolicyRule.java b/access-control/src/main/java/edu/mostafa/abac/security/policy/PolicyRule.java similarity index 100% rename from src/main/java/edu/mostafa/abac/security/policy/PolicyRule.java rename to access-control/src/main/java/edu/mostafa/abac/security/policy/PolicyRule.java diff --git a/src/main/java/edu/mostafa/abac/security/policy/SecurityAccessContext.java b/access-control/src/main/java/edu/mostafa/abac/security/policy/SecurityAccessContext.java similarity index 96% rename from src/main/java/edu/mostafa/abac/security/policy/SecurityAccessContext.java rename to access-control/src/main/java/edu/mostafa/abac/security/policy/SecurityAccessContext.java index 8e4597d..197957d 100644 --- a/src/main/java/edu/mostafa/abac/security/policy/SecurityAccessContext.java +++ b/access-control/src/main/java/edu/mostafa/abac/security/policy/SecurityAccessContext.java @@ -6,8 +6,6 @@ public class SecurityAccessContext { private Object action; private Object environment; - - public SecurityAccessContext(Object subject, Object resource, Object action, Object environment) { super(); this.subject = subject; diff --git a/src/main/java/edu/mostafa/abac/security/policy/SimplePolicyDefinition.java b/access-control/src/main/java/edu/mostafa/abac/security/policy/SimplePolicyDefinition.java similarity index 100% rename from src/main/java/edu/mostafa/abac/security/policy/SimplePolicyDefinition.java rename to access-control/src/main/java/edu/mostafa/abac/security/policy/SimplePolicyDefinition.java diff --git a/src/main/java/edu/mostafa/abac/security/policy/json/JsonFilePolicyDefinition.java b/access-control/src/main/java/edu/mostafa/abac/security/policy/json/JsonFilePolicyDefinition.java similarity index 100% rename from src/main/java/edu/mostafa/abac/security/policy/json/JsonFilePolicyDefinition.java rename to access-control/src/main/java/edu/mostafa/abac/security/policy/json/JsonFilePolicyDefinition.java diff --git a/src/main/java/edu/mostafa/abac/security/policy/json/SpelDeserializer.java b/access-control/src/main/java/edu/mostafa/abac/security/policy/json/SpelDeserializer.java similarity index 100% rename from src/main/java/edu/mostafa/abac/security/policy/json/SpelDeserializer.java rename to access-control/src/main/java/edu/mostafa/abac/security/policy/json/SpelDeserializer.java diff --git a/src/main/java/edu/mostafa/abac/security/spring/AbacPermissionEvaluator.java b/access-control/src/main/java/edu/mostafa/abac/security/spring/AbacPermissionEvaluator.java similarity index 92% rename from src/main/java/edu/mostafa/abac/security/spring/AbacPermissionEvaluator.java rename to access-control/src/main/java/edu/mostafa/abac/security/spring/AbacPermissionEvaluator.java index ad86435..8681601 100644 --- a/src/main/java/edu/mostafa/abac/security/spring/AbacPermissionEvaluator.java +++ b/access-control/src/main/java/edu/mostafa/abac/security/spring/AbacPermissionEvaluator.java @@ -10,7 +10,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.PermissionEvaluator; import org.springframework.security.core.Authentication; -import org.springframework.security.web.authentication.WebAuthenticationDetails; import org.springframework.stereotype.Component; import edu.mostafa.abac.security.policy.PolicyEnforcement; @@ -27,12 +26,14 @@ public boolean hasPermission(Authentication authentication , Object targetDomain Object user = authentication.getPrincipal(); Map environment = new HashMap<>(); + /* Object authDetails = authentication.getDetails(); if(authDetails != null) { if(authDetails instanceof WebAuthenticationDetails) { environment.put("remoteAddress", ((WebAuthenticationDetails) authDetails).getRemoteAddress()); } } + */ environment.put("time", new Date()); logger.debug("hasPersmission({}, {}, {})", user, targetDomainObject, permission); diff --git a/src/main/java/edu/mostafa/abac/security/spring/ContextAwarePolicyEnforcement.java b/access-control/src/main/java/edu/mostafa/abac/security/spring/ContextAwarePolicyEnforcement.java similarity index 91% rename from src/main/java/edu/mostafa/abac/security/spring/ContextAwarePolicyEnforcement.java rename to access-control/src/main/java/edu/mostafa/abac/security/spring/ContextAwarePolicyEnforcement.java index c05c75f..1197fd3 100644 --- a/src/main/java/edu/mostafa/abac/security/spring/ContextAwarePolicyEnforcement.java +++ b/access-control/src/main/java/edu/mostafa/abac/security/spring/ContextAwarePolicyEnforcement.java @@ -8,7 +8,6 @@ import org.springframework.security.access.AccessDeniedException; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.web.authentication.WebAuthenticationDetails; import org.springframework.stereotype.Component; import edu.mostafa.abac.security.policy.PolicyEnforcement; @@ -26,12 +25,15 @@ public void checkPermission(Object resource, String permission) { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); Map environment = new HashMap<>(); + + /* Object authDetails = auth.getDetails(); if(authDetails != null) { if(authDetails instanceof WebAuthenticationDetails) { environment.put("remoteAddress", ((WebAuthenticationDetails) authDetails).getRemoteAddress()); } } + */ environment.put("time", new Date()); if(!policy.check(auth.getPrincipal(), resource, permission, environment)) diff --git a/src/main/resources/edu/mostafa/abac/security/policy/json/default-policy.json b/access-control/src/main/resources/edu/mostafa/abac/security/policy/json/default-policy.json similarity index 100% rename from src/main/resources/edu/mostafa/abac/security/policy/json/default-policy.json rename to access-control/src/main/resources/edu/mostafa/abac/security/policy/json/default-policy.json diff --git a/pom.xml b/pom.xml index be0a6d6..5da4101 100644 --- a/pom.xml +++ b/pom.xml @@ -1,14 +1,20 @@ 4.0.0 - com.mostafa.security - AbacSpringSecurity + edu.mostafa.security + abac-spring-security-parent 0.0.1-SNAPSHOT - abac-spring-security + abac-spring-security-parent https://github.com/mostafa8eltaher/AbacSpringSecurity - war + pom + + + access-control + sample-issue-tracker + + UTF-8 3.0.1 @@ -16,72 +22,8 @@ 4.3.2.RELEASE 4.1.1.RELEASE - - - - org.springframework - spring-webmvc - ${org.springframework.version} - - - commons-logging - commons-logging - - - - - org.springframework.security - spring-security-web - ${spring.security.version} - - - org.springframework.security - spring-security-config - ${spring.security.version} - - - javax.servlet - javax.servlet-api - ${java.servlet.version} - provided - - - - org.springframework - spring-test - ${org.springframework.version} - test - - - - com.fasterxml.jackson.core - jackson-databind - 2.8.1 - - - ch.qos.logback - logback-classic - 1.1.7 - - - org.slf4j - jcl-over-slf4j - 1.7.20 - - - - - AbacSpringSecurity - - maven-war-plugin - 2.6 - - false - - - maven-compiler-plugin 3.5.1 diff --git a/sample-issue-tracker/.gitignore b/sample-issue-tracker/.gitignore new file mode 100644 index 0000000..9ed5c41 --- /dev/null +++ b/sample-issue-tracker/.gitignore @@ -0,0 +1,7 @@ +# Maven +/target/ + +# Eclipse +.classpath +.project +.settings/ diff --git a/sample-issue-tracker/pom.xml b/sample-issue-tracker/pom.xml new file mode 100644 index 0000000..79283b5 --- /dev/null +++ b/sample-issue-tracker/pom.xml @@ -0,0 +1,98 @@ + + 4.0.0 + sample-issue-tracker + + abac-spring-sample-application + https://github.com/mostafa8eltaher/AbacSpringSecurity + + war + + edu.mostafa.security + abac-spring-security-parent + 0.0.1-SNAPSHOT + ../ + + + + + org.springframework + spring-webmvc + ${org.springframework.version} + + + commons-logging + commons-logging + + + + + org.springframework.security + spring-security-web + ${spring.security.version} + + + org.springframework.security + spring-security-config + ${spring.security.version} + + + javax.servlet + javax.servlet-api + ${java.servlet.version} + provided + + + + org.springframework + spring-test + ${org.springframework.version} + test + + + + com.fasterxml.jackson.core + jackson-databind + 2.8.1 + + + ch.qos.logback + logback-classic + 1.1.7 + + + org.slf4j + jcl-over-slf4j + 1.7.20 + + + + edu.mostafa.security + access-control + 0.0.1-SNAPSHOT + + + + + + sample-issue-tracker + + + maven-war-plugin + 2.6 + + false + + + + + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + + \ No newline at end of file diff --git a/src/main/java/edu/mostafa/abac/config/AbacSecurityInitializer.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/config/AbacSecurityInitializer.java similarity index 100% rename from src/main/java/edu/mostafa/abac/config/AbacSecurityInitializer.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/config/AbacSecurityInitializer.java diff --git a/src/main/java/edu/mostafa/abac/config/AbacWebInitializer.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/config/AbacWebInitializer.java similarity index 100% rename from src/main/java/edu/mostafa/abac/config/AbacWebInitializer.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/config/AbacWebInitializer.java diff --git a/src/main/java/edu/mostafa/abac/config/HttpAuthenticationEntryPoint.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/config/HttpAuthenticationEntryPoint.java similarity index 100% rename from src/main/java/edu/mostafa/abac/config/HttpAuthenticationEntryPoint.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/config/HttpAuthenticationEntryPoint.java diff --git a/src/main/java/edu/mostafa/abac/config/InMemoryUserDetailsService.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/config/InMemoryUserDetailsService.java similarity index 100% rename from src/main/java/edu/mostafa/abac/config/InMemoryUserDetailsService.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/config/InMemoryUserDetailsService.java diff --git a/src/main/java/edu/mostafa/abac/config/MethodSecurityConfig.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/config/MethodSecurityConfig.java similarity index 100% rename from src/main/java/edu/mostafa/abac/config/MethodSecurityConfig.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/config/MethodSecurityConfig.java diff --git a/src/main/java/edu/mostafa/abac/config/ProjectSecurityUser.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/config/ProjectSecurityUser.java similarity index 100% rename from src/main/java/edu/mostafa/abac/config/ProjectSecurityUser.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/config/ProjectSecurityUser.java diff --git a/src/main/java/edu/mostafa/abac/config/RootConfiguration.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/config/RootConfiguration.java similarity index 100% rename from src/main/java/edu/mostafa/abac/config/RootConfiguration.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/config/RootConfiguration.java diff --git a/src/main/java/edu/mostafa/abac/web/controllers/ExceptionControllerAdvice.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/controllers/ExceptionControllerAdvice.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/controllers/ExceptionControllerAdvice.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/controllers/ExceptionControllerAdvice.java diff --git a/src/main/java/edu/mostafa/abac/web/controllers/IssuesController.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/controllers/IssuesController.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/controllers/IssuesController.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/controllers/IssuesController.java diff --git a/src/main/java/edu/mostafa/abac/web/controllers/ProjectController.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/controllers/ProjectController.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/controllers/ProjectController.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/controllers/ProjectController.java diff --git a/src/main/java/edu/mostafa/abac/web/model/BasicProjectUser.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/BasicProjectUser.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/model/BasicProjectUser.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/BasicProjectUser.java diff --git a/src/main/java/edu/mostafa/abac/web/model/Issue.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/Issue.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/model/Issue.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/Issue.java diff --git a/src/main/java/edu/mostafa/abac/web/model/IssueStatus.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/IssueStatus.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/model/IssueStatus.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/IssueStatus.java diff --git a/src/main/java/edu/mostafa/abac/web/model/IssueType.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/IssueType.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/model/IssueType.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/IssueType.java diff --git a/src/main/java/edu/mostafa/abac/web/model/Project.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/Project.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/model/Project.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/Project.java diff --git a/src/main/java/edu/mostafa/abac/web/model/ProjectUser.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/ProjectUser.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/model/ProjectUser.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/ProjectUser.java diff --git a/src/main/java/edu/mostafa/abac/web/model/UserRole.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/UserRole.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/model/UserRole.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/model/UserRole.java diff --git a/src/main/java/edu/mostafa/abac/web/services/IssueService.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/services/IssueService.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/services/IssueService.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/services/IssueService.java diff --git a/src/main/java/edu/mostafa/abac/web/services/ProjectService.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/services/ProjectService.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/services/ProjectService.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/services/ProjectService.java diff --git a/src/main/java/edu/mostafa/abac/web/services/UserService.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/services/UserService.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/services/UserService.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/services/UserService.java diff --git a/src/main/java/edu/mostafa/abac/web/services/impl/InMemoryIssueService.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/services/impl/InMemoryIssueService.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/services/impl/InMemoryIssueService.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/services/impl/InMemoryIssueService.java diff --git a/src/main/java/edu/mostafa/abac/web/services/impl/InMemoryProjectService.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/services/impl/InMemoryProjectService.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/services/impl/InMemoryProjectService.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/services/impl/InMemoryProjectService.java diff --git a/src/main/java/edu/mostafa/abac/web/services/impl/InMemorySequence.java b/sample-issue-tracker/src/main/java/edu/mostafa/abac/web/services/impl/InMemorySequence.java similarity index 100% rename from src/main/java/edu/mostafa/abac/web/services/impl/InMemorySequence.java rename to sample-issue-tracker/src/main/java/edu/mostafa/abac/web/services/impl/InMemorySequence.java diff --git a/src/main/resources/application.properties b/sample-issue-tracker/src/main/resources/application.properties similarity index 100% rename from src/main/resources/application.properties rename to sample-issue-tracker/src/main/resources/application.properties diff --git a/src/main/resources/logback.xml b/sample-issue-tracker/src/main/resources/logback.xml similarity index 100% rename from src/main/resources/logback.xml rename to sample-issue-tracker/src/main/resources/logback.xml