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

Added necessary basic auth option to examples #42812

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Conversation

c15yi
Copy link
Contributor

@c15yi c15yi commented Aug 27, 2024

No description provided.

This comment has been minimized.

Copy link

github-actions bot commented Aug 27, 2024

🙈 The PR is closed and the preview is expired.

@sberyozkin
Copy link
Member

@c15yi Hi, as far as I recall, basic authentication is enabled by default if it is the only authentication mechanism around, are those specific examples do not work if you don't use anything else like oidc ? That said, rather than trying to save on not typing that property, it is worth being explicit about enabling it

@sberyozkin
Copy link
Member

@michalvavrik Hi Michal, I think it is OK to encourage users to enable basic authentication with the property even if it may not be necessary, as it can be a bit confusing otherwise, for example, it works now but then stops working the moment you added another mechanism, what do you think ?

@michalvavrik
Copy link
Member

@michalvavrik Hi Michal, I think it is OK to encourage users to enable basic authentication with the property even if it may not be necessary, as it can be a bit confusing otherwise, for example, it works now but then stops working the moment you added another mechanism, what do you think ?

I'd expect basic auth to be implicitly enabled, however it depends on user extensions / configuration. I don't know other mechanisms present. Problem I can see with changes is that this security-properties-file is about providing users/pwd/roles to Elytron identity provider. And they can be used by basic auth, form auth, custom auth accepting username/pwd creds, mTLS. Even token? I think we don't encourage that one.

TL;DR; I think it's fine as long as text makes it clear this is one of options and you have others. IMHO little tweak of added text is necessary.

@sberyozkin
Copy link
Member

@michalvavrik

And they can be used by basic auth, form auth, custom auth accepting username/pwd creds, mTLS

Actually, that is a good point indeed. So I'm not sure what to do with this PR.

@c15yi Did you find you had to enable it because you were combining Basic with OIDC ?

May be we should have a Note added instead here, clarifying that if you use these properties to support Basic authentication mechanism, then you must explicitly enable basic authentication with this property if you also use other authentication mechanisms

@c15yi
Copy link
Contributor Author

c15yi commented Aug 29, 2024

In our project we also use OIDC and basic auth was on top. So I guess, my change in the documentation is not necessary. I didn't know, that basic auth is automatically enabled, but only iff there is no other auth mechanism configured.

I updated my change, to mention the default behaviour.

This comment has been minimized.

@sberyozkin
Copy link
Member

sberyozkin commented Aug 29, 2024

Hi @c15yi Thanks, but I think it needs to be presented differently, add a dedicated Note, you can find a lot of examples how to add Note, and only in that note clarify that `Basic authentication must be explicitly enabled with quarkus.http.basic=true if more than one authentication mechanism is used', there is no need to modify the actual properties, since as @michalvavrik has clarified, the same set of properties can be used for Form and other non Basic mechanisms where a user name and password are available

@gsmet
Copy link
Member

gsmet commented Sep 9, 2024

@sberyozkin any chance you could drive this puppy home before tomorrow evening?

Copy link

quarkus-bot bot commented Sep 17, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 768a266.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@sberyozkin
Copy link
Member

Sorry @gsmet, noticed your ping only now that @c15yi pushed the update, thanks @c15yi 👍

@sberyozkin sberyozkin self-requested a review September 17, 2024 11:40
@sberyozkin sberyozkin merged commit 63cf495 into quarkusio:main Sep 17, 2024
5 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

4 participants