-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Provide a fluent API to set up Quarkus Security #16728
Comments
Found in the old PicketLink docucmentation, https://docs.jboss.org/picketlink/2/latest/reference/html-single/, there are some work like this. public class HttpSecurityConfiguration {
public void configureHttpSecurity(@Observes SecurityConfigurationEvent event) {
SecurityConfigurationBuilder builder = event.getBuilder();
builder
.http()
.forPath("/*.jsf")
.authenticateWith()
.form()
.loginPage("/login.jsf")
.errorPage("/loginFailed.jsf")
.forPath("/admin/*")
.authorizeWith()
.role("Administrator");
}
} |
@michalvavrik This one would have a very good impact, so among all the issues you may want to choose from, that would be most interesting IMHO. |
Sure, thank you for suggestion and nice description. |
closes quarkusio#19162 but mainly this is preparation for quarkusio#16728
closes quarkusio#19162 but mainly this is preparation for quarkusio#16728
closes quarkusio#19162 but mainly this is preparation for quarkusio#16728
Is this still relevant? |
Is there a programmatic config instead of the annotations? |
More importantly, it is next to impossible. It either requires:
Yeah, but it really doesn't go down with intention to do as much as possible at build time. The reason why I didn't move on this is that any implementation will not provide you will level of programmatic config that Spring and other FWs because you won't be able to inject stuff and only with difficulty access existing config properties (you need to avoid circular reference). Anyway, this is on my list. |
For security annotations, the reason I dislike it is it will affect my APIs testing when applying them on Rest API methods. In Spring, I can ignore the security config when focusing on API development and testing. And Quarkus security annotation is not flexible for applying a fine-grained security rule on URIs, in some of my past projects, simple role/group/permission can not satisfy the security requirements. In spring security it is easy to control security on a URI path via custom codes to decide if it is authorized. .antMatchers(HttpMethod.DELETE, "/posts/**").access(AuthencationContext, xxx -> a callback) |
Or provides an article to describe how to apply the fine-grained security control using the existing features provided in Quarkus 3.x. |
Check the current security docs, the security control is still based on annotations, and provide limited extension points. |
I hear you @hantsy. I have other issues with higher priority on my list, therefore I removed myself from this issue until they are done. Maybe someone else will pick it up. Thanks. |
I believe now that most of the |
Description
Hantsy Bai has linked to the following Spring Security example:
While we can do it with combining HttpAuthenticationMechanism/IdentityProvider and configuration, supporting something similar to the above in Quarkus can be of interest
Also CC @stuartwdouglas
The text was updated successfully, but these errors were encountered: