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

[WFCORE-5696] Allow ElytronExpressionResolver to resolve expressions in deployment resources #4865

Merged
merged 2 commits into from
Nov 26, 2021

Conversation

bstansberry
Copy link
Contributor

@bstansberry bstansberry commented Nov 13, 2021

https://issues.redhat.com/browse/WFCORE-5696

Use of this in full WildFly is shown at wildfly/wildfly#14921

This builds on #4868

@github-actions github-actions bot added the deps-ok Dependencies have been checked, and there are no significant changes label Nov 13, 2021
@bstansberry bstansberry changed the title WFCORE-5696 wip [WFCORE-5696] Allow ElytronExpressionResolver to resolve expressions in deployment resources Nov 13, 2021
@bstansberry bstansberry force-pushed the WFCORE-5696 branch 4 times, most recently from 35c99db to 4da7fe5 Compare November 16, 2021 03:50
@wildfly-ci
Copy link

Core - Full Integration Build 11056 outcome was FAILURE using a merge of 4da7fe5
Summary: Tests passed: 3875, ignored: 39; exit code 1 (Step: Build & test full (Maven)) (new) Build time: 01:48:09

@wildfly-ci
Copy link

Core - Full Integration Build 11165 outcome was FAILURE using a merge of 4da7fe5
Summary: Tests passed: 5965, ignored: 98; exit code 1 (Step: Build & test full (Maven)) (new) Build time: 01:48:23

@wildfly-ci
Copy link

Core - Full Integration Build 11163 outcome was FAILURE using a merge of 4da7fe5
Summary: Tests passed: 7040, ignored: 130; exit code 1 (Step: Build & test full (Maven)) (new) Build time: 03:04:54

@wildfly-ci
Copy link

Core - Full Integration Build 11058 outcome was UNKNOWN using a merge of a4adeae
Summary: Canceled (Tests passed: 852, ignored: 12; exit code 143 (Step: Build & test full (Maven)) (new)) Build time: 00:24:04

@wildfly-ci
Copy link

Core - Full Integration Build 11167 outcome was UNKNOWN using a merge of a4adeae
Summary: Canceled (Tests passed: 1897, ignored: 49; exit code 143 (Step: Build & test full (Maven)) (new)) Build time: 00:24:04

@bstansberry
Copy link
Contributor Author

/retest

@bstansberry
Copy link
Contributor Author

bstansberry commented Nov 19, 2021

@fjuma @darranl This now ready.

Custom test job of this and my WFLY-14919 branch:

https://ci.wildfly.org/viewLog.html?buildId=283326&

@wildfly wildfly deleted a comment from wildfly-ci Nov 19, 2021
@wildfly wildfly deleted a comment from wildfly-ci Nov 19, 2021
@wildfly wildfly deleted a comment from wildfly-ci Nov 19, 2021
@wildfly-ci
Copy link

Core - Full Integration Build 11179 outcome was FAILURE using a merge of 060c5f9
Summary: Tests passed: 7108, ignored: 131; failed to parse xml report (new); exit code 1 (Step: Build & test full (Maven)) (new) Build time: 04:37:25

@bstansberry bstansberry force-pushed the WFCORE-5696 branch 2 times, most recently from 953c65f to 12211c4 Compare November 20, 2021 23:17
@wildfly-ci
Copy link

Core - Full Integration Build 11080 outcome was FAILURE using a merge of 12211c4
Summary: Compilation error: Compiler (new) Build time: 00:02:14

@wildfly-ci
Copy link

Core - Full Integration Build 11187 outcome was FAILURE using a merge of 12211c4
Summary: Compilation error: Compiler (new) Build time: 00:02:27

…tage.MODEL

Create a seperate ExpressionResolverExtension interface that core expression resolver plugins like ElytronExpressionResolver implement instead of ExpressionResolver

Add a capability that can be used by ExpressionResolverExtension impls to register themselves with the core expression resolver, allowing their use in Stage.MODEL

Separate ExpressionResolverExtension initialization from resolution so initialization failures can be handled separately and not be treated as indicating the extension
regarded a given expression as relevant to it, but failed to resolve it.

Clarify ExpressionResolverExtension resolution exception handling to distinguish user problems from server problems and not throw OperationFailedException.

Update ReadAttributeHandler.ResolveAttributeHandler to understand the ExpressionResolverExtension exceptions and to treat their presence as indication that
a secure expression was present.

Add manualmode test case analogous to the old CustomVaultInModuleTestCase, but using credential expressions.
…in deployment resources; provide access to that function via a DeploymentUnit attachment.

Ensure that the ElytronExpressionResolver is initialized before the management operation that adds it completes Stage.RUNTIME, ensuring it is safe to use when deployment processing begins.
@wildfly-ci
Copy link

Core - Full Integration Build 11191 outcome was FAILURE using a merge of eef9be3
Summary: Tests failed: 1 (1 new), passed: 7178, ignored: 146 Build time: 04:09:50

Failed tests

org.jboss.as.test.manualmode.messaging.ha.ReplicatedFailoverTestCase.testBackupFailoverAfterFailback: javax.jms.JMSRuntimeException: AMQ219014: Timed out after waiting 30,000 ms for response when sending packet 105
	at org.apache.activemq.artemis.jms.client.JmsExceptionUtils.convertToRuntimeException(JmsExceptionUtils.java:88)
	at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext(ActiveMQConnectionFactory.java:326)
	at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext(ActiveMQConnectionFactory.java:314)
	at org.jboss.as.test.manualmode.messaging.ha.AbstractMessagingHATestCase.receiveNoMessage(AbstractMessagingHATestCase.java:213)
	at org.jboss.as.test.manualmode.messaging.ha.FailoverTestCase.testBackupFailoverAfterFailback(FailoverTestCase.java:218)
Caused by: javax.jms.JMSException: AMQ219014: Timed out after waiting 30,000 ms for response when sending packet 105
	at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:539)
	at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:443)
	at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.addSessionMetadata(ActiveMQSessionContext.java:475)
	at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.addMetaData(ClientSessionImpl.java:1514)
	at org.apache.activemq.artemis.jms.client.ActiveMQConnection.addSessionMetaData(ActiveMQConnection.java:694)
	at org.apache.activemq.artemis.jms.client.ActiveMQConnection.authorize(ActiveMQConnection.java:684)
	at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:920)
	at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext(ActiveMQConnectionFactory.java:321)
	... 135 more
Caused by: ActiveMQConnectionTimedOutException[errorType=CONNECTION_TIMEDOUT message=AMQ219014: Timed out after waiting 30,000 ms for response when sending packet 105]
	... 143 more
------- Stdout: -------
 [0m10:48:26,504 INFO  [org.jboss.modules] (main) JBoss Modules version 2.0.0.Final
 [0m [0m10:48:26,945 INFO  [org.jboss.msc] (main) JBoss MSC version 1.4.13.Final
 [0m [0m10:48:26,956 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
 [0m [0m10:48:27,083 INFO  [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: WildFly Full 26.0.0.Beta1-SNAPSHOT (WildFly Core 18.0.0.Beta4-SNAPSHOT) starting
 [0m [0m10:48:28,361 INFO  [org.wildfly.security] (ServerService Thread Pool -- 27) ELY00001: WildFly Elytron version 1.17.2.Final
 [0m [0m10:48:29,579 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
 [0m [0m10:48:29,598 INFO  [org.xnio] (MSC service thread 1-4) XNIO version 3.8.4.Final
 [0m [0m10:48:29,607 INFO  [org.xnio.nio] (MSC service thread 1-4) XNIO NIO Implementation Version 3.8.4.Final
 [0m [0m10:48:29,677 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 61) WFLYCLINF0001: Activating Infinispan subsystem.
 [0m [0m10:48:29,679 INFO  [org.jboss.as.jaxrs] (ServerService Thread Pool -- 63) WFLYRS0016: RESTEasy version 4.7.2.Final
 [0m [0m10:48:29,706 INFO  [org.wildfly.extension.elytron.oidc._private] (ServerService Thread Pool -- 58) WFLYOIDC0001: Activating WildFly Elytron OIDC Subsystem
 [0m [0m10:48:29,710 INFO  [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 66) WFLYCLJG0001: Activating JGroups subsystem. JGroups version 4.2.11
 [0m [0m10:48:29,719 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 78) WFLYNAM0001: Activating Naming Subsystem
 [0m [33m10:48:29,723 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 86) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.
 [0m [0m10:48:29,728 INFO  [org.wildfly.extension.microprofile.opentracing] (ServerService Thread Pool -- 76) WFLYTRACEXT0001: Activating MicroProfile OpenTracing Subsystem
 [0m [0m10:48:29,737 INFO  [org.wildfly.iiop.openjdk] (ServerService Thread Pool -- 60) WFLYIIOP0001: Activating IIOP Subsystem
 [0m [0m10:48:29,738 INFO  [org.wildfly.extension.health] (ServerService Thread Pool -- 59) WFLYHEALTH0001: Activating Base Health Subsystem
 [0m [0m10:48:29,741 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 62) WFLYIO001: Worker 'default' has auto-configured to 8 IO threads with 64 max task threads based on your 4 available processors
 [0m [0m10:48:29,743 INFO  [org.wildfly.extension.microprofile.config.smallrye] (ServerService Thread Pool -- 74) WFLYCONF0001: Activating MicroProfile Config Subsystem
 [0m [0m10:48:29,749 INFO  [org.wildfly.extension.microprofile.jwt.smallrye] (ServerService Thread Pool -- 75) WFLYJWT0001: Activating MicroProfile JWT Subsystem
 [0m [0m10:48:29,797 INFO  [org.jboss.as.connector] (MSC service thread 1-1) WFLYJCA0009: Starting Jakarta Connectors Subsystem (WildFly/IronJacamar 1.5.3.Final)
 [0m [0m10:48:29,815 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 50) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.4)
 [0m [0m10:48:29,821 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 69) WFLYJSF0007: Activated the following Jakarta Server Faces Implementations: [main]
 [0m [0m10:48:29,824 INFO  [org.wildfly.extension.metrics] (ServerService Thread Pool -- 73) WFLYMETRICS0001: Activating Base Metrics Subsystem
 [0m [0m10:48:29,827 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0018: Started Driver service with driver-name = h2
 [0m [0m10:48:29,843 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 88) WFLYWS0002: Activating WebServices Extension
 [0m [0m10:48:29,946 INFO  [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 5.0.23.Final
 [0m [0m10:48:29,994 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0003: Undertow 2.2.12.Final starting
 [0m [0m10:48:30,068 INFO  [org.jboss.as.naming] (MSC service thread 1-5) WFLYNAM0003: Starting Naming Service
 [0m [0m10:48:30,109 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-8) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
 [0m [33m10:48:30,269 WARN  [org.wildfly.extension.elytron] (MSC service thread 1-2) WFLYELY00023: KeyStore file '/store/work/tc-work/37b47ae8b9c60325/full/testsuite/integration/manualmode/target/jbossas-messaging-ha-server1/standalone/configuration/application.keystore' does not exist. Used blank.
 [0m [33m10:48:30,400 WARN  [org.wildfly.extension.elytron] (MSC service thread 1-3) WFLYELY01084: KeyStore /store/work/tc-work/37b47ae8b9c60325/full/testsuite/integration/manualmode/target/jbossas-messaging-ha-server1/standalone/configuration/application.keystore not found, it will be auto generated on first use with a self-signed certificate for host localhost


@wildfly wildfly deleted a comment from wildfly-ci Nov 25, 2021
@wildfly wildfly deleted a comment from wildfly-ci Nov 25, 2021
@darranl darranl mentioned this pull request Nov 25, 2021
@darranl darranl merged commit d2fb0c6 into wildfly:main Nov 26, 2021
@bstansberry bstansberry deleted the WFCORE-5696 branch November 28, 2021 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps-ok Dependencies have been checked, and there are no significant changes
Projects
None yet
3 participants