Skip to content

Commit

Permalink
Docs - Add missing steps to Basic authentication how-to
Browse files Browse the repository at this point in the history
SME and QE fixes
  • Loading branch information
michelle-purcell committed Nov 16, 2023
1 parent 2c45aa6 commit f83639d
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions docs/src/main/asciidoc/security-basic-authentication-howto.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,39 @@ Enable xref:security-basic-authentication.adoc[Basic authentication] for your Qu

== Prerequisites

* You have installed at least one extension that provides an `IdentityProvider` based on username and password, such as xref:security-jdbc.adoc[Elytron JDBC].
* You have installed at least one extension that provides an `IdentityProvider` based on username and password.
For example:

* xref:security-basic-authentication-tutorialsecurity-jpa.adoc[Quarkus Security Jakarta Persistence extensions (`security-jpa` or `security-jpa-reactive`)]
* xref:security-properties.adoc[Elytron security properties file extension `(quarkus-elytron-security-properties-file)`]
* xref:security-jdbc.adoc[Elytron security JDBC extension `(quarkus-elytron-security-jdbc)`]

The following procedure outlines how you can enable Basic authentication for your application by using the `elytron-security-properties-file` extension.

== Procedure

. Enable Basic authentication by setting the `quarkus.http.auth.basic` property to `true`.
. In the `application.properties` file, set the `quarkus.http.auth.basic` property to `true`.
+
[source,properties]
----
quarkus.http.auth.basic=true
----

. For testing purposes, you can configure the required user credentials, user name, secret, and roles, in the `application.properties` file.
. **Optional:** In a non-production environment only and purely for testing Quarkus Security in your applications:
.. To enable authentication for the embedded realm, set the `quarkus.security.users.embedded.enabled` property to `true`.
+
[source,properties]
----
security.users.embedded.enabled=true
----

.. You can also configure the required user credentials, user name, secret, and roles.
For example:
+
[source,properties]
----
quarkus.http.auth.basic=true
quarkus.security.users.embedded.enabled=true
quarkus.security.users.embedded.plain-text=true
quarkus.security.users.embedded.users.alice=alice <1>
quarkus.security.users.embedded.users.bob=bob <2>
Expand Down

0 comments on commit f83639d

Please sign in to comment.