From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 11740 invoked from network); 31 Oct 2021 00:10:14 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 31 Oct 2021 00:10:14 -0000 Received: from mail.9lab.org ([168.119.8.41]) by 4ess; Sat Oct 30 20:04:09 -0400 2021 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9lab.org; s=20210803; t=1635638639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=RYJWjJFnRssUlPqny84s7JHQow12X3Z22GLR/mQWmSs=; b=XDqa2y8V0rT123hCe3dzT+V0AqJvRC/3GM3cBJcqq4ZMa3UKXGBVEdVNVz89webNkdmHCS xVseNPfY61sF6Kyf1TOb65byul7WGna1GEsh5KREsgFOV0Uu+OvysSnOCaHaLjfAxoRa6f FWIT4LfHchcC4zzRpi4CfF1VK3+h1CQ= Received: from ken.9lab.home (host-185-64-155-70.ecsnet.at [185.64.155.70]) by mail.9lab.org (OpenSMTPD) with ESMTPSA id 4754dc76 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Sun, 31 Oct 2021 02:03:59 +0200 (CEST) Message-ID: To: 9front@9front.org CC: igor@9lab.org Date: Sun, 31 Oct 2021 02:06:04 +0200 From: igor@9lab.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-ythsqwgvqrctzptylnvlprzpnb" List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: reduce/map enhancement XMPP over SQL wrapper engine Subject: [9front] rc-httpd(8): document how to use HTTP basic authentication Reply-To: 9front@9front.org Precedence: bulk This is a multi-part message in MIME format. --upas-ythsqwgvqrctzptylnvlprzpnb Content-Disposition: inline Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit The attached patch to rc-httpd(8) documents how to use HTTP basic authentication. Please let me know if you have any feedback. From: Igor Böhm Date: Sat, 30 Oct 2021 23:59:12 +0000 Subject: [PATCH] rc-httpd(8): document how to use HTTP basic authentication --- diff 76990597f21f5ec3972403e8afbc18dba80ddabe f525323da61d6f06592dc5cd3f09a4ab9f833d45 --- a/sys/man/8/rc-httpd Sat Oct 30 00:59:06 2021 +++ b/sys/man/8/rc-httpd Sun Oct 31 01:59:12 2021 @@ -80,6 +80,11 @@ be configured via a similar method acting upon the .I location and/or other variables. +.PP +The +.I REMOTE_USER +variable provides a user identification string supplied by the +client as part of user authentication. .SH EXAMPLES The following examples demonstrate possible ways to configure .BR select-handler. @@ -95,6 +100,20 @@ .EE .RE .PP +HTTP basic authentication: +.RS +.EX +if(~ $SERVER_NAME *restricted.org){ + PATH_INFO=$location + FS_ROOT=/usr/kgb/www/$SERVER_NAME + authorize + if(~ $REMOTE_USER (glenda kgb)) + exec static-or-index + error 401 +} +.EE +.RE +.PP CGI: .RS .EX @@ -151,6 +170,8 @@ .B /rc/bin/rc-httpd/rc-httpd .TP .B /rc/bin/rc-httpd/select-handler +.TP +.B /rc/bin/rc-httpd/handlers/authorize .TP .B /rc/bin/rc-httpd/handlers/cgi .TP Cheers, Igor --upas-ythsqwgvqrctzptylnvlprzpnb Content-Disposition: attachment; filename=rc-httpd.basic.auth.patch Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit From: Igor Böhm Date: Sat, 30 Oct 2021 23:59:12 +0000 Subject: [PATCH] rc-httpd(8): document how to use HTTP basic authentication --- diff 76990597f21f5ec3972403e8afbc18dba80ddabe f525323da61d6f06592dc5cd3f09a4ab9f833d45 --- a/sys/man/8/rc-httpd Sat Oct 30 00:59:06 2021 +++ b/sys/man/8/rc-httpd Sun Oct 31 01:59:12 2021 @@ -80,6 +80,11 @@ be configured via a similar method acting upon the .I location and/or other variables. +.PP +The +.I REMOTE_USER +variable provides a user identification string supplied by the +client as part of user authentication. .SH EXAMPLES The following examples demonstrate possible ways to configure .BR select-handler. @@ -95,6 +100,20 @@ .EE .RE .PP +HTTP basic authentication: +.RS +.EX +if(~ $SERVER_NAME *restricted.org){ + PATH_INFO=$location + FS_ROOT=/usr/kgb/www/$SERVER_NAME + authorize + if(~ $REMOTE_USER (glenda kgb)) + exec static-or-index + error 401 +} +.EE +.RE +.PP CGI: .RS .EX @@ -151,6 +170,8 @@ .B /rc/bin/rc-httpd/rc-httpd .TP .B /rc/bin/rc-httpd/select-handler +.TP +.B /rc/bin/rc-httpd/handlers/authorize .TP .B /rc/bin/rc-httpd/handlers/cgi .TP --upas-ythsqwgvqrctzptylnvlprzpnb--