Skip to content
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

Upgrade to Node 20 and Angular 17 #807

Merged
merged 56 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
569b9f5
Move to GraalVM and Java 17
loicgreffier Oct 14, 2023
bed73e6
Update Docker base image to GraalVM with js
loicgreffier Oct 14, 2023
2288729
Add checkstyle
loicgreffier Oct 14, 2023
3ea4d13
Upgrade to Spring Boot 3
loicgreffier Oct 16, 2023
a0b27b7
End upgrade Spring Boot 3
loicgreffier Oct 18, 2023
dfd4010
Spring Boot 3 and Java 21
loicgreffier Nov 6, 2023
149fefb
Merge branch 'master' into 3-spring-boot-3
loicgreffier Nov 6, 2023
005e7e5
Update CI
loicgreffier Nov 11, 2023
9eb4967
Fix lint and add Swagger UI doc
loicgreffier Nov 12, 2023
adfb90d
update angular core 12
loicgreffier Nov 12, 2023
52a16af
update angular material 12
loicgreffier Nov 12, 2023
a91c28f
udpate angular core 13
loicgreffier Nov 12, 2023
9bd6d79
Update Material 13
loicgreffier Nov 12, 2023
fe7e399
Update dependencies
loicgreffier Nov 12, 2023
5776335
Update node in CI
loicgreffier Nov 12, 2023
afbdde2
Update core Angular 14
loicgreffier Nov 12, 2023
aabaeb5
Upgrade Material 14
loicgreffier Nov 12, 2023
4ab3d3b
Move to RxStomp
loicgreffier Nov 12, 2023
39085db
FIx deprecation
loicgreffier Nov 12, 2023
f6d0b06
Fix mispelling
loicgreffier Nov 12, 2023
02d8233
Fix sonar
loicgreffier Nov 13, 2023
14e5f6d
Merge branch '3-spring-boot-3' into angular
loicgreffier Nov 13, 2023
bd7018c
Fix sonar
loicgreffier Nov 15, 2023
a630bfe
Merge branch '3-spring-boot-3' into angular
loicgreffier Nov 15, 2023
38f2585
Update switch to if else
loicgreffier Nov 18, 2023
461efcc
Merge branch '3-spring-boot-3' into angular
loicgreffier Nov 18, 2023
ad5bdf5
Migrate from Angular2-Grid to Katoid Angular Grid Layout
loicgreffier Nov 25, 2023
40bd874
Improve documentation
loicgreffier Nov 25, 2023
a2c6ba3
Fix ng build configuration for prod
loicgreffier Nov 25, 2023
8634ab0
Fix screenshot
loicgreffier Nov 25, 2023
3b8c567
Update progress bar z indes
loicgreffier Nov 25, 2023
54b51f2
Update to Angular Core 15
loicgreffier Nov 25, 2023
9914cc8
Fix theme and side menu layout
loicgreffier Nov 26, 2023
5c087d9
Fix user deletion. Multiple layout fixes and improvements
loicgreffier Nov 26, 2023
ba9b0b5
Fix header
loicgreffier Nov 26, 2023
754a37f
Fix catalog
loicgreffier Nov 26, 2023
e28ef2c
Fix screen management
loicgreffier Nov 26, 2023
6bfe5bb
Node 18 and update palettes
loicgreffier Nov 26, 2023
873722c
Fix dashboard rotation
loicgreffier Nov 27, 2023
a38a25e
Fix edit widget layout
loicgreffier Dec 2, 2023
9d4ca1d
Remove fxLayout
loicgreffier Dec 3, 2023
73e588a
Angular Core 16
loicgreffier Dec 3, 2023
66dede6
Angular Material 16
loicgreffier Dec 3, 2023
882978e
Migrate guards, udpate typescript, fix color picker
loicgreffier Dec 3, 2023
796afae
Angular Core 17
loicgreffier Dec 3, 2023
0a15950
Angular Material 17 and Node 20
loicgreffier Dec 3, 2023
845d97f
Fix theming import
loicgreffier Dec 3, 2023
06169d7
multiple fixes
loicgreffier Dec 3, 2023
a508fff
Merge branch 'master' into 3-spring-boot-3
loicgreffier Dec 3, 2023
be229e9
Merge branch '3-spring-boot-3' into angular
loicgreffier Dec 3, 2023
c1efb12
fix PR build
loicgreffier Dec 3, 2023
f638e2a
fix lint
loicgreffier Dec 3, 2023
0fae449
Fix tests
loicgreffier Dec 5, 2023
485f1f7
Merge branch 'master' into 3-spring-boot-3
loicgreffier Dec 5, 2023
94c4783
Merge branch '3-spring-boot-3' into angular
loicgreffier Dec 5, 2023
087d4f2
Merge branch 'master' into angular
loicgreffier Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"root": true,
"ignorePatterns": [],
"overrides": [
{
"files": [
"*.ts"
],
"plugins": [
"deprecation"
],
"parserOptions": {
"project": [
"tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "suricate",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "suricate",
"style": "camelCase",
"type": "attribute"
}
],
"deprecation/deprecation": "warn"
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
6 changes: 3 additions & 3 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ jobs:
with:
fetch-depth: 0

- name: Set up NodeJS 12.x
- name: Set up NodeJS 20.x
uses: actions/setup-node@v4
with:
node-version: '12.x'
node-version: '20.x'

- name: Build
run: |
npm install --no-progress
npm run build -- --prod
npm run build -- --configuration production

- name: Lint
run: npm run lint
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ jobs:
with:
fetch-depth: 0

- name: Set up NodeJS 12.x
- name: Set up NodeJS 20.x
uses: actions/setup-node@v4
with:
node-version: '12.x'
node-version: '20.x'

- name: Build
run: |
npm install --no-progress
npm run build -- --prod
npm run build -- --configuration production

- name: Lint
run: npm run lint
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
distribution: 'temurin'
cache: maven

- name: Set up NodeJS 12.x
- name: Set up NodeJS 20.x
uses: actions/setup-node@v4
with:
node-version: '12.x'
node-version: '20.x'

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.angular/cache
*.iml
target
*.idea/
Expand Down
5 changes: 2 additions & 3 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"hooks": {
"pre-commit": "run-s prettyformat",
"pre-push": "run-s lint"
"pre-commit": "npx pretty-quick --staged"
}
}
}
11 changes: 7 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "auto",
"printWidth": 140,
"quoteProps": "consistent",
"semi": true,
"singleQuote": true,
"useTabs": false,
"tabWidth": 2,
"semi": true,
"bracketSpacing": true,
"jsxBracketSameLine": true
"trailingComma": "none",
"useTabs": false
}
103 changes: 65 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,28 +108,54 @@ structure (tables, constraints, etc.) and the minimum required functional data.

Suricate provides multiple types of authentication that can be activated or deactivated based on your requirements.

#### LDAP vs Database
All the authentication modes deliver a JWT token that is used to authenticate the user on the Back-End.
You can configure the JWT token using the following properties:

You can log in to Suricate using either LDAP or a database after the sign-up step. You can specify these authentication
modes using the following YAML property:
```yaml
application.authentication.jwt.signingKey: 'changeitchangeitchangeitchangeit'
application.authentication.jwt.tokenValidityMs: 86400000
```

The signing key should be at least 256 bits long and should be changed for each environment.

#### Database

You can log in to Suricate using the database after the sign-up step.

You can choose this authentication mode using the following YAML property:

```yaml
application.authentication.provider: 'database'
```

If you choose the database authentication mode, you must change the encryption password:

```yaml
jasypt.encryptor.password: 'changeitchangeitchangeitchangeit'
```

#### LDAP

You can log in to Suricate an LDAP.

You can choose this authentication mode using the following YAML property:

```yaml
application.authentication.provider: ### Provider should be 'database' or 'ldap'
application.authentication.provider: 'ldap'
```

If you choose the `database` authentication mode, it is ready to use without any additional configuration. However, if
you choose the ldap mode, you must specify the following additional properties:
If you choose the ldap authentication mode, you must specify the following additional properties:

```yaml
application.authentication.ldap.url=
application.authentication.ldap.userSearchFilter=
application.authentication.ldap.firstNameAttributeName=
application.authentication.ldap.lastNameAttributeName=
application.authentication.ldap.mailAttributeName=
application.authentication.ldap.username=
application.authentication.ldap.password=
application.authentication.ldap.userSearchBase=
application.authentication.ldap.userDnPatterns=
application.authentication.ldap.url:
application.authentication.ldap.userSearchFilter:
application.authentication.ldap.firstNameAttributeName:
application.authentication.ldap.lastNameAttributeName:
application.authentication.ldap.mailAttributeName:
application.authentication.ldap.username:
application.authentication.ldap.password:
application.authentication.ldap.userSearchBase:
application.authentication.ldap.userDnPatterns:
```

#### Social Login
Expand All @@ -142,42 +168,42 @@ When you activate social login, you can activate or deactivate a social login mo
property:

```yaml
application.authentication.socialProviders=gitlab,github
application.authentication.socialProviders: gitlab,github
```

##### GitHub

To log in using GitHub, you must specify the following properties:

```yaml
spring.security.oauth2.client.registration.github.client-id=<github_client_id>
spring.security.oauth2.client.registration.github.client-secret=<github_client_id>
spring.security.oauth2.client.registration.github.client-id: <github_client_id>
spring.security.oauth2.client.registration.github.client-secret: <github_client_id>
```

##### GitLab

To log in using GitLab with OIDC, you must specify the following properties:

```yaml
spring.security.oauth2.client.registration.gitlab.client-id=<gitlab_client_id>
spring.security.oauth2.client.registration.gitlab.client-secret=<gitlab_client_secret>
spring.security.oauth2.client.registration.gitlab.authorization-grant-type=authorization_code
spring.security.oauth2.client.registration.gitlab.redirect-uri=http://localhost:8080/login/oauth2/code/gitlab
spring.security.oauth2.client.provider.gitlab.issuer-uri=https://gitlab.com
spring.security.oauth2.client.registration.gitlab.scope=read_user,openid,profile,email
spring.security.oauth2.client.registration.gitlab.client-id: <gitlab_client_id>
spring.security.oauth2.client.registration.gitlab.client-secret: <gitlab_client_secret>
spring.security.oauth2.client.registration.gitlab.authorization-grant-type: authorization_code
spring.security.oauth2.client.registration.gitlab.redirect-uri: http://localhost:8080/login/oauth2/code/gitlab
spring.security.oauth2.client.provider.gitlab.issuer-uri: https://gitlab.com
spring.security.oauth2.client.registration.gitlab.scope: read_user,openid,profile,email
```

To log in using GitLab with OAuth2, you must specify the following properties:

```yaml
spring.security.oauth2.client.registration.gitlab.client-id=<gitlab_client_id>
spring.security.oauth2.client.registration.gitlab.client-secret=<gitlab_client_secret>
spring.security.oauth2.client.registration.gitlab.authorization-grant-type=authorization_code
spring.security.oauth2.client.registration.gitlab.redirect-uri=http://localhost:8080/login/oauth2/code/gitlab
spring.security.oauth2.client.provider.gitlab.issuer-uri=https://gitlab.com
spring.security.oauth2.client.registration.gitlab.scope=read_user
spring.security.oauth2.client.provider.gitlab.user-info-uri=https://gitlab.com/api/v4/user
spring.security.oauth2.client.provider.gitlab.user-name-attribute=username
spring.security.oauth2.client.registration.gitlab.client-id: <gitlab_client_id>
spring.security.oauth2.client.registration.gitlab.client-secret: <gitlab_client_secret>
spring.security.oauth2.client.registration.gitlab.authorization-grant-type: authorization_code
spring.security.oauth2.client.registration.gitlab.redirect-uri: http://localhost:8080/login/oauth2/code/gitlab
spring.security.oauth2.client.provider.gitlab.issuer-uri: https://gitlab.com
spring.security.oauth2.client.registration.gitlab.scope: read_user
spring.security.oauth2.client.provider.gitlab.user-info-uri: https://gitlab.com/api/v4/user
spring.security.oauth2.client.provider.gitlab.user-name-attribute: username
```

##### Redirection to Front-End
Expand All @@ -188,7 +214,8 @@ with a social network, the Back-End redirects to the Front-End.
The Back-End uses the following methods to redirect to the Front-End in this order:

- A given _redirect_uri_ query parameter provided by the Front-End to the Back-End in the authorization request (
e.g., http://localhost:8080/api/oauth2/authorization/github?redirect_uri=localhost:4200/login).
e.g., http://localhost:8080/api/oauth2/authorization/github?redirect_uri=/login).
The host can even be different (e.g., http://localhost:8080/api/oauth2/authorization/github?redirect_uri=http://localhost:4200/login)
- The referer in this authorization, but it can be hidden or lost after a redirection to the ID provider.
- A default target URL defined in the Back-End.

Expand All @@ -197,8 +224,8 @@ The first option is currently used.
The other options are defined by the following properties:

```yaml
application.authentication.oauth2.defaultTargetUrl=http://localhost:4200/login
application.authentication.oauth2.useReferer=false
application.authentication.oauth2.defaultTargetUrl: http://localhost:4200/login
application.authentication.oauth2.useReferer: false
```

##### Name Parsing Strategy
Expand All @@ -208,7 +235,7 @@ Lastname". However, you can also configure Suricate to parse the first name and
upper/lower) using the following property:

```yaml
application.authentication.socialProvidersConfig.<provider>.nameCaseParse=true
application.authentication.socialProvidersConfig.<provider>.nameCaseParse: true
```

Simply replace `<provider>` with the appropriate social provider, such as `github` or `gitlab`.
Expand All @@ -219,8 +246,8 @@ The application allows for the generation of personal access tokens, which can b
properties are used for token generation and verification:

```yaml
application.authentication.pat.prefix=sup
application.authentication.pat.checksumSecret=changeit
application.authentication.pat.prefix: sup
application.authentication.pat.checksumSecret: changeit
```

It is recommended to update the _checksumSecret_ with a different secret for each environment, to enhance security.
Expand Down
Loading