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

Docs - Add missing steps to Basic authentication how-to #37121

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

michelle-purcell
Copy link
Contributor

@michelle-purcell michelle-purcell commented Nov 15, 2023

The QE review of 3.2.8 product docs highlighted some missing content that would be helpful for folks unfamiliar with enabling Basic authentication in Quarkus.

This PR:

  • Enhances the prereq to clarify two extensions that can be used to enable Basic authentication.
  • Adds a new step (number 2) for setting the configuration option (quarkus.security.users.embedded.enabled=true) , which is needed to enable the security via the embedded realm.

👀 @jsmrcka & @sberyozkin (REF QUARKUS-3651)

@quarkus-bot quarkus-bot bot added area/docstyle issues related for manual docstyle review area/documentation labels Nov 15, 2023
@michelle-purcell
Copy link
Contributor Author

@sberyozkin, @rsvoboda - Please review and approve these doc updates for both the main and 3.2 branches.
Thank you.

+
[source,properties]
----
security.users.embedded.enabled=true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry Michelle but I'm not sure we need to highlight this property at all, I don't recall ever using it for tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is enabled by default I guess, so may be below it works but if if it is enabled by default then it is 1 extra property to configure

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the noise, if you'd like to highlight then it is fine, but IMHO it it should all be again done below, otherwise it reads as if it can be used outside of the testing, which it technically can be but we don't recommend it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is false - see https://quarkus.io/guides/all-config#quarkus-elytron-security-properties-file_quarkus.security.users.embedded.enabled

I think it's fine to have the property just in the example bellow. IMHO no need to highlight this property in this separate part

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to @rsvoboda's suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sberyozkin , @rsvoboda , @jsmrcka

Thank you for your input and reviews on this bit too.

I think we have to keep in mind that the person reading this introductory-level how-to topic is likely to be new to Quarkus and is therefore likely 'playing' in a test environment. So while we don't recommend it for production, +1 to keeping it in and being consistent elsewhere.

I made some adjustments to the procedure to highlight that some configuration steps are purely for testing purposes. How does this look now?

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rsvoboda & @jsmrcka - I also propose that we diverge in the product version a little and either:

  • Add a support note to the prereq section to highlight the extensions that we don't support
  • Remove the extension altogether from the list in the product version

( @tqvarnst @inoxx03 & @[email protected] FYI)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prereq section should be sufficient, otherwise we would need to drop all 3 mentioned extensions :)

+
[source,properties]
----
security.users.embedded.enabled=true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is false - see https://quarkus.io/guides/all-config#quarkus-elytron-security-properties-file_quarkus.security.users.embedded.enabled

I think it's fine to have the property just in the example bellow. IMHO no need to highlight this property in this separate part

@sberyozkin
Copy link
Member

Thanks Michelle, I was a bit tired yesterday so forgot I was using that property everywhere :-)

@quarkus-bot quarkus-bot bot added area/dependencies Pull requests that update a dependency file area/kubernetes area/tracing area/vertx labels Nov 16, 2023
@sberyozkin
Copy link
Member

@rsvoboda I believe your change request can be dropped now ? Please merge once you are happy with the updates

@sheilamjones sheilamjones self-requested a review November 16, 2023 11:09
@rsvoboda
Copy link
Member

@rsvoboda I believe your change request can be dropped now ? Please merge once you are happy with the updates

Thanks for the updates, approved

Copy link
Contributor

@jsmrcka jsmrcka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more comment from me, otherwise looks good.

* 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`)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link is probably broken. It should be IMO xref:security-jpa.adoc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link is not broken. Question is, if the author wants to have that rendered Name for the xref link.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sberyozkin , @jsmrcka , @rsvoboda , @MichalMaler - Thanks all for reviewing 💚

I fixed the broken link! I couldn't decide whether the tutorial or concept for JPA worked best so I accidently combined both. Apologies for the churn. It is now fixed. Thanks!

@rsvoboda
Copy link
Member

rsvoboda commented Nov 16, 2023

@sberyozkin I would say this can be merged now
Josef spotted an issue, this needs fix

Copy link

github-actions bot commented Nov 16, 2023

🎊 PR Preview 64d9892 has been successfully built and deployed to https://quarkus-pr-main-37121-preview.surge.sh/version/main/guides/

@MichalMaler
Copy link
Contributor

Just an little nitpick for the == Next steps of the security-basic-authentication-howto.adoc.
Not even putting it as a suggestion so just have a look if time n mood :).

== Next steps

For a more detailed walk-through showing you how to configure Basic authentication with Jakarta Persistence for storing user credentials in a database, see the xref:security-getting-started-tutorial.adoc[Getting Started with Security using Basic authentication and Jakarta Persistence] guide.

@sberyozkin
Copy link
Member

@michelle-purcell , Michelle, something did not work with the rebase , 5 commits are shown

@michelle-purcell michelle-purcell force-pushed the doc-qe-fix-security-ba branch 2 times, most recently from ed15fb7 to 12ae479 Compare November 16, 2023 14:32
SME and QE fixes

fix bullet

fix bad link

Fix xref
@michelle-purcell
Copy link
Contributor Author

@sberyozkin - Thanks so much for flagging. Sorry b2b in mtgs... My git world is all caught up now (I hope!). Think we are ready to merge?!

@rsvoboda rsvoboda self-requested a review November 16, 2023 15:03
@rsvoboda rsvoboda merged commit 36a05b2 into quarkusio:main Nov 16, 2023
5 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.7 - main milestone Nov 16, 2023
@michelle-purcell
Copy link
Contributor Author

Thanks @rsvoboda 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

7 participants