-
-
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
Open
SpiralUp
wants to merge
14
commits into
jhipster:main
Choose a base branch
from
SpiralUp:defining_endpoint_security_through_jdl
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Defining endpoint security through JDL #23740
SpiralUp
wants to merge
14
commits into
jhipster:main
from
SpiralUp:defining_endpoint_security_through_jdl
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.