From adbc699be58da0b91a791cf72a66d6ee39c84210 Mon Sep 17 00:00:00 2001 From: Adrian Damian Date: Tue, 13 Feb 2024 10:51:19 -0800 Subject: [PATCH] Required changes to make production vostools work --- .../main/java/org/opencadc/vault/NodePersistenceImpl.java | 2 +- .../java/org/opencadc/vault/VaultTransferGenerator.java | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/vault/src/main/java/org/opencadc/vault/NodePersistenceImpl.java b/vault/src/main/java/org/opencadc/vault/NodePersistenceImpl.java index 855bc6d3..d250693b 100644 --- a/vault/src/main/java/org/opencadc/vault/NodePersistenceImpl.java +++ b/vault/src/main/java/org/opencadc/vault/NodePersistenceImpl.java @@ -218,7 +218,7 @@ private Subject getRootOwner(MultiValuedProperties mvp, IdentityManager im) { @Override public Views getViews() { - throw new UnsupportedOperationException(); + return new Views(); } @Override diff --git a/vault/src/main/java/org/opencadc/vault/VaultTransferGenerator.java b/vault/src/main/java/org/opencadc/vault/VaultTransferGenerator.java index 2f2a913b..9386ac33 100644 --- a/vault/src/main/java/org/opencadc/vault/VaultTransferGenerator.java +++ b/vault/src/main/java/org/opencadc/vault/VaultTransferGenerator.java @@ -186,11 +186,9 @@ private List handleDataNode(DataNode node, String filename, Transfer t Transfer artifactTrans = new Transfer(node.storageID, trans.getDirection()); for (Protocol p : trans.getProtocols()) { log.debug("requested protocol: " + p); - URI secM = p.getSecurityMethod(); - if (secM == null || secM.equals(Standards.SECURITY_METHOD_ANON)) { - artifactTrans.getProtocols().add(p); - log.debug("allow protocol: " + p); - } + p.setSecurityMethod(Standards.SECURITY_METHOD_ANON); + artifactTrans.getProtocols().add(p); + log.debug("allow only anon method for " + p); } try {