Skip to content

Session Management Commands #204

@CMCDragonkai

Description

@CMCDragonkai

Specification

  1. Session Management is the matter of acquiring an authenticated session for the PK CLI/GUI against the PK agent
  2. It should work for multiple clients connecting to the agent
  3. It should work over the network
  4. It should be integrated into our GRPC client service
  5. We should be able to create and destroy our own session
  6. And we should be able to destroy all other client's session
  7. Sessions don't represent separate users to the PK agent, they are currently just different uses of the same PK agent
  8. We may be able to extend sessions to deal with OAuth2 and HTTP API Third Party Integration - HTTP API, OAuth2 Provider API, Plugin API, Library vs Framework, Smart Tokens #166
  9. We should educate the user on using the CLI with one space ahead of the command to avoid saving it in the CLI somehow (how should this education be done), it needs to be mentioned in all our docs
  10. Repeated runs of authenticated command should refresh the session expiry

Additional context

This is all done as part of client-refactoring for now.

Tasks

  1. Understand that there should be 3 input methods: parameter, prompt with EOF CTRL+D, and file descriptor
  2. Use all 3 input methods to allow root password to be used to authenticate a session
  3. Specify and test pk agent unlock - for authenticating a session for the CLI
    • Allow all 3 input methods to be used here
  4. Specify and test pk agent lock - for destroying the current session for the CLI (delete client's session token)
  5. Specify and test pk agent lockall - for changing the session key and ensuring that all sessions should be made invalid
  6. All other commands should expect to be authenticated, and if not authenticated, an exception is thrown from the agent, and the client must then acquire the password using the prompt method, and then retry the previous operation after the prompt works
  7. Integrate lockfile mechanism to the session token to avoid clobbering during session refresh

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions