apache / openwhisk-apigateway

Apache OpenWhisk API Gateway service for exposing actions as REST interfaces.
https://openwhisk.apache.org/
Apache License 2.0
64 stars 45 forks source link

Fix App ID bug, add unit tests #357

Closed mhamann closed 5 years ago

mhamann commented 5 years ago

A bug with the App ID OAuth flow was introduced as part of #353 and wasn't caught due to a missing unit test. The unit test wasn't written because it was fairly involved.

Given that bug, this PR fixes the defect and adds test coverage to the function, which should ensure this doesn't occur again.

Due to the need to generate JWTs and JWKs to fully test this, the step CLI is used in the test build. It appears to be Apache 2.0 licensed, so I assume it is safe to use? Please let me know if there are any concerns.

There are a couple of minor perf improvements to the unit test Dockerfile so that build caching can occur for local testing. Thus, the install-deps.sh script is no longer needed (and it was only used by the tests).

Assuming the build is successful, this should be ready to go.