summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--p11p-daemon/src/p11p_remote_manager.erl26
1 files changed, 19 insertions, 7 deletions
diff --git a/p11p-daemon/src/p11p_remote_manager.erl b/p11p-daemon/src/p11p_remote_manager.erl
index b9b15b2..be921ee 100644
--- a/p11p-daemon/src/p11p_remote_manager.erl
+++ b/p11p-daemon/src/p11p_remote_manager.erl
@@ -1,10 +1,22 @@
-%% A remote manager is a gen_server for coordination of remotes for
-%% all tokens.
-
-%% Spawn one remote per configured p11p module per configured virtual
-%% token. Provide a lookup service for servers that need a remote to
-%% send a request to, by keeping track of which module is current for
-%% a given vtoken.
+%% A remote manager is a genserver for coordination of remotes for all
+%% tokens.
+
+%% Provide a lookup service for servers in need of a remote to send
+%% requests to, by keeping track of which module is current for a
+%% given vtoken and spawn a p11p_remote genserver "on demand".
+%%
+%% Provide a client event and a server event API for servers and
+%% remotes, respectively, where events like "remote timing out" and
+%% "p11 client hung up" can be reported.
+%%
+
+%% Keep track of (successful) p11 requests which might cause state
+%% changes in the token, like "logins". When switching token under the
+%% feet of the p11 client, replay whatever is needed to the new
+%% token. This goes for the p11-kit RPC protocol version octet too.
+%% Certain state changing p11 requests cannot be replayed, like
+%% "generate new key". Any such (successful) request invalidates all
+%% other remotes for the given token.
-module(p11p_remote_manager).