protected ArtifactResolutionService getArtifactResolutionService(Endpoint ep, int i) { ArtifactResolutionService service = buildSAMLObject(ArtifactResolutionService.class); service.setLocation(ep.getLocation()); service.setBinding(ep.getBinding().toString()); service.setIndex(i); service.setIsDefault(ep.isDefault()); service.setResponseLocation(ep.getResponseLocation()); return service; }
ArtifactResolutionService.DEFAULT_ELEMENT_NAME); arsTemplate.setBinding(SAMLConstants.SAML2_SOAP11_BINDING_URI); arsTemplate.setLocation(((SAMLSourceLocationArtifact)artifact).getSourceLocation()); arsTemplate.setIndex(endpointIndex);
/** * @param artifact * @param peerRoleDescriptor * @param artifactResolveEndpointURL * @return */ private SAMLObject dereferenceArtifact(SAML2Artifact artifact, RoleDescriptor peerRoleDescriptor, ArtifactResolutionService ars) throws MessageDecodingException { MessageContext<SAMLObject> outbound = new MessageContext<>(); outbound.setMessage(buildArtifactResolveRequestMessage(artifact, ars.getLocation(), peerRoleDescriptor)); //TODO more population of context // - signing params // - client TLS params // - setting up stuff for handling response //TODO what components needed to support signing and client TLS, and how do we get them? //TODO probably support optional static injected creds and params, as well as injected resolution strategies InOutOperationContext<SAMLObject, SAMLObject> opContext = new InOutOperationContext<>(null, outbound); try { log.trace("Executing ArtifactResolve over SOAP 1.1 binding to endpoint: {}", ars.getLocation()); soapClient.send(ars.getLocation(), opContext); return opContext.getInboundMessageContext().getMessage(); } catch (SOAPException | SecurityException e) { throw new MessageDecodingException("Error dereferencing artifact", e); } }
new ArtifactSourceLocationMetadataIndexKey(ars.getLocation()); log.trace("For entityID '{}' produced artifact source location index key: {}", descriptor.getEntityID(), key);