Skip to content

Commit

Permalink
Minor updates to the Getting Started with Security doc
Browse files Browse the repository at this point in the history
(cherry picked from commit 1a7f963)
  • Loading branch information
sberyozkin authored and aloubyansky committed Sep 20, 2024
1 parent fd28e55 commit e2e247b
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions docs/src/main/asciidoc/security-getting-started-tutorial.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,12 @@ Start by adding the following dependencies to your test project:
testImplementation("io.rest-assured:rest-assured")
----

* To run your application in dev mode:
To run your application in dev mode:

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


* The following properties configuration demonstrates how to enable PostgreSQL testing to run only in production (`prod`) mode.
The following properties configuration demonstrates how to enable PostgreSQL testing to run only in production (`prod`) mode.
In this scenario, `Dev Services for PostgreSQL` launches and configures a `PostgreSQL` test container.

[source,properties]
Expand All @@ -424,9 +424,9 @@ In this scenario, `Dev Services for PostgreSQL` launches and configures a `Postg
quarkus.hibernate-orm.database.generation=drop-and-create
----

* If you add the `%prod.` profile prefix, data source properties are not visible to `Dev Services for PostgreSQL` and are only observed by an application running in production mode.
If you add the `%prod.` profile prefix, data source properties are not visible to `Dev Services for PostgreSQL` and are only observed by an application running in production mode.

* To write the integration test, use the following code sample:
To write the integration test, use the following code sample:

[source,java]
----
Expand Down Expand Up @@ -503,15 +503,19 @@ While developing your application, you can add and run tests individually by usi
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
== Test your application using Curl or browser

Check warning on line 506 in docs/src/main/asciidoc/security-getting-started-tutorial.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'by using' or 'that uses' rather than 'using'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'by using' or 'that uses' rather than 'using'.", "location": {"path": "docs/src/main/asciidoc/security-getting-started-tutorial.adoc", "range": {"start": {"line": 506, "column": 25}}}, "severity": "INFO"}

To test your application using Curl or the browser, you must first start a PostgreSQL server, then compile and run your application either in JVM or native mode.

Check warning on line 508 in docs/src/main/asciidoc/security-getting-started-tutorial.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'by using' or 'that uses' rather than 'using'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'by using' or 'that uses' rather than 'using'.", "location": {"path": "docs/src/main/asciidoc/security-getting-started-tutorial.adoc", "range": {"start": {"line": 508, "column": 25}}}, "severity": "INFO"}

=== Start the PostgreSQL server

Check warning on line 510 in docs/src/main/asciidoc/security-getting-started-tutorial.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.HeadingPunctuation] Do not use end punctuation in headings. Raw Output: {"message": "[Quarkus.HeadingPunctuation] Do not use end punctuation in headings.", "location": {"path": "docs/src/main/asciidoc/security-getting-started-tutorial.adoc", "range": {"start": {"line": 510, "column": 1}}}, "severity": "INFO"}

* Use the following example to start the PostgreSQL server:
[source,bash]
----
docker run --rm=true --name security-getting-started -e POSTGRES_USER=quarkus \
-e POSTGRES_PASSWORD=quarkus -e POSTGRES_DB=quarkus \
-p 5432:5432 postgres:14.1
----

=== Compile and run the application

Check warning on line 519 in docs/src/main/asciidoc/security-getting-started-tutorial.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.HeadingPunctuation] Do not use end punctuation in headings. Raw Output: {"message": "[Quarkus.HeadingPunctuation] Do not use end punctuation in headings.", "location": {"path": "docs/src/main/asciidoc/security-getting-started-tutorial.adoc", "range": {"start": {"line": 519, "column": 1}}}, "severity": "INFO"}

* Compile and run your Quarkus application by using one of the following methods:
Expand Down Expand Up @@ -546,7 +550,7 @@ include::{includes}/devtools/build-native.adoc[]
----
====

=== Access and test the application security
=== Access and test the application security with Curl

Check warning on line 553 in docs/src/main/asciidoc/security-getting-started-tutorial.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.HeadingPunctuation] Do not use end punctuation in headings. Raw Output: {"message": "[Quarkus.HeadingPunctuation] Do not use end punctuation in headings.", "location": {"path": "docs/src/main/asciidoc/security-getting-started-tutorial.adoc", "range": {"start": {"line": 553, "column": 1}}}, "severity": "INFO"}

When your application is running, you can access its endpoints by using one of the following Curl commands.

Expand Down Expand Up @@ -596,11 +600,9 @@ admin

You can also access the same endpoint URLs by using a browser.

[NOTE]
====
If you use a browser to connect to a protected resource anonymously, a Basic authentication form displays, prompting you to enter credentials.
====
=== Access and test the application security with the browser

Check warning on line 603 in docs/src/main/asciidoc/security-getting-started-tutorial.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.HeadingPunctuation] Do not use end punctuation in headings. Raw Output: {"message": "[Quarkus.HeadingPunctuation] Do not use end punctuation in headings.", "location": {"path": "docs/src/main/asciidoc/security-getting-started-tutorial.adoc", "range": {"start": {"line": 603, "column": 1}}}, "severity": "INFO"}

If you use a browser to connect to a protected resource anonymously, a Basic authentication form displays, prompting you to enter credentials.

=== Results

Expand Down

0 comments on commit e2e247b

Please sign in to comment.