summaryrefslogtreecommitdiffstats
path: root/config-model/src
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2022-06-20 13:03:07 +0200
committerHarald Musum <musum@yahooinc.com>2022-06-20 13:03:07 +0200
commit7901b9c67d07fcf3aaf779a5ef826e770936d9b4 (patch)
tree025cca57a92bb926ac72abf98546515c6a6fe265 /config-model/src
parent6fbf962ae13e6eb45a358017229949778ed08a85 (diff)
Add to log message that read and write access control attributes will be removed in Vespa 9
Diffstat (limited to 'config-model/src')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/HttpBuilder.java16
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyConnectorBuilder.java2
2 files changed, 9 insertions, 9 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/HttpBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/HttpBuilder.java
index f27e0b24c82..a42d4a665ff 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/HttpBuilder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/HttpBuilder.java
@@ -2,7 +2,6 @@
package com.yahoo.vespa.model.container.http.xml;
import com.yahoo.component.ComponentSpecification;
-import com.yahoo.config.application.api.DeployLogger;
import com.yahoo.config.model.builder.xml.XmlHelper;
import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.config.model.producer.AbstractConfigProducer;
@@ -19,7 +18,6 @@ import com.yahoo.vespa.model.container.http.FilterBinding;
import com.yahoo.vespa.model.container.http.FilterChains;
import com.yahoo.vespa.model.container.http.Http;
import org.w3c.dom.Element;
-
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
@@ -36,7 +34,7 @@ public class HttpBuilder extends VespaDomBuilder.DomConfigProducerBuilder<Http>
static final List<String> VALID_FILTER_CHAIN_TAG_NAMES = List.of(REQUEST_CHAIN_TAG_NAME, RESPONSE_CHAIN_TAG_NAME);
@Override
- protected Http doBuild(DeployState deployState, AbstractConfigProducer ancestor, Element spec) {
+ protected Http doBuild(DeployState deployState, AbstractConfigProducer<?> ancestor, Element spec) {
FilterChains filterChains;
List<FilterBinding> bindings = new ArrayList<>();
AccessControl accessControl = null;
@@ -74,16 +72,18 @@ public class HttpBuilder extends VespaDomBuilder.DomConfigProducerBuilder<Http>
getContainerCluster(ancestor).ifPresent(builder::setHandlers);
+ // TODO: Remove in Vespa 9
XmlHelper.getOptionalAttribute(accessControlElem, "read").ifPresent(
readAttr -> deployState.getDeployLogger()
.logApplicationPackage(Level.WARNING,
"The 'read' attribute of the 'access-control' element has no effect and is deprecated. " +
- "Please remove the attribute from services.xml"));
+ "Please remove the attribute from services.xml, support will be removed in Vespa 9"));
+ // TODO: Remove in Vespa 9
XmlHelper.getOptionalAttribute(accessControlElem, "write").ifPresent(
writeAttr -> deployState.getDeployLogger()
.logApplicationPackage(Level.WARNING,
"The 'write' attribute of the 'access-control' element has no effect and is deprecated. " +
- "Please remove the attribute from services.xml"));
+ "Please remove the attribute from services.xml, support will be removed in Vespa 9"));
AccessControl.ClientAuthentication clientAuth =
XmlHelper.getOptionalAttribute(accessControlElem, "tls-handshake-client-auth")
@@ -129,8 +129,8 @@ public class HttpBuilder extends VespaDomBuilder.DomConfigProducerBuilder<Http>
return tenantDomain != null ? tenantDomain : explicitDomain;
}
- private static Optional<ApplicationContainerCluster> getContainerCluster(AbstractConfigProducer configProducer) {
- AbstractConfigProducer currentProducer = configProducer;
+ private static Optional<ApplicationContainerCluster> getContainerCluster(AbstractConfigProducer<?> configProducer) {
+ AbstractConfigProducer<?> currentProducer = configProducer;
while (! ApplicationContainerCluster.class.isAssignableFrom(currentProducer.getClass())) {
currentProducer = currentProducer.getParent();
if (currentProducer == null)
@@ -164,7 +164,7 @@ public class HttpBuilder extends VespaDomBuilder.DomConfigProducerBuilder<Http>
}
}
- static int readPort(ModelElement spec, boolean isHosted, DeployLogger logger) {
+ static int readPort(ModelElement spec, boolean isHosted) {
Integer port = spec.integerAttribute("port");
if (port == null)
return Defaults.getDefaults().vespaWebServicePort();
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyConnectorBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyConnectorBuilder.java
index c6fae15d06a..69480ee0703 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyConnectorBuilder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyConnectorBuilder.java
@@ -30,7 +30,7 @@ public class JettyConnectorBuilder extends VespaDomBuilder.DomConfigProducerBuil
@Override
protected ConnectorFactory doBuild(DeployState deployState, AbstractConfigProducer<?> ancestor, Element serverSpec) {
String name = XmlHelper.getIdString(serverSpec);
- int port = HttpBuilder.readPort(new ModelElement(serverSpec), deployState.isHosted(), deployState.getDeployLogger());
+ int port = HttpBuilder.readPort(new ModelElement(serverSpec), deployState.isHosted());
ConnectorFactory.Builder builder = new ConnectorFactory.Builder(name, port);
XmlHelper.getOptionalAttribute(serverSpec, "default-request-chain")
.map(ComponentId::new)