Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with HMAC secret when using a file #72

Closed
1 of 2 tasks
alexellis opened this issue Jul 5, 2018 · 1 comment
Closed
1 of 2 tasks

Issue with HMAC secret when using a file #72

alexellis opened this issue Jul 5, 2018 · 1 comment

Comments

@alexellis
Copy link
Owner

Issue identified by @MrTinD

Expected Behaviour

A secret for derek-secret-key (for HMAC) should be read from a file when needed i.e. docker secret create derek-secret-key ./derek-secret-key

Current Behaviour

When creating the HMAC secret via docker secret create derek-secret-key ./derek-secret-key we get an extra new-line in the data we read and that makes the validation of HMAC fail because in the GitHub UI we can only enter a single line of text.

File:

my-secret\n

GitHub:

my-secret

Possible Solution

  1. Work-around - use echo -n | docker secret create derek-secret-key - to suppress the new-line terminator in the file.

  2. Change code to always strip down any new-line characters when reading the HMAC secret.

Steps to Reproduce (for bugs)

  1. See above

Context

Caused frustration for user submitting patch, we need to make this better.

Your Environment

  • You're using the hosted Derek service

or

  • You host your own OpenFaaS cluster with Derek installed
  • Docker version docker version (e.g. Docker 17.0.05 ):
  Version:      18.05.0-ce
  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?

We're using Docker Swarm but this may apply to Kubernetes too.

@rgee0
Copy link
Contributor

rgee0 commented Jul 8, 2018

Derek close: addressed in #73

@derek derek bot closed this as completed Jul 8, 2018
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

No branches or pull requests

2 participants