use of com.yahoo.vespa.hosted.athenz.instanceproviderservice.KeyProvider in project vespa by vespa-engine.
the class InstanceValidatorTest method invalid_signature.
@Test
public void invalid_signature() throws Exception {
KeyProvider keyProvider = new AutoGeneratedKeyProvider();
InstanceValidator instanceValidator = new InstanceValidator(keyProvider, null);
KeyProvider fakeKeyProvider = new AutoGeneratedKeyProvider();
InstanceConfirmation instanceConfirmation = createInstanceConfirmation(fakeKeyProvider.getPrivateKey(0), applicationId, domain, service);
assertFalse(instanceValidator.isInstanceSignatureValid(instanceConfirmation));
}
use of com.yahoo.vespa.hosted.athenz.instanceproviderservice.KeyProvider in project vespa by vespa-engine.
the class InstanceValidatorTest method valid_signature.
@Test
public void valid_signature() throws Exception {
KeyProvider keyProvider = new AutoGeneratedKeyProvider();
InstanceValidator instanceValidator = new InstanceValidator(keyProvider, null);
InstanceConfirmation instanceConfirmation = createInstanceConfirmation(keyProvider.getPrivateKey(0), applicationId, domain, service);
assertTrue(instanceValidator.isInstanceSignatureValid(instanceConfirmation));
}
Aggregations