-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defining endpoint security through JDL #23740
base: main
Are you sure you want to change the base?
Defining endpoint security through JDL #23740
Commits on Oct 4, 2023
-
Defining endpoint security through JDL
This commit introduces a role-based security feature for the backend, allowing users to define security configurations using JDL clauses. Security can now be specified directly within JDL for various entities, where different roles with specified permissions are mapped to the corresponding Java entity resource files. This mapping auto-generates the requisite `@Secured({})` annotations on the endpoints, ensuring the right level of access control based on roles. Examples of the JDL security clauses include: ``` secure entity1, entity2, entity3 with roles { ROLE_ADMIN allows (get, post, put, delete) ROLE_USER allows (get) } ``` and ``` secure all except entity3 with roles { ROLE_ADMIN allows (get, post, put, delete) ROLE_USER allows (get) } ``` which would translate to `@Secured({ "ROLE_ADMIN" })` annotations in the generated Java code for specified endpoints. Additionally, the integration tests have been updated to consider these role-based security configurations. Moreover, the groundwork for supporting other security types has been laid down through the inclusion of grammar and parser definitions. These additional security types encompass privilege security, organizational security, parent based security, and relation based security, although the code generators for these types are not included in this commit. Resolves jhipster#19201
Configuration menu - View commit details
-
Copy full SHA for 97f3f90 - Browse repository at this point
Copy the full SHA 97f3f90View commit details -
Defining endpoint security through JDL
This commit introduces a role-based security feature for the backend, allowing users to define security configurations using JDL clauses. Security can now be specified directly within JDL for various entities, where different roles with specified permissions are mapped to the corresponding Java entity resource files. This mapping auto-generates the requisite `@Secured({})` annotations on the endpoints, ensuring the right level of access control based on roles. Examples of the JDL security clauses include: ``` secure entity1, entity2, entity3 with roles { ROLE_ADMIN allows (get, post, put, delete) ROLE_USER allows (get) } ``` and ``` secure all except entity3 with roles { ROLE_ADMIN allows (get, post, put, delete) ROLE_USER allows (get) } ``` which would translate to `@Secured({ "ROLE_ADMIN" })` annotations in the generated Java code for specified endpoints. Additionally, the integration tests have been updated to consider these role-based security configurations. Moreover, the groundwork for supporting other security types has been laid down through the inclusion of grammar and parser definitions. These additional security types encompass privilege security, organizational security, parent based security, and relation based security, although the code generators for these types are not included in this commit. Resolves jhipster#19201
Configuration menu - View commit details
-
Copy full SHA for 927949c - Browse repository at this point
Copy the full SHA 927949cView commit details
Commits on Oct 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 701a489 - Browse repository at this point
Copy the full SHA 701a489View commit details
Commits on Oct 30, 2023
-
Configuration menu - View commit details
-
Copy full SHA for aef7616 - Browse repository at this point
Copy the full SHA aef7616View commit details
Commits on Oct 31, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cf772f4 - Browse repository at this point
Copy the full SHA cf772f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ca37d8 - Browse repository at this point
Copy the full SHA 9ca37d8View commit details
Commits on Nov 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7f9648e - Browse repository at this point
Copy the full SHA 7f9648eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 455d2da - Browse repository at this point
Copy the full SHA 455d2daView commit details
Commits on Dec 28, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c21ffb2 - Browse repository at this point
Copy the full SHA c21ffb2View commit details
Commits on Dec 29, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 88a446b - Browse repository at this point
Copy the full SHA 88a446bView commit details
Commits on Dec 30, 2023
-
Set .mocharc.cjs parallel back to true
To enable running tests from WebStorm set this option back to false.
Configuration menu - View commit details
-
Copy full SHA for 7c2c2da - Browse repository at this point
Copy the full SHA 7c2c2daView commit details -
Merge remote-tracking branch 'origin/main' into defining_endpoint_sec…
…urity_through_jdl
Configuration menu - View commit details
-
Copy full SHA for 7b87737 - Browse repository at this point
Copy the full SHA 7b87737View commit details -
Merge remote-tracking branch 'origin/main' into defining_endpoint_sec…
…urity_through_jdl
Configuration menu - View commit details
-
Copy full SHA for 30123fe - Browse repository at this point
Copy the full SHA 30123feView commit details
Commits on Dec 31, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9f5b2ee - Browse repository at this point
Copy the full SHA 9f5b2eeView commit details