docs: reflect current design
This commit is contained in:
parent
445d1b7ccd
commit
1d4aa4d44f
2 changed files with 14 additions and 7 deletions
|
@ -182,7 +182,7 @@ func newSubmitKeyCommand() *cobra.Command {
|
||||||
Args: cobra.ExactArgs(2),
|
Args: cobra.ExactArgs(2),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
machineID := args[0]
|
machineID := args[0]
|
||||||
// TODO(jaredallard): don't expect to be passed
|
// TODO(jaredallard): don't expect to be passed as an arg
|
||||||
passphrase := args[1]
|
passphrase := args[1]
|
||||||
|
|
||||||
kc, kcclose, err := client.Dial(cmd.Parent().Flag("hostname").Value.String())
|
kc, kcclose, err := client.Dial(cmd.Parent().Flag("hostname").Value.String())
|
||||||
|
|
|
@ -29,11 +29,13 @@ disk.
|
||||||
|
|
||||||
### Endpoints
|
### Endpoints
|
||||||
|
|
||||||
- `GetKey() string` - If connected to a client through
|
- `GetKey() string` - If a client has called `SubmitKey` for this
|
||||||
`SubmitKey`, returns the key, otherwise waits for a period of time
|
client, returns the key. Otherwise, registers the key request attempt.
|
||||||
then the caller should retry the endpoint (polling).
|
A client can then call this endpoint again, after a key has been
|
||||||
|
submited to recieve the encrypted key.
|
||||||
- `ListSessions() []MachineID` - Returns a list of machine IDs waiting
|
- `ListSessions() []MachineID` - Returns a list of machine IDs waiting
|
||||||
for a key to be provided.
|
for a key to be provided, as well as their public keys and last
|
||||||
|
attempt time.
|
||||||
- `SubmitKey(key []byte, machineID string)` - If a session is present
|
- `SubmitKey(key []byte, machineID string)` - If a session is present
|
||||||
for the provided `machineID`, then the key is stored in memory on the
|
for the provided `machineID`, then the key is stored in memory on the
|
||||||
server side and provided when `GetKey` is next called by the machine.
|
server side and provided when `GetKey` is next called by the machine.
|
||||||
|
@ -49,12 +51,17 @@ disk.
|
||||||
signature check (public keys are stored on the server side).
|
signature check (public keys are stored on the server side).
|
||||||
- This technically is vulnerable to replay attacks. However, the
|
- This technically is vulnerable to replay attacks. However, the
|
||||||
returned data is encrypted to the key holder. An attacker replaying
|
returned data is encrypted to the key holder. An attacker replaying
|
||||||
this would get encrypted data only.
|
this would get encrypted data only. Further mitigations are made by
|
||||||
|
signing the current date.
|
||||||
|
|
||||||
### Flow
|
### Flow
|
||||||
|
|
||||||
1. Machine A boots initramfs+kernel
|
1. Machine A boots initramfs+kernel
|
||||||
2. Machine A calls `GetKey()`
|
2. Machine A calls `GetKey()`, gets no response
|
||||||
|
3. User A calls `SubmitKey` with the provided machineID
|
||||||
|
4. a) Server stores the key in memory (encrypted as provided by User A)
|
||||||
|
5. Machine A gets encrypted key, decrypts it using private key
|
||||||
|
6. Machine A unlocks
|
||||||
|
|
||||||
## Machine Registration
|
## Machine Registration
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue