Repository navigation
Enable user and password update - #149
Merged
Merged
Conversation
Johan-Liebert1
requested changes
Oct 7, 2026
| } | ||
|
|
||
| cmd.Flags().StringVar(®istryUser, "registry-user", "", "Username for the authenticated registry") | ||
| cmd.Flags().StringVar(®istryPassword, "registry-password", "", "Password for the authenticated registry") |
Member
There was a problem hiding this comment.
This will show the password in the terminal right? We should probably use a hidden field for passwords
Collaborator
Author
There was a problem hiding this comment.
True, but it is an issue we already have in the setting of the password which we should fix
|
|
||
| escaped := strings.ReplaceAll(htpasswdEntry, "'", "'\\''") | ||
| _, err = m.podman.ContainerExec(ctx, config.AuthRegistryContainerName, []string{ | ||
| "/bin/sh", "-c", fmt.Sprintf("printf '%%s\\n' '%s' > /auth/htpasswd", escaped), |
Member
There was a problem hiding this comment.
we can use backticks in Sprintf which should also help with escaping quotes
|
|
||
| escaped := strings.ReplaceAll(htpasswdEntry, "'", "'\\''") | ||
| _, err = m.podman.ContainerExec(ctx, config.AuthRegistryContainerName, []string{ | ||
| "/bin/sh", "-c", fmt.Sprintf("printf '%%s\\n' '%s' > /auth/htpasswd", escaped), |
Member
There was a problem hiding this comment.
when restart the container entrypoint re-executes this leading to file being overwritten with initial credentials
Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Allow updating auth registry credentials by recreating the container with new credentials. We need to stop and recreate the container in order to update the AUTH_HTPASSWD env variable. Otherwise, the password will be overwritten at container restart. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Extend the auth registry integration test to verify credential rotation with both user and password change, and add a CreateAuthPod helper to reduce duplication. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
alicefr
force-pushed
the
update-password
branch
from
October 12, 2026 14:33
4838de0 to
4441002
Compare
Johan-Liebert1
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new command to the registry
update-credentialsto update the user and password authentication for the registry.Fixes: #148