Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

feat(security): Add upload-tls-cert makefile target #364

Merged

Conversation

jim-wang-intel
Copy link
Contributor

Add a new makefile target for compose-builder: upload-tls-cert
This can be used to setup a bring-your-own (BYO) TLS certificate for Kong proxy server in an Edgex docker-compose stack

Closes: edgexfoundry/edgex-go#1926, edgexfoundry/edgex-go#1922

Signed-off-by: Jim Wang [email protected]

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • [X ] Docs have been added / updated (for bug fixes / features)

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/developer-scripts/blob/master/.github/Contributing.md.

What is the current behavior?

Currently, there is no make target to upload Kong's TLS certificate.

Issue Number: edgexfoundry/edgex-go#1926

What is the new behavior?

New make file target upload-tls-cert is added.

Does this PR introduce a breaking change?

  • Yes
  • [X ] No

Specific Instructions

Are there any specific instructions or things that should be known prior to reviewing?

Other information

To test this locally, do the following steps:

  1. Go to edgex-go, and create the local version of docker images by make docker
  2. In the developer-scripts repo, git clone this PR, and change the directory to compose-builder
  3. Run the dev version of EdgeX stack via make run dev
  4. Run the following make command:
$  make upload-tls-cert dev CERT_INPUT_FILE=~/go/src/github.com/edgexfoundry/edgex-go/internal/security/config/command/proxy/tls/testdata/testCert.pem KEY_INPUT_FILE=~/go/src/github.com/edgexfoundry/edgex-go/internal/security/config/command/proxy/tls/testdata/testCert.prkey
  1. You should see no error return, and see the message Kong TLS certificate uploaded.

Add a new makefile target for compose-builder: upload-tls-cert
This can be used to setup a bring-your-own (BYO) TLS certificate for Kong proxy server in an Edgex docker-compose stack

Closes: edgexfoundry/edgex-go#1926, edgexfoundry/edgex-go#1922
Signed-off-by: Jim Wang <[email protected]>
bnevis-i
bnevis-i previously approved these changes Dec 10, 2020
Copy link
Collaborator

@bnevis-i bnevis-i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works flawlessly.

Address PR feedback on modifying the usage text

Signed-off-by: Jim Wang <[email protected]>
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lenny-goodell lenny-goodell merged commit ceeaa6f into edgexfoundry:master Dec 10, 2020
@jim-wang-intel jim-wang-intel deleted the add-make-upload-tls-cert branch December 11, 2020 18:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable user-specified Kong proxy certificate
3 participants