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

Link Host certificates if available in Admin Container #106

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

sumukhballal
Copy link

@sumukhballal sumukhballal commented Dec 23, 2024

Description of changes:

This change links host certificates if it has been updated on the Bottlerocket host. It checks if the path /.bottlerocket/certs exists, if so links the certs to the ca-trust source.

  • Test variant aws-k8s-1.28 boot
  • Test variant aws-k8s-1.24 boot
  • Container specific tests

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

start_admin.sh Outdated
@@ -35,6 +36,15 @@ declare -r SSHD_CONFIG_FILE="${SSHD_CONFIG_DIR}/sshd_config"
# one of the methods below is available.
declare -i available_ssh_methods=0

# Link host certs if present into container & run update-ca-trust
if [ -e "${HOST_CERTS}" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if [ -e "${HOST_CERTS}" ]; then
if [[ -d "${HOST_CERTS}" ]]; then

In certain cases, if host certificates are present at the path '/.bottlerocket/certs', we would link them to the
ca-trust and update-ca-trust process to pickup the new certificates.
@sumukhballal
Copy link
Author

Addressed @jpculp 's comments.

@sumukhballal sumukhballal marked this pull request as ready for review December 31, 2024 20:27
@sumukhballal sumukhballal requested a review from jpculp December 31, 2024 20:27
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.

2 participants