Skip to content

Commit

Permalink
Merge pull request #9386 from vespa-engine/bjorncs/node-identifier
Browse files Browse the repository at this point in the history
Bjorncs/node identifier
  • Loading branch information
bjorncs committed May 14, 2019
2 parents 81cda30 + a148dc3 commit f11e8bf
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 1,298 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.provision.security;

import com.google.inject.Inject;
import com.google.inject.Provider;

import java.security.cert.X509Certificate;
import java.util.List;

/**
* @author bjorncs
*/
public class DummyNodeIdentifierProvider implements Provider<NodeIdentifier> {

private final ThrowingNodeIdentifier instance = new ThrowingNodeIdentifier();

@Inject
public DummyNodeIdentifierProvider() {}

@Override
public NodeIdentifier get() {
return instance;
}

private static class ThrowingNodeIdentifier implements NodeIdentifier {
@Override
public NodeIdentity identifyNode(List<X509Certificate> peerCertificateChain) {
throw new UnsupportedOperationException();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
* @author bjorncs
*/
public class NodeIdentifierException extends RuntimeException {

public NodeIdentifierException(String message) {
super(message);
}

public NodeIdentifierException(String message, Throwable cause) {
super(message, cause);
}

public NodeIdentifierException(Throwable cause) {
super(cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<component id="com.yahoo.vespa.config.server.application.HttpProxy" bundle="configserver" />
<component id="com.yahoo.vespa.config.server.filedistribution.FileServer" bundle="configserver" />
<component id="com.yahoo.vespa.config.server.maintenance.ConfigServerMaintenance" bundle="configserver" />
<component id="com.yahoo.config.provision.security.DummyNodeIdentifierProvider" bundle="config-provisioning" />

<component id="com.yahoo.vespa.serviceview.ConfigServerLocation" bundle="configserver" />

Expand Down
12 changes: 0 additions & 12 deletions node-repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,6 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.yahoo.vespa</groupId>
<artifactId>vespa-athenz</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.yahoo.vespa</groupId>
<artifactId>jdisc-security-filters</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.yahoo.vespa</groupId>
<artifactId>flags</artifactId>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit f11e8bf

Please sign in to comment.