X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.22.2a (ClamAV engine v0.102.2) X-Junk-Score: 0 [] X-KAS-Score: 0 [] From: "Ralf Schuchardt" Received: from mout.gmx.net ([212.227.15.18] verified) by selbstdenker.ag (CommuniGate Pro SMTP 6.3.3) with ESMTPS id 26042340 for webobjects-dev@wocommunity.org; Fri, 18 Jun 2021 14:26:16 +0200 Received-SPF: pass receiver=post.selbstdenker.com; client-ip=212.227.15.18; envelope-from=rasc@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1624019156; bh=erOzPm/W0JCa9hcnTkRLFB/vEj1696Yk4zkv6Szfy+M=; h=X-UI-Sender-Class:From:To:Subject:Date:In-Reply-To:References; b=L1Hvz7/UUSVLBwkQ0zKbp2XPK7WNIyJ9fhUc26mT8vfTqUHtRYUYEX4uIDAqXICqe /QgtmkO/L3QUBM8LaSOm4Mcztt3ZXvKItR6zk/R/tMXhQKPYENv+g5CDkq0PosrH+B kFqPTuAV2RjfMLh0QgRvtLVgK+KGUXS+zf8OxRko= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.32] ([207.89.105.208]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Ml6mE-1lQQff39RM-00lXMu for ; Fri, 18 Jun 2021 14:25:56 +0200 To: "WebObjects & WOnder Development" Subject: Re: [WO-DEV] Deployment issue on Catalina "You don't have permission to access this resource" Date: Fri, 18 Jun 2021 14:25:24 +0200 X-Mailer: MailMate (1.14r5798) Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_AC4BF5DC-2C27-4F71-818D-626A80B48692_=" Embedded-HTML: [{"plain":[1781,7136],"uuid":"CB194685-2B48-42F7-9B84-90AAF241C0D2"}] X-Provags-ID: V03:K1:HGsTzhPe9Ywo5DMfaE2SUUiyA5HqH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x8iKidkh4kzpfbcYKzGY3yu35MGzSFpYW9KG04EztRpAlzCwlM5k8DUkS T8Zhc2Pcmo45wIL6v+h9WFqjb0bMrSYRvh7XJRVWy+Vc1wzb+SKFAmU4I+wo7xqeddu85OKaa AB//1WkCXSLZfX8BmHM/w/UFkmM1TpH5O/sYnkQiEpkvBCMHmI3TC0v8FSNmttQiRC0CZeJPX VynyP+SI+7oRSMfLKC7E/srZ5ySIwlWeDIMeTCKaa4APdjfUVFg4DM9IoBy8n+hjoNudaU14p c3jo3Ztq7MptyNe3sR6eFh0Hn/RhheYMZ3v --=_MailMate_AC4BF5DC-2C27-4F71-818D-626A80B48692_= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Do you have a =E2=80=9ELocation=E2=80=9C based access grant in your confi= g? In my (CentOS) Apache config I have this statement: ``` # Specific to Apache 2.4 Require all granted Require all denied ``` I have also commented out all ScriptAlias* directives in all apache = config files. Logging can be enabled by setting a WebObjectsLog directive: ``` # To change the logging options, read the following comments: # The option name is "WebObjectsLog" and the first value indicates the = path of the log file. # The second value indicates the log level. There are five, in = decreasing informational order: # "Debug", "Info", "Warn", "Error", "User" # # Note: To enable logging, touch '/tmp/logWebObjects' as the = administrator user (usually root). # After apache starts, you'll have to change the owner permissions to = 'www'. # Type: sudo chown www /Library/WebObjects/Logs/WebObjects.log # See /tmp/logWebObjects insecure tempfile in = WebObjects # # The following line is the default: # WebObjectsLog /tmp/WebObjects.log Debug ``` For simple applications you could also completely discard the WOAdaptor = and use the standard proxy mechanism. Single instance deployments = don=E2=80=99t even need a balancer setup: ``` # in the site config: ProxyPass /cgi-bin/WebObjects/App.woa = http://localhost:2001/cgi-bin/WebObjects/App.woa ProxyPassReverse /cgi-bin/WebObjects/App.woa = http://localhost:2001/cgi-bin/WebObjects/App.woa Require all granted Options none RequestHeader append x-webobjects-adaptor-version "mod_proxy" ``` Ralf On 18 Jun 2021, at 12:48, Markus Ruggiero (rucotec) wrote: > Thanks Jesse, yeah, I tried all. All files are w:r including = > /Library/WebObjects/Configuration/* where SiteConfig.xml lives. = > JavaMonitor is writing the SiteConfig.xml, wotaskd uses it and it is = > readable for anything Apache. > > Apache running under _www or, as I just now tried running it under my = > own uid, makes no difference. The error_log shows this line: > [Fri Jun 18 10:39:44.022934 2021] [authz_core:error] [pid 50274] = > [client 127.0.0.1:60139] AH01630: client denied by server = > configuration: /apps, referer: = > http://localhost:3333/cgi-bin/WebObjects/JavaMonitor.woa/wo/6tRZCAqtsrs= CiSrXLUPUMg/0.0.1.0 = > > > I tried with cgi-bin as well as apps. > > For me this indicates something in WOAdaptor not being right. When I = > google this error everyone is pointing to Apache config where in some = > places Require all allowed is needed. That is there and Apache can = > serve static filesystem based resources. > As the error points to /apps as the resource that is not accessible = > this again points to WOAdaptor. /apps is NOT a file system path (no = > block in http.conf) but is part of the adaptor URL (set in = > JavaMonitor as http://woapps/apps/WebObjects = > ). Seems that WOAdaptor does not = > properly take over and then of course Apache would try to access this = > non-existing path. > > This brings me to the next question: how do I debug WOAdaptor? Or am I = > going nuts? > > Something else: I compared all the LoadModule directives in httpd.conf = > with those on the customer deployment and made sure there weren=E2=80=99= t = > modules excluded. Nothing helped. Next is probably to virtualise the = > client deployment machine, strip it down to the bare minimum and run = > it as a test deployment server inside VMWare. Maybe last resort.... > > ---markus--- > >> On 17 Jun 2021, at 17:07, Jesse Tayler = >> wrote: >> >> Well, gosh, it just has to be apache and the OS =E2=80=94 run down the= list = >> of suspects >> >> "client denied by server configuration" is reported so that=E2=80=99s = >> basically the OS saying you can=E2=80=99t read =E2=80=94 I think? >> >> I can=E2=80=99t read your rules, but since apache doesn=E2=80=99t seem= to barf = >> did you check user and OS level stuff carefully? >> >> - the user that is running apache? >> - the actual folder and parent folder settings? >> - read those folders as that user from the command line? >> >> Other random tests regarding OS level file permissions? >> >> I=E2=80=99m no expert here, but I=E2=80=99m pretty sure those files go= tta be 755 = >> and it seems like the apache log is reporting a filesystem level = >> permission error=E2=80=A6? >> >> >> >> >>> On Jun 17, 2021, at 10:59 AM, Markus Ruggiero (rucotec) = >>> >> > wrote: >>> >>> This is a new setup. Up to now I have had a dedicated deployment = >>> machine that works. As this is for a customer I do not want to touch = >>> it. >>> >>> We have a weird problem that only shows when more than one instance = >>> of the same app is running. To be able to debug and analyze this I = >>> thought I=E2=80=99d configure my dev machine so that I can deploy to = it = >>> easily without disturbing anything productive. >>> >>> Yes, of course mod_webobjects is loaded. This is the full = >>> wo_apache.config: >>> >>> LoadModule WebObjects_module = >>> /Users/Shared/Developer/Libraries/Wonder/ApacheWOAdaptor/Apache2.4/ma= cOS/mod_WebObjects.so >>> WebObjectsAlias /apps/WebObjects >>> WebObjectsConfig http://woapps:1085 10 >>> >>> all the other nice stuff in there is commented and not active. >>> >>> If on a command line I type >>> apachectl -F >>> >>> I get a whole list of known directives and there are many WO related = >>> ons. Where else would Apache get those if not through = >>> mod_webobjects? This indicates that the module is properly loaded. >>> >>> >>>> On 17 Jun 2021, at 16:44, Jesse Tayler = >>>> >>> > wrote: >>>> >>>> Sounds like apache, are you sure things like mod_webobjects are = >>>> loaded and those base things? >>>> >>>> I can=E2=80=99t read apache rules=E2=80=A6sorry! They are all just r= andom = >>>> characters to me=E2=80=A6I guess the questions is what=E2=80=99s cha= nged or is = >>>> this a new setup giving you a hard time? >>>> >>>>> On Jun 17, 2021, at 10:40 AM, Markus Ruggiero (rucotec) = >>>>> >>>> > wrote: >>>>> >>>>> Probably missing something so basic that I simply do not see it. = >>>>> Must be too hot outside (33 Celsius) and no aircon in the office = >>>>> (31 Celsius). >>>>> Hope someone can point me in the right direction. >>>>> >>>>> Deployment setup on my dev machine (MBpro, macOS Catalina, JRE = >>>>> 15). Apache installed via homebrew (Apache/2.4.46 (Unix)), Apple's = >>>>> Apache not in use >>>>> >>>>> Apache configured with various virtual hosts, resolved through = >>>>> /etc/hosts. This all works, Apache serves static resources from = >>>>> these hosts. >>>>> >>>>> JavaMonitor runs, wotaskd runs, Apache loads WOAdaptor by = >>>>> including wo_apache.conf >>>>> apachectl -F knows about WOAdaptor, so I assume it is properly = >>>>> loaded >>>>> >>>>> wo_apache.conf has this line: >>>>> WebObjectsAlias /apps/WebObjects >>>>> >>>>> The Apache config file http.conf has this line >>>>> # ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) = >>>>> "/usr/local/var/www/CGI-Executables/$1" >>>>> ScriptAliasMatch ^/apps/((?!(?i:webobjects)).*$) = >>>>> "/usr/local/var/www/CGI-Executables/$1" >>>>> >>>>> (tried both variants, with cgi-bin and the one with apps) >>>>> >>>>> In WOMonitor this is the URL to the adaptor: >>>>> http://woapps/apps/WebObjects >>>>> (woapps being one of my virtual hosts) >>>>> >>>>> When I try to access an installed app the browser reports an error >>>>> "You don't have permission to access this resource=E2=80=9D >>>>> >>>>> and Apache puts a message into the error log file: >>>>> [Thu Jun 17 13:43:57.329921 2021] [authz_core:error] [pid 42093] = >>>>> [client 127.0.0.1:64420] AH01630: client denied by server = >>>>> configuration: /apps >>>>> >>>>> /apps is not a directory but the first part of the WO URL and thus = >>>>> should go to the WOAdaptor. Has the ScriptAliasMatch (see above) = >>>>> anything to do with this? >>>>> >>>>> Thanks for any help >>>>> ---markus--- >>>>> >>>>> >>>>> Markus Ruggiero >>>>> >>>>> rucotec GmbH web https://rucotec.ch = >>>>> >>>>> Steinenvorstadt 79 email markus.ruggiero@rucotec.ch = >>>>> >>>>> 4051 Basel / Switzerland mobile +41 79 508 4701 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>> >>> >>> >>> >>> Markus Ruggiero >>> >>> rucotec GmbH web https://rucotec.ch = >>> >>> Steinenvorstadt 79 email markus.ruggiero@rucotec.ch = >>> >>> 4051 Basel / Switzerland mobile +41 79 508 4701 >>> >>> >>> >>> >>> >>> >>> >>> >> > > > Markus Ruggiero > > rucotec GmbH web https://rucotec.ch > Steinenvorstadt 79 email markus.ruggiero@rucotec.ch > 4051 Basel / Switzerland mobile +41 79 508 4701 --=_MailMate_AC4BF5DC-2C27-4F71-818D-626A80B48692_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Do you have a =E2=80=9ELocation=E2=80=9C based access gra= nt in your config?

In my (CentOS) Apache config I have this statement:

# Specific to Apache 2.4
<Location /cgi-bin/WebObjects/>
    <Limit GET POST OPTIONS >
      Require all granted
    </Limit>
    Require all denied
</Location>

I have also commented out all ScriptAlias* directives in = all apache config files.

Logging can be enabled by setting a WebObjectsLog directi= ve:

# To change the logging options, read the following comments:
# The option name is "WebObjectsLog" and the first value indica=
tes the path of the log file.
# The second value indicates the log level. There are five, in decreasing=
 informational order:
#       "Debug",    "Info",    "Warn",    &=
quot;Error",    "User"
#
# Note: To enable logging, touch '/tmp/logWebObjects' as the administrato=
r user (usually root).
# After apache starts, you'll have to change the owner permissions to 'ww=
w'.
# Type: sudo chown www /Library/WebObjects/Logs/WebObjects.log
# See <rdar://problem/5296267> /tmp/logWebObjects insecure tempfile=
 in WebObjects
#
# The following line is the default:
# WebObjectsLog /tmp/WebObjects.log Debug

For simple applications you could also completely discard= the WOAdaptor and use the standard proxy mechanism. Single instance depl= oyments don=E2=80=99t even need a balancer setup:

# in the site config:
ProxyPass /cgi-bin/WebObjects/App.woa http://localhost:2001/cgi-bin/WebOb=
jects/App.woa
ProxyPassReverse /cgi-bin/WebObjects/App.woa  http://localhost:2001/cgi-b=
in/WebObjects/App.woa

<Proxy http://localhost:2001/cgi-bin/WebObjects/App.woa/>
	Require all granted
    Options none
    RequestHeader append x-webobjects-adaptor-version "mod_proxy&quo=
t;
</Proxy>

Ralf

On 18 Jun 2021, at 12:48, Markus Ruggiero (rucotec) wrote= :

Thanks Jesse, yeah, I tried= all. All files are w:r including /Library/WebObjects/Configuration/* whe= re SiteConfig.xml lives. JavaMonitor is writing the SiteConfig.xml, wotas= kd uses it and it is readable for anything Apache.

Apache running under _www or, as I just now= tried running it under my own uid, makes no difference. The error_log sh= ows this line:
[Fri Jun 18 10:39:44.022934 2021] [au= thz_core:error] [pid 50274] [client 127.0.0.1:60139] AH01630: client deni= ed by server configuration: /apps, referer: http://localhost:3333/cgi-bin/WebObjects/JavaMonitor.woa/wo/6= tRZCAqtsrsCiSrXLUPUMg/0.0.1.0

I tried with cgi-bin as well as apps.

For me this indicates something i= n WOAdaptor not being right. When I google this error everyone is pointin= g to Apache config where in some places Require all allowed is needed. Th= at is there and Apache can serve static filesystem based resources. =
As the error points to /apps as the resource that i= s not accessible this again points to WOAdaptor. /apps is NOT a file syst= em path (no <Directory> block in http.conf) but is part of the adap= tor URL (set in JavaMonitor as http://woapps/apps/WebObjects). Seems that WOAdaptor does = not properly take over and then of course Apache would try to access this= non-existing path.

This brings me to the next question: how do I debug WOAdaptor? Or am I= going nuts?

So= mething else: I compared all the LoadModule directives in httpd.conf with= those on the customer deployment and made sure there weren=E2=80=99t mod= ules excluded. Nothing helped. Next is probably to virtualise the client = deployment machine, strip it down to the bare minimum and run it as a tes= t deployment server inside VMWare. Maybe last resort....

---markus---
<= br class=3D"">
On 17 = Jun 2021, at 17:07, Jesse Tayler <webobjects-dev@wocommunity.org> wrote:
Well, gosh, it just has to be apache and th= e OS =E2=80=94 run down the list of suspects

"client denied by server configuration" is report= ed so that=E2=80=99s basically the OS saying you can=E2=80=99t read =E2=80= =94 I think?

I = can=E2=80=99t read your rules, but since apache doesn=E2=80=99t seem to b= arf did you check user and OS level stuff carefully?

- the user that is running apache?<= /div>
- the actual folder and parent folder settings?
- read those folders as that user from the command line?=

Other random t= ests regarding OS level file permissions?

I=E2=80=99m no expert here, but I=E2=80=99m pret= ty sure those files gotta be 755 and it seems like the apache log is repo= rting a filesystem level permission error=E2=80=A6?
=



On Jun 17, 2021, at 10:59 AM, Markus Ruggiero = (rucotec) <webobjects-dev@wocommunity.org> wrote:

This is a new setup. U= p to now I have had a dedicated deployment machine that works. As this is= for a customer I do not want to touch it.

=
We have a weird problem that only shows when more t= han one instance of the same app is running. To be able to debug and anal= yze this I thought I=E2=80=99d configure my dev machine so that I can dep= loy to it easily without disturbing anything productive.

Yes, of course mod_webobjects is = loaded. This is the full wo_apache.config:

LoadModule WebObjects_module = /Users/Shared/Developer/Libraries/Wonder/ApacheWOAdaptor/Apache2.4/macOS/= mod_WebObjects.so
WebObjectsAlias /a= pps/WebObjects
WebObjectsConfi= g http://woapps:1085 10

all the oth= er nice stuff in there is commented and not active.
=
If on a command line I type
apachectl -F

I get a whole list of known directives and there are many WO r= elated ons. Where else would Apache get those if not through mod_webobjects? This indic= ates that the module is properly loaded.

<= /div>

=
On 17 Jun 2021, at 16:44, Jesse Tayler <webobjects-dev@wocommunity= =2Eorg> wrote:

Sounds like apache,= are you sure things like mod_webobjects are loaded and those base things= ?

I can=E2=80=99t rea= d apache rules=E2=80=A6sorry! They are all just random characters to me=E2= =80=A6I guess the questions is what=E2=80=99s changed or is this a new se= tup giving you a hard time?

=
On Jun 17, 2021, at = 10:40 AM, Markus Ruggiero (rucotec) <webobjects-dev@wocommunity.org> wrote:=

=
Probably missing something so basic that= I simply do not see it. Must be too hot outside (33 Celsius) and no aircon in the offi= ce (31 Celsius). 
Hope someone can point me in= the right direction.

Deployment setup on my dev machine (MBpro, macOS Catalina, JRE 15). Apac= he installed via homebrew (Apache/2.4.46 (Unix)), Apple's Apache not in u= se

Apache confi= gured with various virtual hosts, resolved through /etc/hosts. This all w= orks, Apache serves static resources from these hosts.

JavaMonitor runs, wotaskd runs, A= pache loads WOAdaptor by including wo_apache.conf
apachectl -F knows abo= ut WOAdaptor, so I assume it is properly loaded

wo_apache.conf has this line:
WebObjectsAlias &nb= sp; /apps/WebObjects 

The Apache config file http.conf has this line
# ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).= *$) "/usr/local/var/www/CGI-Executables/$1"
ScriptAl= iasMatch ^/apps/((?!(?i:webobjects)).*$) "/usr/local/var/www/CGI-Executab= les/$1"

(= tried both variants, with cgi-bin and the one with apps)

In WOMonitor this is the URL to t= he adaptor:
(woap= ps being one of my virtual hosts)
When I try to = access an installed app the browser reports an error
"You don't have permission to access this resource=E2=80=9D

and Apache puts a message i= nto the error log file:
[Thu Jun 17 = 13:43:57.329921 2021] [authz_core:error] [pid 42093] [client 127.0.0.1:64= 420] AH01630: client denied by server configuration: /apps

/apps is not a director= y but the first part of the WO URL and thus should go to the WOAdaptor. H= as the ScriptAliasMatch (see above) anything to do with this?

Thanks for any help
<= div class=3D"">---markus---

=
=

Markus Ruggiero
<= /b>

rucotec GmbH               =         web https://rucotec.c= h
Steinenvorstadt 79       = ;         email mark= us.ruggiero@rucotec.ch
= 4051 Basel / = Switzerland&= nbsp;        mobile +41 79 508 4701









=



=

Markus Ruggiero
<= /span>

rucotec GmbH    &nbs= p;                   web https://rucotec.ch
Steinenvorstadt 79                email markus.ruggiero@rucotec.ch
<= div style=3D"margin: 0px;" class=3D"">4051 Basel / Switzerland         mobile +41 79 508 4701
<= div class=3D"">
<= br class=3D"Apple-interchange-newline">







=


= Markus Ruggiero

<= p style=3D"margin: 0px;" class=3D"">
<= /span>

rucotec GmbH              =           web https://rucot= ec.ch
Steinenvorstadt 79      &nb= sp;         email ma= rkus.ruggiero@rucotec.ch
4051 Basel= / Switzerland    mobile +41 79 508 4701





<= /div>


--=_MailMate_AC4BF5DC-2C27-4F71-818D-626A80B48692_=--