Skip to content

Commit

Permalink
Merge pull request #13930 from gsmet/1.10.5-backports-1
Browse files Browse the repository at this point in the history
1.10.5 backports 1
  • Loading branch information
gsmet committed Dec 16, 2020
2 parents 724f51f + 50f88c5 commit 990537b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,10 @@ private void copyJarSourcesToLib(OutputTargetBuildItem outputTargetBuildItem,
Path targetDirectory = outputTargetBuildItem.getOutputDirectory()
.resolve(outputTargetBuildItem.getBaseName() + "-native-image-source-jar");
Path libDir = targetDirectory.resolve(JarResultBuildStep.LIB);
File libDirFile = libDir.toFile();
if (!libDirFile.exists()) {
libDirFile.mkdirs();
}

final List<AppDependency> appDeps = curateOutcomeBuildItem.getEffectiveModel().getUserDependencies();
for (AppDependency appDep : appDeps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.quarkus.runtime.annotations.ConvertWith;
import io.quarkus.runtime.configuration.TrimmedStringConverter;

/**
* Configuration information used to populate a {@linkplain org.wildfly.security.auth.realm.SimpleMapBackedSecurityRealm}
Expand Down Expand Up @@ -35,13 +37,15 @@ public class MPRealmRuntimeConfig {
* See <a href="#embedded-users">Embedded Users</a>.
*/
@ConfigItem(defaultValueDocumentation = "none")
@ConvertWith(TrimmedStringConverter.class)
public Map<String, String> users;

/**
* The realm roles user1=role1,role2,...\nuser2=role1,role2,... mapping
* See <a href="#embedded-roles">Embedded Roles</a>.
*/
@ConfigItem(defaultValueDocumentation = "none")
@ConvertWith(TrimmedStringConverter.class)
public Map<String, String> roles;

}
Original file line number Diff line number Diff line change
Expand Up @@ -250,17 +250,9 @@ private MergedSettings mergeSettings(PersistenceUnitDescriptor persistenceUnit)
}
cfg.put(WRAP_RESULT_SETS, "false");

//Hibernate Envers requires XML_MAPPING_ENABLED to be activated, but we don't want to enable this for any other use:
if (isEnversPresent) {
if (readBooleanConfigurationValue(cfg, XML_MAPPING_ENABLED)) {
LOG.warn(
"XML mapping is not supported. It will be partially activated to allow compatibility with Hibernate Envers, but this support is temporary");
}
} else {
if (readBooleanConfigurationValue(cfg, XML_MAPPING_ENABLED)) {
LOG.warn("XML mapping is not supported. Setting " + XML_MAPPING_ENABLED + " to false.");
}
cfg.put(XML_MAPPING_ENABLED, "false");
if (readBooleanConfigurationValue(cfg, XML_MAPPING_ENABLED)) {
LOG.warn(
"XML mapping is not supported. It will be partially activated to allow compatibility with Hibernate Envers, but this support is temporary");
}

// Note: this one is not a boolean, just having the property enables it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConvertWith;
import io.quarkus.runtime.configuration.TrimmedStringConverter;

@ConfigGroup
public class PolicyConfig {
Expand All @@ -12,5 +14,6 @@ public class PolicyConfig {
* The roles that are allowed to access resources protected by this policy
*/
@ConfigItem
@ConvertWith(TrimmedStringConverter.class)
public List<String> rolesAllowed;
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
quarkus.security.users.embedded.enabled=true
quarkus.security.users.embedded.users.john=john
quarkus.security.users.embedded.roles.john=employees
quarkus.security.users.embedded.users.mary=mary
quarkus.security.users.embedded.roles.mary=managers
#note that the spaces after the usernames and roles are deliberate
#to verify that they are trimmed correctly
quarkus.security.users.embedded.users.john=john
quarkus.security.users.embedded.roles.john=employees
quarkus.security.users.embedded.users.mary=mary
quarkus.security.users.embedded.roles.mary=managers
quarkus.security.users.embedded.users.poul=poul
quarkus.security.users.embedded.roles.poul=interns
quarkus.security.users.embedded.plain-text=true
Expand Down

0 comments on commit 990537b

Please sign in to comment.