Skip to content

Commit 12efd19

Browse files
committed
Sync documentation of main branch
1 parent b790038 commit 12efd19

File tree

3 files changed

+2
-79
lines changed

3 files changed

+2
-79
lines changed

Diff for: _versions/main/guides/deploying-to-google-cloud.adoc

-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ Finally, you need to configure your datasource specifically to use the socket fa
251251
----
252252
quarkus.datasource.db-kind=postgresql
253253
quarkus.datasource.jdbc.url=jdbc:postgresql:///mydatabase <1>
254-
quarkus.datasource.jdbc.driver=org.postgresql.Driver
255254
quarkus.datasource.username=quarkus
256255
quarkus.datasource.password=quarkus
257256
quarkus.datasource.jdbc.additional-jdbc-properties.cloudSqlInstance=project-id:gcp-region:instance <2>

Diff for: _versions/main/guides/security-csrf-prevention.adoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ include::_attributes.adoc[]
1111

1212
https://owasp.org/www-community/attacks/csrf[Cross-Site Request Forgery (CSRF)] is an attack that forces an end user to execute unwanted actions on a web application in which they are currently authenticated.
1313

14-
Quarkus Security provides a CSRF prevention feature which implements https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#double-submit-cookie[Double Submit Cookie] and [CSRF Request Header] techniques.
14+
Quarkus Security provides a CSRF prevention feature which implements https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#double-submit-cookie[Double Submit Cookie] and xref:csrf-request-header[CSRF Request Header] techniques.
1515

1616
`Double Submit Cookie` technique requires that the CSRF token sent as `HTTPOnly`, optionally signed, cookie to the client, and
1717
directly embedded in a hidden form input of server-side rendered HTML forms, or submitted as a request header value.
@@ -139,6 +139,7 @@ You can get `HMAC` signatures created for the generated CSRF tokens and have the
139139
quarkus.csrf-reactive.token-signature-key=AyM1SysPpbyDfgZld3umj1qzKObwVMkoqQ-EstJQLr_T-1qS0gZH75aKtMN3Yj0iPS4hcgUuTwjAzZr1Z9CAow
140140
----
141141

142+
[[csrf-request-header]]
142143
== CSRF Request Header
143144

144145
If HTML `form` tags are not used and you need to pass CSRF token as a header, then inject the header name and token, for example, into HTMX:

Diff for: _versions/main/guides/security-openid-connect-dev-services.adoc

-77
Original file line numberDiff line numberDiff line change
@@ -340,83 +340,6 @@ quarkus.oidc.devui.grant.type=password
340340
quarkus.oidc.devui.grant-options.password.audience=http://localhost:8080
341341
----
342342

343-
== Dev Services and UI Support for other OpenID Connect Providers
344-
345-
Your custom extension would need to extend `quarkus-oidc` and add the dependencies required to support your provider to the extension's `deployment` module only.
346-
347-
The build step dealing with the `Dev Services` should additionally register two runtime properties into the "io.quarkus.quarkus-oidc" namespace: `oidcProviderName` (for example, `Google`) and `oidcProviderUrlBase` (for example: `mycompany.devservices-google`) for the `OpenID Connect Card` to link to the Dev UI page representing your provider, for example:
348-
349-
[source,java]
350-
----
351-
package io.quarkus.oidc.okta.runtime;
352-
353-
import java.util.function.Supplier;
354-
355-
import io.quarkus.runtime.annotations.Recorder;
356-
357-
// This simple recorder is the only code which will be located in the extension's `runtime` module
358-
@Recorder
359-
public class OktaDevServicesRecorder {
360-
361-
public Supplier<String> getProviderName() {
362-
return new Supplier<String>() {
363-
364-
@Override
365-
public String get() {
366-
return "OKTA";
367-
}
368-
};
369-
}
370-
371-
public Supplier<String> getProviderUrlBase() {
372-
return new Supplier<String>() {
373-
374-
@Override
375-
public String get() {
376-
return "io.quarkus" + "." + "quarkus-oidc-okta";
377-
}
378-
};
379-
}
380-
}
381-
382-
383-
package io.quarkus.oidc.okta.deployment.devservices;
384-
385-
import static io.quarkus.deployment.annotations.ExecutionTime.RUNTIME_INIT;
386-
387-
import java.util.Optional;
388-
389-
import io.quarkus.deployment.IsDevelopment;
390-
import io.quarkus.deployment.annotations.BuildProducer;
391-
import io.quarkus.deployment.annotations.BuildStep;
392-
import io.quarkus.deployment.annotations.Consume;
393-
import io.quarkus.deployment.annotations.Record;
394-
import io.quarkus.deployment.builditem.RuntimeConfigSetupCompleteBuildItem;
395-
import io.quarkus.devconsole.spi.DevConsoleRouteBuildItem;
396-
import io.quarkus.devconsole.spi.DevConsoleRuntimeTemplateInfoBuildItem;
397-
398-
public class OktaDevConsoleProcessor {
399-
400-
@BuildStep(onlyIf = IsDevelopment.class)
401-
@Record(value = RUNTIME_INIT)
402-
public void setOidcProviderProperties(BuildProducer<DevConsoleRuntimeTemplateInfoBuildItem> provider,
403-
OktaDevServicesRecorder recorder,
404-
Optional<DevServicesConfigBuildItem> configProps) {
405-
if (configProps.isPresent()) {
406-
provider.produce(new DevConsoleRuntimeTemplateInfoBuildItem("io.quarkus", "quarkus-oidc", "oidcProviderName",
407-
recorder.getProviderName()));
408-
provider.produce(new DevConsoleRuntimeTemplateInfoBuildItem("io.quarkus", "quarkus-oidc", "oidcProviderUrlBase",
409-
recorder.getProviderUrlBase()));
410-
}
411-
}
412-
}
413-
414-
----
415-
416-
Additionally, the extension should produce a `io.quarkus.oidc.deployment.devservices.OidcProviderBuildItem` to disable the default `Dev Services for Keycloak`, instead of the users having to type `quarkus.keycloak.devservices.enabled=false`.
417-
418-
Please follow the xref:dev-ui.adoc[Dev UI] tutorial as well as check the `extensions/oidc/deployment` sources for more ideas.
419-
420343
== Non Application Root Path Considerations
421344

422345
This document refers to the `http://localhost:8080/q/dev-ui` Dev UI URL in several places where `q` is a default non application root path. If you customize `quarkus.http.root-path` and/or `quarkus.http.non-application-root-path` properties then replace `q` accordingly, please see https://quarkus.io/blog/path-resolution-in-quarkus/[Path Resolution in Quarkus] for more information.

0 commit comments

Comments
 (0)