Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10334 from gsmet/security-config
Make Elytron Security extensions config overridable at runtime
- Loading branch information
Showing
13 changed files
with
166 additions
and
113 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
27 changes: 27 additions & 0 deletions
27
...untime/src/main/java/io/quarkus/elytron/security/jdbc/JdbcSecurityRealmRuntimeConfig.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,27 @@ | ||
package io.quarkus.elytron.security.jdbc; | ||
|
||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
|
||
/** | ||
* A configuration object for a jdbc based realm configuration, | ||
* {@linkplain org.wildfly.security.auth.realm.jdbc.JdbcSecurityRealm} | ||
*/ | ||
@ConfigRoot(name = "security.jdbc", phase = ConfigPhase.RUN_TIME) | ||
public class JdbcSecurityRealmRuntimeConfig { | ||
|
||
/** | ||
* The principal-queries config | ||
*/ | ||
@ConfigItem(name = "principal-query") | ||
public PrincipalQueriesConfig principalQueries; | ||
// https://github.com/wildfly/wildfly-core/blob/master/elytron/src/test/resources/org/wildfly/extension/elytron/security-realms.xml#L18 | ||
|
||
@Override | ||
public String toString() { | ||
return "JdbcRealmConfig{" + | ||
"principalQueries=" + principalQueries + | ||
'}'; | ||
} | ||
} |
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
33 changes: 33 additions & 0 deletions
33
...c/main/java/io/quarkus/elytron/security/ldap/config/LdapSecurityRealmBuildTimeConfig.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,33 @@ | ||
package io.quarkus.elytron.security.ldap.config; | ||
|
||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
|
||
/** | ||
* A configuration object for a LDAP based realm configuration, | ||
* {@linkplain org.wildfly.security.auth.realm.ldap.LdapSecurityRealm} | ||
*/ | ||
@ConfigRoot(name = "security.ldap", phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) | ||
public class LdapSecurityRealmBuildTimeConfig { | ||
|
||
/** | ||
* The option to enable the ldap elytron module | ||
*/ | ||
@ConfigItem | ||
public boolean enabled; | ||
|
||
/** | ||
* The elytron realm name | ||
*/ | ||
@ConfigItem(defaultValue = "Quarkus") | ||
public String realmName; | ||
|
||
@Override | ||
public String toString() { | ||
return "LdapSecurityRealmBuildTimeConfig{" + | ||
"enabled=" + enabled + | ||
", realmName='" + realmName + '\'' + | ||
'}'; | ||
} | ||
} |
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
Oops, something went wrong.