Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor updates to the Getting Started with Security doc #43343

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@
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,16 +503,20 @@
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:
** JVM mode
Expand Down Expand Up @@ -546,7 +550,7 @@
----
====

=== 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 @@

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