-
Notifications
You must be signed in to change notification settings - Fork 469
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-5101] [Community] SSLContext to support delegation to alternate instances based on peer information. #4311
Changes from all commits
89eac6a
d7de0dd
eb39ba3
8cabe0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
import static org.wildfly.extension.elytron.Capabilities.SECURITY_DOMAIN_CAPABILITY; | ||
import static org.wildfly.extension.elytron.Capabilities.SECURITY_FACTORY_CREDENTIAL_CAPABILITY; | ||
import static org.wildfly.extension.elytron.Capabilities.SSL_CONTEXT_CAPABILITY; | ||
import static org.wildfly.extension.elytron.ElytronDefinition.commonRequirements; | ||
import static org.wildfly.extension.elytron._private.ElytronSubsystemMessages.ROOT_LOGGER; | ||
|
||
import java.util.HashMap; | ||
|
@@ -42,6 +43,8 @@ | |
import org.jboss.dmr.ModelNode; | ||
import org.jboss.dmr.ModelType; | ||
import org.jboss.msc.service.ServiceBuilder; | ||
import org.jboss.msc.service.ServiceController; | ||
import org.jboss.msc.service.ServiceTarget; | ||
import org.jboss.msc.value.InjectedValue; | ||
import org.wildfly.common.function.ExceptionSupplier; | ||
import org.wildfly.extension.elytron.TrivialService.ValueSupplier; | ||
|
@@ -491,6 +494,17 @@ protected ValueSupplier<AuthenticationContext> getValueSupplier(ServiceBuilder<A | |
return () -> finalContext.apply(parentSupplier.get()); | ||
} | ||
|
||
@Override | ||
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { | ||
commonRequirements(installService(context, model)).setInitialMode(ServiceController.Mode.ON_DEMAND).install(); | ||
} | ||
|
||
ServiceBuilder<AuthenticationContext> installService(OperationContext context, ModelNode model) throws OperationFailedException { | ||
ServiceTarget serviceTarget = context.getCapabilityServiceTarget(); | ||
ServiceBuilder<?> serviceBuilder = context.getCapabilityServiceTarget().addCapability(AUTHENTICATION_CONTEXT_RUNTIME_CAPABILITY); | ||
TrivialService<AuthenticationContext> authenticationContextTrivialService = new TrivialService<AuthenticationContext>(getValueSupplier((ServiceBuilder<AuthenticationContext>) serviceBuilder, context, model)); | ||
fjuma marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return serviceTarget.addService(AUTHENTICATION_CONTEXT_RUNTIME_CAPABILITY.getCapabilityServiceName(context.getCurrentAddressValue()), authenticationContextTrivialService); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Didn't you already create this service builder on line 504? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created an issue, WFCORE-6757, to track this. |
||
} | ||
}; | ||
|
||
return new TrivialResourceDefinition(ElytronDescriptionConstants.AUTHENTICATION_CONTEXT, add, attributes, | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI not a reason to avoid merging this PR but I think we are going to need to move the artifact into it's own module, we can then add an optional dependency on the new module here.
As I mention in my other comment we will look at the capabilities being added with Galleon to not provision this artifact and the new module when provisioning at the default stability level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a blocker issue, WFCORE-6755, to track this.