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

1.10.5 backports 1 #13930

Merged
merged 3 commits into from
Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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