Skip to content

Commit

Permalink
Merge pull request #9924 from M0ses/obs_service_user_http_auth
Browse files Browse the repository at this point in the history
[backend] user/pass for obs services called in docker
  • Loading branch information
M0ses committed Jul 17, 2020
2 parents c8db022 + d51783c commit b089e1a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/backend/BSConfig.pm.template
Original file line number Diff line number Diff line change
Expand Up @@ -308,4 +308,10 @@ our $local_registry_signatures_extension = 1;
# public cloud uploader configuration
# our $cloudupload_pubkey = "/etc/obs/cloudupload/_pubkey"; # default setting

# user/password to be used by services which needs to authenticate at
# OBS (e.g. kiwi_import)

# our $obs_service_user = "";
# our $obs_service_pass = "";

1;
4 changes: 4 additions & 0 deletions src/backend/call-service-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ DOCKER_IMAGE=`obs_admin --query-config docker_image`
DOCKER_CUSTOM_OPT=`obs_admin --query-config docker_custom_opt`
SERVICES_DIR=`obs_admin --query-config servicetempdir`
OBS_SERVICE_BUNDLE_GEMS_MIRROR_URL=`obs_admin --query-config gems_mirror`
OBS_SERVICE_USER=`obs_admin --query-config obs_service_user`
OBS_SERVICE_PASS=`obs_admin --query-config obs_service_pass`
SCM_COMMAND=0
WITH_NET=0
COMMAND="$1"
Expand Down Expand Up @@ -119,6 +121,8 @@ echo "#!/bin/bash"
echo "export OBS_SERVICE_APIURL=\"$OBS_SERVICE_APIURL\"" >> "$MOUNTDIR/$INNERSCRIPT"
echo "export OBS_SERVICE_BUNDLE_GEMS_MIRROR_URL=\"$OBS_SERVICE_BUNDLE_GEMS_MIRROR_URL\"" >> "$MOUNTDIR/$INNERSCRIPT"
echo "export OBS_SERVICE_DAEMON=\"$OBS_SERVICE_DAEMON\"" >> "$MOUNTDIR/$INNERSCRIPT"
echo "export OBS_SERVICE_USER=\"$OBS_SERVICE_USER\"" >> "$MOUNTDIR/$INNERSCRIPT"
echo "export OBS_SERVICE_PASS=\"$OBS_SERVICE_PASS\"" >> "$MOUNTDIR/$INNERSCRIPT"
echo "cd $INNERSRCDIR" >> "$MOUNTDIR/$INNERSCRIPT"
echo -n "${INNERSCRIPT}.command" >> "$MOUNTDIR/$INNERSCRIPT"

Expand Down

0 comments on commit b089e1a

Please sign in to comment.