-
Notifications
You must be signed in to change notification settings - Fork 484
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
feat(security): Add new implementation for security bootstrapper #2970
feat(security): Add new implementation for security bootstrapper #2970
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2970 +/- ##
==========================================
+ Coverage 40.28% 40.92% +0.64%
==========================================
Files 158 168 +10
Lines 13736 14018 +282
==========================================
+ Hits 5533 5737 +204
- Misses 7882 7954 +72
- Partials 321 327 +6
Continue to review full report at Codecov.
|
0c4ac37
to
5afc258
Compare
81e80c1
to
4113549
Compare
edgex-go$ GO111MODULE=on go list -m all The bold one in the above list, github.com/lib/pq, is the new go import/module used in this PR. And the dependency graph shows that total increase in new imports in count = 1. edgex-go$ GO111MODULE=on go mod graph In particular, searching on
Statistics measures as of 01/04/2021:
License type: MIT based on the content of license (compared https://github.com/lib/pq/blob/master/LICENSE.md with https://opensource.org/licenses/MIT). |
6ff8d3b
to
f7efb5d
Compare
fb0dd7a
to
dd0b41c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the import stats and usage metrics I approve adding lib/pq
. Not an explicit approval of the PR just the library itself
I approve adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't completed review , but wanted to get these comments posted.
cmd/security-bootstrapper/entrypoint-scripts/consul_wait_install.sh
Outdated
Show resolved
Hide resolved
cmd/security-bootstrapper/entrypoint-scripts/consul_wait_install.sh
Outdated
Show resolved
Hide resolved
cmd/security-bootstrapper/entrypoint-scripts/consul_wait_install.sh
Outdated
Show resolved
Hide resolved
66138a4
to
1fe9c57
Compare
cmd/security-bootstrapper/entrypoint-scripts/ready_to_run_wait_install.sh
Outdated
Show resolved
Hide resolved
1fe9c57
to
dc63644
Compare
cmd/security-bootstrapper/entrypoint-scripts/consul_wait_install.sh
Outdated
Show resolved
Hide resolved
d1b6f8c
to
2446ae0
Compare
1b2dc09
to
1f38eab
Compare
recheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Just a few more minor thngs.
cmd/security-bootstrapper/entrypoint-scripts/consul_wait_install.sh
Outdated
Show resolved
Hide resolved
cmd/security-bootstrapper/entrypoint-scripts/redis_wait_install.sh
Outdated
Show resolved
Hide resolved
1f38eab
to
c4eb6dd
Compare
@lenny-intel please re-review it again, i've addressed all comments + the toml structure we have agreed on over the phone. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close. Just a few minor updates and need to rebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just needs rebasing now.
…tallation Closes: edgexfoundry#2884 The scurity container bootstrapping initiates with security-bootstrapper service, in which it bootstraps the pre-seeded secrets and credentials. The security-bootstrapper starts with seeding the vault_wait_install.sh script (contains the dockerize utility) to be available for other containers that needs to wait for the intended done-listener is issued and connected. The other containers in the security bootstrapping process currently are: - Redis bootstrapping - Consul bootstrapping - Kong bootstrapping - Postgres bootstrapping The dockerize utility is used on those above containers to wait for that security-bootstrapper tcp listener done signal and then those container can proceed to start up. Security-bootstrapper's entrypoint script is also for other edgex-core-services to wait for the intended port to be ready. The majority of edgex-core-services are converted to alpine-based image to facilitate the ability to use entrypoint scripts. Also remove unused environment flag: SECRETSTORE_SETUP_DONE_FLAG from secretstore_setup's entrypoint script That env flag will also needed to be cleaned up on the docker-compose file All timeout for dockerize wait-timeout in one central place. Also add the consul local config for disabling the auto check upate as currently consul is not running in SSL mode. Add lib/pq into Attribution.txt Run security-bootstrapper executeable as non-root user, $$EDGEX_USER All env. variables of entrypoint scripts are populated from the env files of compose builder in developer-scripts Signed-off-by: Jim Wang <[email protected]>
295f404
to
401c9bf
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Rebased and squashed. Thanks! |
The full blown implementation is base on ADR security bootstrapping containers.
The security container bootstrapping initiates with security-bootstrapper service, in which it bootstraps
the pre-seeded secrets and credentials.
The security-bootstrapper starts with seeding the vault_wait_install.sh script (contains the dockerize utility)
to be available for other containers that needs to wait for the intended done-listener is issued and connected.
The other containers in the security bootstrapping process currently are:
The dockerize utility is used on those above containers to wait for that security-bootstrapper
tcp listener done signal and then those container can proceed to start up.
Signed-off-by: Jim Wang [email protected]
PR Checklist
Please check if your PR fulfills the following requirements:
If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/master/.github/Contributing.md.
What is the current behavior?
This is a totally new implementation
Issue Number: #2884
What is the new behavior?
New security bootstrapping mechanism and entrypoint scripts to coordinate the startup steps for various service containers.
Does this PR introduce a breaking change?
New Imports
https://wiki.edgexfoundry.org/display/FA/Vetting+Process+for+3rd+Party+Dependencies
Add pure Golang postgres driver tool lib/pq to facilitate the pinging postgres db connection for the readiness of
kong-db
. This is needed because thepostgres kong-db
service docker-container currently is read-only and hence unable to install any new utilities on that container itself.Add dockerize executable to facilitate the gating or waiting mechanism on various containers. This one is not used directly in new imports or modules; rather only used in the shell scripts.
Specific Instructions
Are there any specific instructions or things that should be known prior to reviewing?
local testing instructions:
make docker
docker-compose up
Other information