<secure-deployment name="business-central.war"> ^^^^ 'secure-deployment' isn't an allowed element here - single-sign-on

Good morning I am trying to perform an SSO integration (keycloak) with RHPam (JBPM) but when configuring the adapter in JBoss (Wildfly) it throws the following error:
22:02:24,920 INFO [org.wildfly.security] (ServerService Thread Pool -- 15) ELY00001: WildFly Elytron version 1.10.8.Final-redhat-00001
22:02:26,095 ERROR [org.jboss.as.controller] (Controller Boot Thread)
OPVDX001: Validation error in standalone.xml -----------------------------------
|
| 585: </outbound-socket-binding>
| 586: </socket-binding-group>
| 587: <secure-deployment name="business-central.war">
| ^^^^ 'secure-deployment' isn't an allowed element here
|
| Elements allowed here are:
| deployment-overlays management system-properties
| deployments paths vault
| extensions profile
| interfaces socket-binding-group
|
| 588: <realm>Amer</realm>
| 589: <auth-server-url>http://($url-Server)/auth/</auth-server-url>
| 590: <ssl-required>EXTERNAL</ssl-required>
|
| The primary underlying error message was:
| > ParseError at [row,col]:[587,6]
| > Message: WFLYCTL0198: Unexpected element
| > '{urn:jboss:domain:11.0}secure-deployment' encountered
|
|-------------------------------------------------------------------------------
22:02:26,111 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.Confi
gurationPersistenceException: WFLYCTL0085: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:143)
at org.jboss.as.server.ServerService.boot(ServerService.java:387)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:383)
at java.lang.Thread.run(Thread.java:748)
The settings used are the following:
<secure-deployment name="kie-server.war">
<realm>Sykes</realm>
<auth-server-url>http://($urlServer)/auth/</auth-server-url>
<public-client>true</public-client>
<ssl-required>EXTERNAL</ssl-required>
<resource>kie-execution-server</resource>
<verify-token-audience>true</verify-token-audience>
<use-resource-role-mappings>true</use-resource-role-mappings>
</secure-deployment>
someone has an idea what it can be

The error message suggests that the problem is not the contents of your secure-deployment configuration, but its placement. It should likely be put under keycloak subsystem element.

Related

Alfresco Community 7.1 Cannot Authenticate with Keycloak Server when Keycloak use Self Sign Certificate

I have test Alfresco Community 7.1 with Keycloak.
My Keycloak use https (self signed certificate)
My alfresco-global.properties (Alfresco Repository)
authentication.chain=identity-service1:identity-service,alfrescoNtlm1:alfrescoNtlm
identity-service.enable-basic-auth=true
identity-service.authentication.validation.failure.silent=false
identity-service.auth-server-url=https://192.168.10.25/auth
identity-service.realm=guru
identity-service.resource=alfresco-client
identity-service.public-client=true
identity-service.ssl-required=none
csrf.filter.referer=https://192.168.11.22:443
csrf.filter.origin=https://192.168.11.22:443/*
aims.enabled=true
aims.realm=guru
aims.resource=alfresco-client
aims.authServerUrl=https://192.168.10.25/auth
aims.publicClient=true
My share-config-custom.xml (Alfresco Share)
<alfresco-config>
<config evaluator="string-compare" condition="Users" replace="true">
<users>
<username-min-length>2</username-min-length>
<password-min-length>3</password-min-length>
<show-authorization-status>false</show-authorization-status>
</users>
<enable-external-users-panel>false</enable-external-users-panel>
</config>
<config evaluator="string-compare" condition="AIMS">
<enabled>true</enabled>
<realm>guru</realm>
<resource>alfresco-client</resource>
<authServerUrl>https://192.168.10.25/auth</authServerUrl>
<sslRequired>none</sslRequired>
<publicClient>true</publicClient>
</config>
</alfresco-config>
When I start alfresco with docker compose command. It show error like this
alfresco_1 | 2022-03-01 06:41:33,478 WARN [context.support.XmlWebApplicationContext] [main] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patch.updateAdminUserWhenDefault' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-12.23.jar!/alfresco/patch/patch-services-context.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationComponent' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-12.23.jar!/alfresco/subsystems/Authentication/identity-service/identity-service-authentication-context.xml]: Cannot resolve reference to bean 'authenticatorAuthzClient' while setting bean property 'authenticatorAuthzClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticatorAuthzClient': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not obtain configuration from server [https://192.168.10.25/auth/realms/guru/.well-known/uma2-configuration].
alfresco_1 | 2022-03-01 06:41:33,854 INFO [management.subsystems.ChildApplicationContextFactory] [main] Stopping 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
alfresco_1 | 2022-03-01 06:41:33,856 INFO [management.subsystems.ChildApplicationContextFactory] [main] Stopped 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
alfresco_1 | 2022-03-01 06:41:33,866 ERROR [web.context.ContextLoader] [main] Context initialization failed
alfresco_1 | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patch.updateAdminUserWhenDefault' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-12.23.jar!/alfresco/patch/patch-services-context.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationComponent' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-12.23.jar!/alfresco/subsystems/Authentication/identity-service/identity-service-authentication-context.xml]: Cannot resolve reference to bean 'authenticatorAuthzClient' while setting bean property 'authenticatorAuthzClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticatorAuthzClient': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not obtain configuration from server [https://192.168.10.25/auth/realms/guru/.well-known/uma2-configuration].
[Alfresco Repository Error]
: https://i.stack.imgur.com/4yHl4.jpg
[Alfreso Share Error][1]
: https://i.stack.imgur.com/FePSJ.jpg
But if I use another Keycloak Server on Public Cloud with Valid Certificate (Lets Encrypt) It can work without problem.
My Question is, How to configure alfresco to use with Keycloak Internal Server which use Self Sign Certificate.
Thank you

WildFly server issue duplicate data sources

I'm running an application on WildFly server version 19.0.0.Final on CentOS 7. This application was working fine, but I run this almost 2 months later, and I'm getting this error where I didn't find any duplicate data sources in standalone.xml
14:21:06,641 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "application.war")]) - failure description: "WFLYCTL0212: Duplicate resource [("deployment" => "application.war")]"
14:21:06,647 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
From the stack trace which you have provided, it seems the issue is related to the deployment and not related to the data source.
if multiple deployment-scanner are defined then make sure that they are pointing to different locations
If Multiple deployment-scanner would be defined pointing to the same path or parent directory's path, which results in multiple deployment attempts of the same war file causing the exception.

Deploy a KJAR to KIE execution server programmatically via REST API

I want to know if it is possible to deploy a KJAR to the execution server programmatically (via API)?
I can build a KJAR using the following:
final KieServices kieServices = KieServices.Factory.get();
final KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
kieFileSystem.write("src/main/resources/" + ClassUtils.convertClassNameToResourcePath(getPackageNameForRule(rule.getValue())) + "/" + rule
.getCode() + ".drl", rule.getValue());
return kieServices.newKieBuilder(kieFileSystem).buildAll().getKieModule().getReleaseId();
and I can also create a container in the KIE execution server through the REST KieServicesClient like this:
KieContainerResource kieContainerResource =
new KieContainerResource(containerId, new org.kie.server.api.model.ReleaseId(buildNewReleaseId()));
kieServicesClient.createContainer(containerId, kieContainerResource);
but when I do so I get an exception in the KIE server saying that:
kie-server | 10:54:04,192 ERROR [org.kie.server.services.impl.KieServerImpl] (default task-2) Error creating container 'targeting' for module 'org.default:artifact:1.0.0': java.lang.RuntimeException: Cannot find KieModule: org.default:artifact:1.0.0
kie-server | at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:186)
kie-server | at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:176)
kie-server | at org.kie.server.services.impl.KieServerImpl.createContainer(KieServerImpl.java:275)
kie-server | at org.kie.server.remote.rest.common.resource.KieServerRestImpl.createContainer(KieServerRestImpl.java:157)
kie-server | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
kie-server | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
kie-server | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
kie-server | at java.lang.reflect.Method.invoke(Method.java:498)
kie-server | at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
kie-server | at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:509)
My KIE server is running in a docker container. Do I have to programmatically invoke Maven to deploy my KJAR in the repository inside the docker container? I hope there's an API to do this programmatically. Also how does the Drools Workbench do it?
I found it. There's an API in org.kie.soup:kie-soup-maven-integration which one can use like this:
MavenRepository repository = getMavenRepository();
if (remote) {
RemoteRepository remoteRepository = new RemoteRepository.Builder("id", "type", "url").build();
repository.deployArtifact(remoteRepository, releaseId, kjar, pom);
} else {
repository.installArtifact(releaseId, kjar, pom);
}

Unable to deploy ear on Wildfly 9

I am facing un-expected issue in Wildfly server 9.0.1. some times server runs , some times it throws following error. I searched a lot, some forums saying remove the breakpoints, i tried that also, but no luck
19:05:01,953 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0348: Timeout after [300] seconds waiting for service container stability. Operation will roll back. Step that first updated the service container was 'add' at address '[
("core-service" => "management"),
("management-interface" => "http-interface")
]'
19:05:01,991 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 105) WFLYUT0022: Unregistered web context: /pages
19:05:06,960 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.server.DeployerChainAddHandler$FinalRuntimeStepHandler#127cc34a for operation {"operation" => "add-deployer-chains","address" => []} at address [] failed handling operation rollback -- java.util.concurrent.TimeoutException: java.util.concurrent.TimeoutException
at org.jboss.as.controller.OperationContextImpl.waitForRemovals(OperationContextImpl.java:396)
at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1384)
at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1332)
at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1292)
at org.jboss.as.controller.AbstractOperationContext$Step.access$300(AbstractOperationContext.java:1180)
at org.jboss.as.controller.AbstractOperationContext.handleContainerStabilityFailure(AbstractOperationContext.java:964)
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:590)
at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:354)
at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:330)
at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1183)
at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:453)
at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:327)
at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:313)
at org.jboss.as.server.ServerService.boot(ServerService.java:384)
at org.jboss.as.server.ServerService.boot(ServerService.java:359)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271)
at java.lang.Thread.run(Thread.java:745)
19:05:06,961 ERROR [org.jboss.as.controller.client] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.server.DeployerChainAddHandler$FinalRuntimeStepHandler#127cc34a for operation {"operation" => "add-deployer-chains","address" => []} at address [] failed handling operation rollback -- java.util.concurrent.TimeoutException
19:05:11,965 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.domain.management.security.SecurityRealmAddHandler$ServiceInstallStepHandler#5b91c037 for operation {"address" => [("core-service" => "management"),("security-realm" => "ApplicationRealm")],"operation" => "add","map-groups-to-roles" => undefined} at address [
("core-service" => "management"),
("security-realm" => "ApplicationRealm")
] failed handling operation rollback -- java.util.concurrent.TimeoutException: java.util.concurrent.TimeoutException
at org.jboss.as.controller.OperationContextImpl.waitForRemovals(OperationContextImpl.java:396)
at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1384)
at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1332)
at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1307)
at org.jboss.as.controller.AbstractOperationContext$Step.access$300(AbstractOperationContext.java:1180)
at org.jboss.as.controller.AbstractOperationContext.handleContainerStabilityFailure(AbstractOperationContext.java:964)
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:590)
at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:354)
at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:330)
at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1183)
at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:453)
at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:327)
at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:313)
at org.jboss.as.server.ServerService.boot(ServerService.java:384)
at org.jboss.as.server.ServerService.boot(ServerService.java:359)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271)
at java.lang.Thread.run(Thread.java:745)
It looks like your server is taking too long to boot and deploy. Try increasing the deployment scanner time out and/or adjusting system property "jboss.as.management.blocking.timeout".
Changing the deployment scanner timeout as referenced here Deployment Scanner configuration
Attribute: deployment-timeout
Type: LONG
Description: Timeout, in seconds, a deployment is allows to execute before being canceled. The default is 60 seconds.
Also note, I did find these after I started looking for how to adjust things for you so they will help to explain things further.
Wildfly 10 1 stopd deployment after deploying and How to reduce the time taken for wildfly to deploy My original source for the answer was gleamed from the JBoss Forums.
Sometimes a timeout exception is simply a timeout exception. Depending on the nature of the deployment you can increase the timeout and see if this helps. e.g. increase the deployment-timeout setting from the default to 10 minutes (600 seconds).
edit standalone.xml and change the deployment-scanner to something like this.
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="600"/>
</subsystem>

Wildfly error start

I got some issues with Wildfly.
I got this Exception but I don't know how to fix it...
I don't know what I could do know to fix this Problem...
.......................
21:58:09,529 INFO [org.jboss.modules] JBoss Modules version 1.3.0.Final
21:58:11,357 INFO [org.jboss.msc] JBoss MSC version 1.2.1.Final
21:58:12,201 INFO [org.jboss.as] JBAS015899: WildFly 8.0.1.Final-SNAPSHOT "WildFly" starting
21:58:21,545 INFO [org.jboss.as.server.deployment.scanner] JBAS015014: Re-attempting
failed deployment filesDB.war
21:58:21,545 INFO [org.jboss.as.server.deployment.scanner] JBAS015003: Found fi
lesDb.war in deployment directory. To trigger deployment create a file called fi
lesDb.war.dodeploy
21:58:23,733 ERROR [org.jboss.as.controller.management-operation] JBAS014612: Op
eration ("add") failed - address: ([("core-service" => "vault")]): java.lang.Run
timeException: JBAS015804: Error initializing vault -- org.jboss.as.server.serv
ices.security.VaultReaderException: JBAS013313: Vault Reader Exception:
at org.jboss.as.server.services.security.VaultAddHandler.performRuntime(
VaultAddHandler.java:82) [wildfly-server-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SN
APSHOT]
at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddS
tepHandler.java:75) [wildfly-controller-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNA
PSHOT]
at org.jboss.as.controller.AbstractOperationContext.executeStep(Abstract
OperationContext.java:591) [wildfly-controller-8.0.1.Final-SNAPSHOT.jar:8.0.1.Fi
nal-SNAPSHOT]
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(Abstr
actOperationContext.java:469) [wildfly-controller-8.0.1.Final-SNAPSHOT.jar:8.0.1
.Final-SNAPSHOT]
at org.jboss.as.controller.AbstractOperationContext.completeStepInternal
(AbstractOperationContext.java:273) [wildfly-controller-8.0.1.Final-SNAPSHOT.jar
:8.0.1.Final-SNAPSHOT]
at org.jboss.as.controller.AbstractOperationContext.executeOperation(Abs
tractOperationContext.java:268) [wildfly-controller-8.0.1.Final-SNAPSHOT.jar:8.0
.1.Final-SNAPSHOT]
at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.
java:333) [wildfly-controller-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHOT]
at org.jboss.as.controller.AbstractControllerService.boot(AbstractContro
llerService.java:294) [wildfly-controller-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-S
NAPSHOT]
at org.jboss.as.server.ServerService.boot(ServerService.java:356) [wildf
ly-server-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHOT]
at org.jboss.as.server.ServerService.boot(ServerService.java:331) [wildf
ly-server-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHOT]
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractContr
ollerService.java:256) [wildfly-controller-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-
SNAPSHOT]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0]
Caused by: org.jboss.as.server.services.security.VaultReaderException: JBAS01331
3: Vault Reader Exception:
at org.jboss.as.security.vault.RuntimeVaultReader.createVault(RuntimeVau
ltReader.java:84) [wildfly-security-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHO
T]
at org.jboss.as.server.services.security.VaultAddHandler.performRuntime(
VaultAddHandler.java:80) [wildfly-server-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SN
APSHOT]
... 11 more
Caused by: org.jboss.security.vault.SecurityVaultException: java.lang.NullPointe
rException
at org.picketbox.plugins.vault.PicketBoxSecurityVault.init(PicketBoxSecu
rityVault.java:210) [picketbox-4.0.21.Beta1.jar:4.0.21.Beta1]
at org.jboss.as.security.vault.RuntimeVaultReader.createVault(RuntimeVau
ltReader.java:82) [wildfly-security-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHO
T]
... 12 more
Caused by: java.lang.NullPointerException
at org.picketbox.plugins.vault.PicketBoxSecurityVault.checkAndConvertKey
StoreToJCEKS(PicketBoxSecurityVault.java:570) [picketbox-4.0.21.Beta1.jar:4.0.21
.Beta1]
at org.picketbox.plugins.vault.PicketBoxSecurityVault.init(PicketBoxSecu
rityVault.java:207) [picketbox-4.0.21.Beta1.jar:4.0.21.Beta1]
... 13 more
21:58:23,780 FATAL [org.jboss.as.server] JBAS015957: Server boot has failed in a
n unrecoverable manner; exiting. See previous messages for details.
21:58:23,795 INFO [org.jboss.as] JBAS015950: WildFly 8.0.1.Final-SNAPSHOT "Wild
Fly" stopped in 11ms
Can anyone please help me? Thank You!
This is caused by a NullPointerException, so unfortunately, it is a bug. Please open an issue at https://issues.jboss.org/browse/SECURITY with this same description.
clean the server , or show in folder and delete all the folder exist in the deployment , and restart the server .