File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -83,15 +83,18 @@ if [[ ! -z "$HTACCESS_DIRS" ]]; then
8383 IFS=' :' ; directories=($HTACCESS_DIRS ); unset IFS;
8484 for dir in " ${directories[@]} " ; do
8585 echo " ---> Adding .htpasswd protection to $dir "
86- echo -e ' AuthType Basic\nAuthName "Access to the stage docs"\nAuthUserFile /opt/app-root/src/.htpasswd\nRequire valid-user' > $dir /.htaccess
8786
88- echo " ---> Creating robots.txt to prevent crawling protected dir $dir "
89- PACKAGE=$( echo $dir | cut -d / -f 1)
90- TYPE=$( echo $dir | cut -d / -f 2)
91- URL_DIR=$( echo $dir | cut -d / -f 3)
92- URL_VERSION=$( echo $dir | cut -d / -f 4)
93- touch $PACKAGE /$TYPE /robots.txt
94- echo -e " User-agent: *\nDisallow: /$URL_DIR /$URL_VERSION " >> $PACKAGE /$TYPE /robots.txt
87+ # brute force separate password for container-platform-ocp distribution
88+ if [ $dir = " commercial_package/commercial/container-platform-ocp/4.3" ]; then
89+ echo " ---> separate .htpasswd protection to $dir "
90+
91+ echo -e ' AuthType Basic\nAuthName "Access to the stage docs"\nAuthUserFile /opt/app-root/src/.htpasswdocp\nRequire valid-user' > $dir /.htaccess
92+
93+ echo ' openshift:$apr1$c41fpuxh$jHe/W0gYLffn6501Cx2TS/' > commercial_package/commercial/.htpasswdocp
94+ else
95+ echo -e ' AuthType Basic\nAuthName "Access to the stage docs"\nAuthUserFile /opt/app-root/src/.htpasswd\nRequire valid-user' > $dir /.htaccess
96+ fi
97+
9598 done
9699 echo ' redhat:$apr1$1HYe8rB6$6pa5OVd01quYUYl8ymyqK0' > commercial_package/commercial/.htpasswd
97100 echo ' redhat:$apr1$1HYe8rB6$6pa5OVd01quYUYl8ymyqK0' > community_package/community/.htpasswd
You can’t perform that action at this time.
0 commit comments