-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ConfigMapping to map duplicated properties and avoid unknown conf…
…ig warning
- Loading branch information
Showing
7 changed files
with
45 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...validator/runtime/src/main/resources/META-INF/services/io.smallrye.config.ConfigValidator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
#io.smallrye.config.validator.BeanValidationConfigValidatorImpl | ||
io.quarkus.hibernate.validator.runtime.HibernateBeanValidationConfigValidator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...untime/src/main/java/io/quarkus/resteasy/reactive/common/runtime/JaxRsSecurityConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package io.quarkus.resteasy.reactive.common.runtime; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
import io.smallrye.config.WithDefault; | ||
import io.smallrye.config.WithName; | ||
|
||
@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) | ||
@ConfigMapping(prefix = "quarkus.security.jaxrs") | ||
public interface JaxRsSecurityConfig { | ||
/** | ||
* if set to true, access to all JAX-RS resources will be denied by default | ||
*/ | ||
@WithName("deny-unannotated-endpoints") | ||
@WithDefault("false") | ||
boolean denyJaxRs(); | ||
|
||
/** | ||
* If no security annotations are affecting a method then they will default to requiring these roles, | ||
* (equivalent to adding an @RolesAllowed annotation with the roles to every endpoint class). | ||
* | ||
* The role of '**' means any authenticated user, which is equivalent to the {@link io.quarkus.security.Authenticated} | ||
* annotation. | ||
*/ | ||
Optional<List<String>> defaultRolesAllowed(); | ||
} |