Skip to content

Added new method for EscapePod authentication & EscapePod examples#3

Open
cyb3rdog wants to merge 1 commit into
digital-dream-labs:mainfrom
cyb3rdog:escape-pod
Open

Added new method for EscapePod authentication & EscapePod examples#3
cyb3rdog wants to merge 1 commit into
digital-dream-labs:mainfrom
cyb3rdog:escape-pod

Conversation

@cyb3rdog
Copy link
Copy Markdown

@cyb3rdog cyb3rdog commented Apr 9, 2021

  • added new 'NewEP' method for returning EscapePod Vector authenticated grpc client
  • usage:
    v, err := vector.NewEP(
    vector.WithTarget(os.Getenv("BOT_TARGET")),
    )
  • added new escape-pod examples into cmd/examples.escape-pod/*

DEFECTS: This solution should be considered only as temporary, as each connection to EP robot will create its own token hash by calling UserAuthentication grpc, so the file at EP robot firmware /data/vic-gateway/token-hashes.json containing authenticated hashes will grow with each use of this SDK, until Token Hash file will consume all free space at robot's firmware and everything will crash. Received Token Hash should be rather stored locally for future re-usability.

EDIT: My mistake, there is no defect in the PR afterall, as because the constant "session token" in used for the authentication request, the previously generated token hash for that same "session" will get invalidated. So in fact, there should be always only one valid token hash for the given session - the currently received one. So in the end, it was correct, as nothing like token-hashes file overflow of newly generated tokens would ever happen...

However, for now, it seems that there is ONLY ONE valid token hash for the EP, no matter what "session id" is used in UserAuthentication request.? That, would on the other hand render the use of token hash stored on one device invalid, once the EP will be authenticated on another device...... This should be reviewed

…ed client

- usage:
	v, err := vector.NewEP(
		vector.WithTarget(os.Getenv("BOT_TARGET")),
	)
- added cmd/examples.escape-pod examples

Signed-off-by: cyb3rdog <macha.vaclav@gmail.com>
@cyb3rdog cyb3rdog closed this Apr 12, 2021
@cyb3rdog cyb3rdog reopened this Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant