Skip to content

Commit

Permalink
Update security-properties.adoc
Browse files Browse the repository at this point in the history
  • Loading branch information
c15yi authored Aug 29, 2024
1 parent 4085dbd commit 96c3402
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions docs/src/main/asciidoc/security-properties.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,13 @@ They are configured with properties starting with
.Example of the `application.properties` file section for property files realm
[source,properties]
----
quarkus.http.auth.basic=true <1>
quarkus.security.users.file.enabled=true
quarkus.security.users.file.enabled=true <1>
quarkus.security.users.file.users=test-users.properties
quarkus.security.users.file.roles=test-roles.properties
quarkus.security.users.file.realm-name=MyRealm
quarkus.security.users.file.plain-text=true
----
<1> To enable basic auth you have to enable it with this option.
<1> If no other authentication method is specified, this will enable basic auth. Otherwise you will need to also add `quarkus.http.auth.basic=true`

Check warning on line 57 in docs/src/main/asciidoc/security-properties.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.CaseSensitiveTerms] Use 'Basic HTTP authentication (first instance)' or 'Basic authentication' rather than 'basic auth'. Raw Output: {"message": "[Quarkus.CaseSensitiveTerms] Use 'Basic HTTP authentication (first instance)' or 'Basic authentication' rather than 'basic auth'.", "location": {"path": "docs/src/main/asciidoc/security-properties.adoc", "range": {"start": {"line": 57, "column": 70}}}, "severity": "INFO"}

Check warning on line 57 in docs/src/main/asciidoc/security-properties.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsWarnings] Consider using 'Basic HTTP authentication (first instance)' or 'Basic authentication' rather than 'basic auth' unless updating existing content that uses the term. Raw Output: {"message": "[Quarkus.TermsWarnings] Consider using 'Basic HTTP authentication (first instance)' or 'Basic authentication' rather than 'basic auth' unless updating existing content that uses the term.", "location": {"path": "docs/src/main/asciidoc/security-properties.adoc", "range": {"start": {"line": 57, "column": 70}}}, "severity": "WARNING"}

Check warning on line 57 in docs/src/main/asciidoc/security-properties.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Fluff] Depending on the context, consider using 'Rewrite the sentence, or use 'must', instead of' rather than 'need to'. Raw Output: {"message": "[Quarkus.Fluff] Depending on the context, consider using 'Rewrite the sentence, or use 'must', instead of' rather than 'need to'.", "location": {"path": "docs/src/main/asciidoc/security-properties.adoc", "range": {"start": {"line": 57, "column": 101}}}, "severity": "INFO"}

==== Users.properties

Expand Down Expand Up @@ -102,8 +101,7 @@ The following is an example application.properties file section illustrating the
.Example of the `application.properties` file section for embedded realm
[source,properties]
----
quarkus.http.auth.basic=true <1>
quarkus.security.users.embedded.enabled=true
quarkus.security.users.embedded.enabled=true <1>
quarkus.security.users.embedded.plain-text=true
quarkus.security.users.embedded.users.scott=jb0ss
quarkus.security.users.embedded.users.stuart=test
Expand All @@ -114,7 +112,7 @@ quarkus.security.users.embedded.roles.stuart=admin,user
quarkus.security.users.embedded.roles.jdoe=NoRolesUser
quarkus.security.users.embedded.roles.noadmin=user
----
<1> To enable basic auth you have to enable it with this option.
<1> If no other authentication method is specified, this will enable basic auth. Otherwise you will need to also add `quarkus.http.auth.basic=true`

Check warning on line 115 in docs/src/main/asciidoc/security-properties.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsWarnings] Consider using 'Basic HTTP authentication (first instance)' or 'Basic authentication' rather than 'basic auth' unless updating existing content that uses the term. Raw Output: {"message": "[Quarkus.TermsWarnings] Consider using 'Basic HTTP authentication (first instance)' or 'Basic authentication' rather than 'basic auth' unless updating existing content that uses the term.", "location": {"path": "docs/src/main/asciidoc/security-properties.adoc", "range": {"start": {"line": 115, "column": 70}}}, "severity": "WARNING"}

Check warning on line 115 in docs/src/main/asciidoc/security-properties.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.CaseSensitiveTerms] Use 'Basic HTTP authentication (first instance)' or 'Basic authentication' rather than 'basic auth'. Raw Output: {"message": "[Quarkus.CaseSensitiveTerms] Use 'Basic HTTP authentication (first instance)' or 'Basic authentication' rather than 'basic auth'.", "location": {"path": "docs/src/main/asciidoc/security-properties.adoc", "range": {"start": {"line": 115, "column": 70}}}, "severity": "INFO"}

Check warning on line 115 in docs/src/main/asciidoc/security-properties.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Fluff] Depending on the context, consider using 'Rewrite the sentence, or use 'must', instead of' rather than 'need to'. Raw Output: {"message": "[Quarkus.Fluff] Depending on the context, consider using 'Rewrite the sentence, or use 'must', instead of' rather than 'need to'.", "location": {"path": "docs/src/main/asciidoc/security-properties.adoc", "range": {"start": {"line": 115, "column": 101}}}, "severity": "INFO"}

As with the first example, this file has usernames and passwords stored in plain text, which is not recommended. If plain text is set to false (or omitted) in the config, then passwords must be stored in the form `MD5 ( username : realm : password )`.
This can be generated for the first example above by running the command `echo -n scott:MyRealm:jb0ss | md5` from the command line.
Expand Down

0 comments on commit 96c3402

Please sign in to comment.