Skip to content

Commit 2e69035

Browse files
authored
Merge pull request #102 from xdev-software/develop
Release
2 parents 57d7153 + cc7b20c commit 2e69035

29 files changed

+954
-247
lines changed

Diff for: .config/pmd/ruleset.xml

+7
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,12 @@
151151
<exclude name="UseStringBufferForStringAppends"/>
152152
</rule>
153153

154+
<rule ref="category/java/performance.xml/TooFewBranchesForSwitch">
155+
<properties>
156+
<!-- If you have one case only please use a if -->
157+
<property name="minimumNumberCaseForASwitch" value="2"/>
158+
</properties>
159+
</rule>
160+
154161
<rule ref="category/java/security.xml"/>
155162
</ruleset>

Diff for: .github/ISSUE_TEMPLATE/bug_report.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: 🐞 Bug
22
description: Create a bug report for something that is broken
33
labels: [bug]
4+
type: bug
45
body:
56
- type: markdown
67
attributes:

Diff for: .github/ISSUE_TEMPLATE/enhancement.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: ✨ Feature/Enhancement
22
description: Suggest a new feature or enhancement
33
labels: [enhancement]
4+
type: feature
45
body:
56
- type: markdown
67
attributes:

Diff for: .github/workflows/broken-links.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ permissions:
1111
jobs:
1212
link-checker:
1313
runs-on: ubuntu-latest
14+
timeout-minutes: 15
1415
steps:
1516
- uses: actions/checkout@v4
1617

1718
- run: mv .github/.lycheeignore .lycheeignore
1819

1920
- name: Link Checker
2021
id: lychee
21-
uses: lycheeverse/lychee-action@v1
22+
uses: lycheeverse/lychee-action@v2
23+
with:
24+
fail: false # Don't fail on broken links, create an issue instead
2225

2326
- name: Find already existing issue
2427
id: find-issue

Diff for: .github/workflows/check-build.yml

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ env:
2626
jobs:
2727
build:
2828
runs-on: ubuntu-latest
29+
timeout-minutes: 30
2930

3031
strategy:
3132
matrix:
@@ -73,6 +74,7 @@ jobs:
7374
checkstyle:
7475
runs-on: ubuntu-latest
7576
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
77+
timeout-minutes: 15
7678

7779
strategy:
7880
matrix:
@@ -95,6 +97,7 @@ jobs:
9597
pmd:
9698
runs-on: ubuntu-latest
9799
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
100+
timeout-minutes: 15
98101

99102
strategy:
100103
matrix:

Diff for: .github/workflows/release.yml

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ permissions:
1414
jobs:
1515
check-code:
1616
runs-on: ubuntu-latest
17+
timeout-minutes: 30
1718
steps:
1819
- uses: actions/checkout@v4
1920

@@ -48,6 +49,7 @@ jobs:
4849
prepare-release:
4950
runs-on: ubuntu-latest
5051
needs: [check-code]
52+
timeout-minutes: 10
5153
outputs:
5254
upload_url: ${{ steps.create_release.outputs.upload_url }}
5355
steps:
@@ -109,6 +111,7 @@ jobs:
109111
publish-maven:
110112
runs-on: ubuntu-latest
111113
needs: [prepare-release]
114+
timeout-minutes: 60
112115
steps:
113116
- uses: actions/checkout@v4
114117

@@ -140,6 +143,7 @@ jobs:
140143
publish-pages:
141144
runs-on: ubuntu-latest
142145
needs: [prepare-release]
146+
timeout-minutes: 15
143147
steps:
144148
- uses: actions/checkout@v4
145149

@@ -165,10 +169,12 @@ jobs:
165169
with:
166170
github_token: ${{ secrets.GITHUB_TOKEN }}
167171
publish_dir: ./${{ env.PRIMARY_MAVEN_MODULE }}/target/site
172+
force_orphan: true
168173

169174
after-release:
170175
runs-on: ubuntu-latest
171176
needs: [publish-maven]
177+
timeout-minutes: 10
172178
steps:
173179
- uses: actions/checkout@v4
174180

Diff for: .github/workflows/sonar.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
token-check:
2828
runs-on: ubuntu-latest
2929
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) }}
30+
timeout-minutes: 5
3031
outputs:
3132
hasToken: ${{ steps.check-token.outputs.has }}
3233
steps:
@@ -40,6 +41,7 @@ jobs:
4041
runs-on: ubuntu-latest
4142
needs: token-check
4243
if: ${{ needs.token-check.outputs.hasToken }}
44+
timeout-minutes: 30
4345
steps:
4446
- uses: actions/checkout@v4
4547
with:

Diff for: .github/workflows/sync-labels.yml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ permissions:
1414
jobs:
1515
labels:
1616
runs-on: ubuntu-latest
17+
timeout-minutes: 10
1718
steps:
1819
- uses: actions/checkout@v4
1920
with:

Diff for: .github/workflows/test-deploy.yml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ env:
99
jobs:
1010
publish-maven:
1111
runs-on: ubuntu-latest
12+
timeout-minutes: 60
1213
steps:
1314
- uses: actions/checkout@v4
1415

Diff for: .github/workflows/update-from-template.yml

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ permissions:
3131
jobs:
3232
update:
3333
runs-on: ubuntu-latest
34+
timeout-minutes: 60
3435
outputs:
3536
update_branch_merged_commit: ${{ steps.manage-branches.outputs.update_branch_merged_commit }}
3637
create_update_branch_merged_pr: ${{ steps.manage-branches.outputs.create_update_branch_merged_pr }}
@@ -180,6 +181,7 @@ jobs:
180181
needs: [update]
181182
if: needs.update.outputs.create_update_branch_merged_pr == 1
182183
runs-on: ubuntu-latest
184+
timeout-minutes: 60
183185
steps:
184186
- uses: actions/checkout@v4
185187
with:

Diff for: .idea/checkstyle-idea.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/saveactions_settings.xml

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
# 2.0.0
2+
* Added support for Spring Security 6.4+ / Spring Boot 3.4+ #100
3+
* Spring now
4+
* uses a Regex-based templating system
5+
* no longer uses bootstrap
6+
* provides One-Time token/OTT and Passkey logins
7+
* Changes to ``Extendable``-subsystem
8+
* Now uses the new Regex-based templating system
9+
* Correct a bunch of problems in Spring Security including
10+
* One-Time token/OTT and Passkeys are ignored when computing if the whole filter is enabled
11+
* [Passkeys] Removed invalid XML comment in scripts block
12+
* [Passkeys] Fixed incorrectly closed HTML-form/div-tag
13+
* [HtmlTemplating] Compile ``UNUSED_PLACEHOLDER_PATTERN`` regex once and not for each request
14+
* [HtmlTemplating] Render: Optimization: Use entrySet instead of keySet + getValue
15+
* Add correct setter for ``generateOneTimeTokenUrl``
16+
* Improved naming of methods
17+
* Changes to ``Advanced``-subsystem
18+
* Keeps using Bootstrap
19+
* By default bootstrap is still loaded from ``cdn.jsdelivr.net`` but you can (and should) provide your own version
20+
* Keeps using the old templating system (without Regex)
21+
* Not all values are escaped by default as is with Spring's Regex based system
22+
* Usually they don't need to be escaped in the first place as they are set on the server side and can't be modified by a user
23+
* This is A LOT FASTER (in tests around 50x) than Spring's new Regex based system
24+
* Adopted changes; Added new configuration options
25+
* [Passkeys] Fixed a problem where more than one header results in invalid generated JavaScript code
26+
127
# 1.0.3
228
* Updated dependencies
329
* Abstracted code

Diff for: README.md

+11
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ public SecurityFilterChain configure(final HttpSecurity http) throws Exception
3232

3333
A more detailed scenario is available in the [demo](./spring-security-advanced-authentication-ui-demo/).
3434

35+
> [!NOTE]
36+
> By default [Bootstrap](https://github.com/twbs/bootstrap) is loaded from ``cdn.jsdelivr.net``.<br/>
37+
> Due to privacy and stability reasons you should ship your own version!<br/>
38+
> An example how this can be done is shown in the demo.
39+
40+
> [!NOTE]
41+
> The ``Advanced``-subsystem uses the pre-``Spring Security 6.4`` / ``Spring Boot 3.4`` templating system (without Regex).<br/>
42+
> * In contrast to Spring's new Regex based system not all values are escaped by default
43+
> * Usually they don't need to be escaped in the first place as they are set on the server side and can't be modified by a user
44+
> * This is A LOT FASTER (in tests around 50x) than Spring's new Regex based system
45+
3546
## Installation
3647
[Installation guide for the latest release](https://github.com/xdev-software/spring-security-advanced-authentication-ui/releases/latest#Installation)
3748

Diff for: assets/demo.png

19 KB
Loading

Diff for: dev_infra/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Development Infrastructure
22

33
The infrastructure contains the following:
4-
* [Open ID Connect Mock Server](https://github.com/Soluto/oidc-server-mock) - for login in
4+
* [Open ID Connect Mock Server](https://github.com/xdev-software/oidc-server-mock) - for login in
55
* Available at http://localhost:4011
66

77
### Setup

Diff for: dev_infra/docker-compose.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
version: "3"
2-
31
services:
42
# Docs: https://docs.duendesoftware.com
53
oidc-server-mock:
64
container_name: oidc-server-mock
7-
image: ghcr.io/soluto/oidc-server-mock:9.0.1
5+
image: xdevsoftware/oidc-server-mock:1
86
environment:
97
ASPNETCORE_ENVIRONMENT: Development
108
SERVER_OPTIONS_INLINE: |

Diff for: pom.xml

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>software.xdev</groupId>
88
<artifactId>spring-security-advanced-authentication-ui-root</artifactId>
9-
<version>1.0.4-SNAPSHOT</version>
9+
<version>2.0.0-SNAPSHOT</version>
1010
<packaging>pom</packaging>
1111

1212
<organization>
@@ -40,12 +40,12 @@
4040
<plugin>
4141
<groupId>org.apache.maven.plugins</groupId>
4242
<artifactId>maven-checkstyle-plugin</artifactId>
43-
<version>3.5.0</version>
43+
<version>3.6.0</version>
4444
<dependencies>
4545
<dependency>
4646
<groupId>com.puppycrawl.tools</groupId>
4747
<artifactId>checkstyle</artifactId>
48-
<version>10.18.1</version>
48+
<version>10.21.2</version>
4949
</dependency>
5050
</dependencies>
5151
<configuration>
@@ -70,7 +70,7 @@
7070
<plugin>
7171
<groupId>org.apache.maven.plugins</groupId>
7272
<artifactId>maven-pmd-plugin</artifactId>
73-
<version>3.25.0</version>
73+
<version>3.26.0</version>
7474
<configuration>
7575
<includeTests>true</includeTests>
7676
<printFailingErrors>true</printFailingErrors>
@@ -82,12 +82,12 @@
8282
<dependency>
8383
<groupId>net.sourceforge.pmd</groupId>
8484
<artifactId>pmd-core</artifactId>
85-
<version>7.5.0</version>
85+
<version>7.10.0</version>
8686
</dependency>
8787
<dependency>
8888
<groupId>net.sourceforge.pmd</groupId>
8989
<artifactId>pmd-java</artifactId>
90-
<version>7.5.0</version>
90+
<version>7.10.0</version>
9191
</dependency>
9292
</dependencies>
9393
</plugin>
@@ -99,7 +99,7 @@
9999
<plugin>
100100
<groupId>org.apache.maven.plugins</groupId>
101101
<artifactId>maven-jxr-plugin</artifactId>
102-
<version>3.5.0</version>
102+
<version>3.6.0</version>
103103
</plugin>
104104
</plugins>
105105
</reporting>

Diff for: spring-security-advanced-authentication-ui-demo/README.md

+14
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,17 @@
33
* Start the [development infrastructure](../dev_infra/)
44
* Run the application
55
* Open ``http://localhost:8080``
6+
7+
## Special Login information
8+
9+
### Username + Password
10+
11+
Example user:
12+
* Username: ``test``
13+
* Password: ``test``
14+
15+
### Passkeys
16+
17+
The browser needs to support passkeys and you also need an appropriate store (usually the OS handles this).
18+
19+
NOTE: Passkeys are lost when rebooting the server

Diff for: spring-security-advanced-authentication-ui-demo/pom.xml

+16-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<parent>
88
<groupId>software.xdev</groupId>
99
<artifactId>spring-security-advanced-authentication-ui-root</artifactId>
10-
<version>1.0.4-SNAPSHOT</version>
10+
<version>2.0.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>spring-security-advanced-authentication-ui-demo</artifactId>
14-
<version>1.0.4-SNAPSHOT</version>
14+
<version>2.0.0-SNAPSHOT</version>
1515
<packaging>jar</packaging>
1616

1717
<organization>
@@ -28,7 +28,7 @@
2828

2929
<mainClass>software.xdev.Application</mainClass>
3030

31-
<org.springframework.boot.version>3.3.4</org.springframework.boot.version>
31+
<org.springframework.boot.version>3.4.2</org.springframework.boot.version>
3232
</properties>
3333

3434
<dependencyManagement>
@@ -63,6 +63,19 @@
6363
<groupId>org.springframework.boot</groupId>
6464
<artifactId>spring-boot-starter-oauth2-client</artifactId>
6565
</dependency>
66+
67+
<!-- Required to showcase passkeys -->
68+
<dependency>
69+
<groupId>com.webauthn4j</groupId>
70+
<artifactId>webauthn4j-core</artifactId>
71+
<version>0.28.5.RELEASE</version>
72+
</dependency>
73+
74+
<dependency>
75+
<groupId>org.springframework.boot</groupId>
76+
<artifactId>spring-boot-devtools</artifactId>
77+
<optional>true</optional>
78+
</dependency>
6679
</dependencies>
6780

6881
<build>

0 commit comments

Comments
 (0)