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

Make security.adoc the main Quarkus Security document #10937

Merged
merged 1 commit into from
Jul 28, 2020

Conversation

sberyozkin
Copy link
Member

@sberyozkin sberyozkin commented Jul 23, 2020

Fixes #10694
Fixes #10856
Fixes #10427
Fixes #10361

This PR attempts to re-purpose security.adoc into the main entry page about everything related to Quarkus Security. Right now Googling for Quarkus Security links to security.adoc so it would be good if the users who land on this page can have an immediate high-level picture of what Quarkus Security offers.

Some help from @stuartwdouglas and other colleagues will most likely needed to complete this PR and improve the language where needed.

Note this PR does not aim to change the layout of the docs/etc, the immediate task is to have a central page about the security which does a brief overview of all the security features and links to the specific docs/guides. Further overall doc optimizations can follow independently.

So in this PR:

  • security.adoc provides a brief overview of various sec features and links further. It would be good to have a small diagram in its Architrecture section but we can add it later.
  • All the info related to the authorization is now in security-authorization.adoc (where more can be added as needed)
  • All the info related to the core/built-in authentication (Basic, Form, MTLS) + proactive authentication - is now in security-built-in-authentication.adoc
  • All the info related to the customizations and other useful tips is now in security-customization.adoc
  • All the info related to the testing is in security-testing.adoc

Some sections can be moved around but IMHO it is not a bad start toward consolidating the security documentation.
I'll be off for the next 3 weeks, I'll take care of all the review comments when I get back but it this PR will have been merged by then then it would be great too :-)

@sberyozkin sberyozkin force-pushed the security-doc branch 2 times, most recently from 8647c93 to 9dc4035 Compare July 23, 2020 13:50
Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

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

Found some miinor typos

Copy link
Contributor

@pedroigor pedroigor left a comment

Choose a reason for hiding this comment

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

Much better ...

@sberyozkin
Copy link
Member Author

Hi @gastaldi, @pedroigor thanks for the review so far :-) I'll wait and see if Guillaume , Stuart , Loic and Emmanuel have more comments, re some possible fixes to do with some section placements, etc, cheers

Copy link
Member

@stuartwdouglas stuartwdouglas left a comment

Choose a reason for hiding this comment

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

LGTM

@sberyozkin sberyozkin added this to the 1.7.0 - master milestone Jul 24, 2020
@sberyozkin
Copy link
Member Author

Hi All, I've marked it for 1.7.0.CR1, it will be good if it can make it, there will be time to fix some minor issues if any discovered before 1.7.0.Final.

Copy link
Contributor

@loicmathieu loicmathieu left a comment

Choose a reason for hiding this comment

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

I left a few comments but this is a very good refactoring of the guides !


== HttpAuthenticationMechanism Customization

One can customize `HttpAuthenticationMechanism` by registering an `ApplicationScoped` implementation bean.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why must it be an ApplicationScoped ? Isn't a Singleton working ?
For customization via CDI bean we usually just say something like by providing a CDI bean that implements ... then in the example uses Singleton if possible (no proxy generation) or ApplicationScoped.

Copy link
Member Author

Choose a reason for hiding this comment

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

@loicmathieu I've really no idea, I've only seen ApplicationScoped. Would it work if I say an ApplicationScoped or Singleton ?

Copy link
Contributor

Choose a reason for hiding this comment

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

In fact, better check with @stuartwdouglas if @Singleton will works here. If yes better to suggest people to use this scope.

Copy link
Member Author

@sberyozkin sberyozkin Jul 24, 2020

Choose a reason for hiding this comment

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

@loicmathieu Hi, yeah, I've just updated the line to One can customize HttpAuthenticationMechanism by registering a CDI implementation bean. to avoid mentioning ApplicationScoped, though it is still in the listed example.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good for me. It's a valid implementation so it should not be important

Copy link
Member Author

Choose a reason for hiding this comment

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

@loicmathieu Thanks, if you'd like, please open an issue to investigate running authenticators as Singletons, suppose would be good if it worked for the perf reasons

docs/src/main/asciidoc/security-customization.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/security-testing.adoc Show resolved Hide resolved
@sberyozkin
Copy link
Member Author

Hi @loicmathieu I've resolved 4 comments which I think I have addressed, please reopen if you think more work is needed. I've only left the one related to ApplicationScoped vs Singleton open as I'm not sure what to type there, CC @stuartwdouglas

I'm on PTO from Monday, travelling, so I'm signing off later this evening and won't really have time to look at this issue before Monday.
If it can make it to 1.7.0.CR1 then it would be great (it will close down 4 issues) or I will look at it after 17th Aug to complete: CC @stuartwdouglas @gsmet

Thanks all

Copy link
Contributor

@loicmathieu loicmathieu left a comment

Choose a reason for hiding this comment

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

LGTM, better have it to 1.7 as it's a real great enhancement to the security guide.
My last comment is not very important so you can dismiss it.

@sberyozkin
Copy link
Member Author

Fixed the build issue introduced with my prev commit. I'm holding the merge for now as Guillaume can spot some doc issues immediately :-) and it is a pretty big refactoring. But I'll be away from Monday, so I'd appreciate if someone could merge it before CR1/early next week. Cheers

@gsmet
Copy link
Member

gsmet commented Jul 28, 2020

I'm working on reviewing this and fixing the typos. Will push an update as soon as I'm done.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Nice work overall. I did a full review and fixed some typos and formatting issues.

Ready to go in as soon as CI is green.

@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jul 28, 2020
@gsmet gsmet merged commit abb0c96 into quarkusio:master Jul 28, 2020
@gsmet
Copy link
Member

gsmet commented Jul 28, 2020

Merged! Very nice work @sberyozkin , this is a great improvement!

@sberyozkin sberyozkin deleted the security-doc branch September 16, 2020 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
7 participants