You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 075cd3c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: example/README.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,7 @@ When the application has started, open the _ngrok_ HTTPS URL in your preferred w
82
82
- [Using DigiDoc4j in production mode with the `prod` profile](#using-digidoc4j-in-production-mode-with-the-prod-profile)
83
83
+ [Stateful and stateless authentication](#stateful-and-stateless-authentication)
84
84
+ [Assuring that the signing and authentication certificate subjects match](#assuring-that-the-signing-and-authentication-certificate-subjects-match)
85
+
+ [Requesting the signing certificate in a separate step](#requesting-the-signing-certificate-in-a-separate-step)
85
86
* [HTTPS support](#https-support)
86
87
+ [How to verify that HTTPS is configured properly](#how-to-verify-that-https-is-configured-properly)
87
88
* [Deployment](#deployment)
@@ -119,7 +120,9 @@ The `src/main/java/eu/webeid/example` directory contains the Spring Boot applica
119
120
- `WebEidChallengeNonceFilter`for issuing the challenge nonce required by the authentication flow,
120
121
- `WebEidMobileAuthInitFilter`for issuing the challenge nonce and generating the deep link with the authentication request, used to initiate the mobile authentication flow,
121
122
- `WebEidAjaxLoginProcessingFilter`and `WebEidLoginPageGeneratingFilter` for handling login requests.
122
-
- `service`: Web eID signing service implementation that uses DigiDoc4j, and DigiDoc4j runtime configuration,
123
+
- `service`: Web eID signing service implementation that uses DigiDoc4j, and DigiDoc4j runtime configuration.
124
+
- `SigningService`: prepares ASiC-E containers and finalizes signatures.
125
+
- `MobileSigningService`: orchestrates the mobile signing flow (builds mobile signing requests/responses) and supports requesting the signing certificate in a separate step when enabled by configuration.
123
126
- `web`: Spring Web MVC controller for the welcome page and Spring Web REST controller that provides a digital signing endpoint.
124
127
125
128
The `src/resources` directory contains the resources used by the application:
@@ -177,6 +180,16 @@ A common alternative to stateful authentication is stateless authentication with
177
180
178
181
It is usually required to verify that the signing certificate subject matches the authentication certificate subject by assuring that both ID codes match. This check is implemented at the beginning of the `SigningService.prepareContainer()` method.
179
182
183
+
### Requesting the signing certificate in a separate step
184
+
185
+
In some deployments, the signing certificate is not reused from the authentication flow. Instead, it is retrieved directly from the user’s ID-card during the signing process itself.
186
+
187
+
This approach is useful when the signing process is performed without a prior authentication step. For example, in a mobile flow, the user may start signing directly without authenticating beforehand. In such cases, the signing certificate must be requested separately from the user’s ID-card before the signature can be created.
188
+
189
+
When this mode is enabled in the configuration, the backend issues a separate request for the signing certificate using the `MobileSigningService`. The service communicates with the client to obtain the certificate before the signing container is prepared, ensuring that the correct certificate chain is available for the signature.
190
+
191
+
This behavior is controlled by the `request-signing-cert` flag in the `application.yaml` configuration files (`application-dev.yaml`, `application-prod.yaml`). When the flag is set to **false**, the application explicitly requests the signing certificate during the signing process, demonstrating the separate signing certificate retrieval flow. When set to **true**, the signing uses the signing certificate that was already obtained during authentication, and no additional request is made.
192
+
180
193
## HTTPS support
181
194
182
195
There are two ways of adding HTTPS support to a Spring Boot application:
0 commit comments