mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-27 02:45:36 +00:00
Secret retention fixes
This commit is contained in:
@@ -32,6 +32,10 @@ public class DataStorageEncryption {
|
||||
}
|
||||
|
||||
var read = secret.getInternalSecret().mapSecretValueFailable(chars -> {
|
||||
if (chars.length == 0) {
|
||||
return JsonNodeFactory.instance.missingNode();
|
||||
}
|
||||
|
||||
return JacksonMapper.getDefault().readTree(new CharArrayReader(chars));
|
||||
});
|
||||
if (read != null) {
|
||||
|
||||
@@ -51,8 +51,15 @@ public class SecretManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
var p = expectAskpass(UUID.randomUUID(), UuidHelper.generateFromObject(store, sub), List.of(strategy.query()), SecretQuery.prompt(false), CountDown.of());
|
||||
return p.process(prompt);
|
||||
var uuid = UUID.randomUUID();
|
||||
var p = expectAskpass(uuid, UuidHelper.generateFromObject(store, sub), List.of(strategy.query()), SecretQuery.prompt(false), CountDown.of());
|
||||
var r = p.process(prompt);
|
||||
completeRequest(uuid);
|
||||
return r;
|
||||
}
|
||||
|
||||
public static void completeRequest(UUID request) {
|
||||
progress.removeIf(secretQueryProgress -> secretQueryProgress.getRequestId().equals(request));
|
||||
}
|
||||
|
||||
public static void clearAll(Object store) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.UUID;
|
||||
|
||||
public interface ProcessControl extends AutoCloseable {
|
||||
|
||||
@@ -14,6 +15,7 @@ public interface ProcessControl extends AutoCloseable {
|
||||
<T extends Throwable> T convert(T t);
|
||||
}
|
||||
|
||||
UUID getUuid();
|
||||
|
||||
ProcessControl withExceptionConverter(ExceptionConverter converter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user