Skip to content

Commit

Permalink
Merge pull request #37654 from gsmet/fix-dev-mode
Browse files Browse the repository at this point in the history
Make sure dev mode is properly written in doc
  • Loading branch information
gsmet authored Dec 12, 2023
2 parents c8a3c0c + 33a4b25 commit c757c4a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/security-getting-started-tutorial.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,9 @@ As you can see in this code sample, you do not need to start the test container

[NOTE]
====
When you start your application in dev mode, `Dev Services for PostgreSQL` launches a `PostgreSQL` `devmode` container so that you can start developing your application.
When you start your application in dev mode, Dev Services for PostgreSQL launches a PostgreSQL dev mode container so that you can start developing your application.
While developing your application, you can add tests one by one and run them using the xref:continuous-testing.adoc[Continuous Testing] feature.
`Dev Services for PostgreSQL` supports testing while you develop by providing a separate `PostgreSQL` test container that does not conflict with the `devmode` container.
Dev Services for PostgreSQL supports testing while you develop by providing a separate PostgreSQL test container that does not conflict with the dev mode container.
====

=== Use Curl or a browser to test your application
Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/security-oidc-auth0-tutorial.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ public class GreetingResourceTest {
}
----

If you recall, when the application was started in devmode, the following could be seen in the CLI window:
If you recall, when the application was started in dev mode, the following could be seen in the CLI window:

image::auth0-devmode-started.png[Auth0 DevMode started]

Expand Down Expand Up @@ -1075,7 +1075,7 @@ Open a browser, access http://localhost:8080/hello and get the name displayed in

== Troubleshooting

The steps described in this tutorial should work exactly as the tutorial describes. You might have to clear the browser cookies when accessing the updated Quarkus endpoint if you have already completed the authentication. You might need to restart the Quarkus application manually in devmode but it is not expected. If you need help completing this tutorial, you can get in touch with the Quarkus team.
The steps described in this tutorial should work exactly as the tutorial describes. You might have to clear the browser cookies when accessing the updated Quarkus endpoint if you have already completed the authentication. You might need to restart the Quarkus application manually in dev mode but it is not expected. If you need help completing this tutorial, you can get in touch with the Quarkus team.

== Summary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ To make Dev UI more useful for supporting the development of OIDC `web-app` appl
It will ensure that all Dev UI options described in <<develop-service-applications,Developing OpenID Connect Service Applications>> will be available when your `web-app` application is run in dev mode. The limitation of this approach is that both access and ID tokens returned with the code flow and acquired with Dev UI will be sent to the endpoint as HTTP `Bearer` tokens - which will not work well if your endpoint requires the injection of `IdToken`.
However, it will work as expected if your `web-app` application only uses the access token, for example, as a source of roles or to get `UserInfo`, even if it is assumed to be a `service` application in dev mode.

Even a better option is to use a `hybrid` application type in devmode:
Even a better option is to use a `hybrid` application type in dev mode:

[source,properties]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public class CustomTenantResolver implements TenantResolver {

You can define multiple tenants in your configuration file, just make sure they have a unique alias so that you can map them properly when resolving a tenant from your `TenantResolver` implementation.

However, using a static tenant resolution (configuring tenants in `application.properties` and resolving them with `TenantResolver`) prevents testing the endpoint with `Dev Services for Keycloak` since `Dev Services for Keycloak` has no knowledge of how the requests will be mapped to individual tenants and can not dynamically provide tenant-specific `quarkus.oidc.<tenant-id>.auth-server-url` values and therefore using `%prod` prefixes with the tenant-specific URLs in `application.properties` will not work in tests or devmode.
However, using a static tenant resolution (configuring tenants in `application.properties` and resolving them with `TenantResolver`) prevents testing the endpoint with `Dev Services for Keycloak` since `Dev Services for Keycloak` has no knowledge of how the requests will be mapped to individual tenants and can not dynamically provide tenant-specific `quarkus.oidc.<tenant-id>.auth-server-url` values and therefore using `%prod` prefixes with the tenant-specific URLs in `application.properties` will not work in test or dev mode.

[NOTE]
====
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ The pattern of authenticating with a given provider, where the endpoint uses eit

== HTTPS Redirect URL

Some providers will only accept HTTPS-based redirect URLs. Tools such as https://ngrok.com/[ngrok] https://linuxhint.com/set-up-use-ngrok/[can be set up] to help testing such providers with Quarkus endpoints running on localhost in devmode.
Some providers will only accept HTTPS-based redirect URLs. Tools such as https://ngrok.com/[ngrok] https://linuxhint.com/set-up-use-ngrok/[can be set up] to help testing such providers with Quarkus endpoints running on localhost in dev mode.

== Rate Limiting

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/spring-security.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public class GreetingControllerTest {

=== Automatically

Press `r`, while in DevMode, or run the application with:
Press `r`, while in dev mode, or run the application with:

include::{includes}/devtools/test.adoc[]

Expand Down

0 comments on commit c757c4a

Please sign in to comment.