Re: Basic Q: Can ofbiz run in subdir and use HTTP auth?

2018-04-02 Thread Shi Jinghai
Hi Jochen,

Sorry for my late reply.

All the three ways you mentioned can be implemented in OFBiz (not OOTB AFAIK), 
I'm afraid you have to write your own login in OFBiz, and you can find many 
code pieces are there in OFBiz.

Be careful if you want to duplicate LDAP password to OFBiz, you have to make 
sure whether the password algorithm is supported in OFBiz and JDK.

There're many other functions has to be considered as well, including logout, 
login policy, password policy, create/remove a user, password change and ... 
LDAP servers down.

Kind Regards,

Shi Jinghai

-邮件原件-
发件人: Jochen.Boutens@ [mailto:finalbeta.net jochen.bout...@finalbeta.net] 
发送时间: 2018年3月30日 14:45
收件人: user@ofbiz.apache.org
主题: Re: Basic Q: Can ofbiz run in subdir and use HTTP auth?

Hello Shi, 

You are correct, the webserver (reverse proxy) in front of the ofbiz server wil 
validate the users credentials against ldap and send them in the header to the 
ofbiz server. 

What I don't yet understand is what the options are in ofbiz. Because I've 
deployed a number of systems this way, and there are many differend methods 
they handle it. 

On some systems, I have apache validating the credentials from the http header 
once more against ldap, then the application (ofbiz) just accepts that the 
credentials are validated and couples it to a local user that it creates on the 
fly. 

On some systems I have apache validating the credentials from the http header 
only to pass it to the application, where the application once more does it's 
own ldap validation and then couples it to a local user that it creates on the 
fly if needed. 

On other systems I don't need to configure basic auth on the webserver at all 
(own/nextcloud), the application just checks if the header is presend and logs 
the user in while validating the ldap credentials itself. etc. 

Sry for making it complicated, I'm just trying to understand how the process 
would actually work. 

On 2018/03/30 02:35:01, Shi Jinghai  wrote: 
> Hi Jochen,
> 
> Let's slow down.
> 
> For Q2, as you mentioned, you have a webserver deployed in front of OFBiz. If 
> so, the authn work is done in the webserver. The requests proxyed to OFBiz 
> are all authened. Right?
> 
> My puzzle is why you insist OFBiz has to validate against LDAP, for 
> authorization?
> 
> 
> -邮件原件-
> 发件人: Jochen.Boutens@ [mailto:finalbeta.net 
> jochen.bout...@finalbeta.net]
> 发送时间: 2018年3月30日 1:52
> 收件人: user@ofbiz.apache.org
> 主题: Re: Basic Q: Can ofbiz run in subdir and use HTTP auth?
> 
> 
> Hello Shi,
> 
> Thanks for your response. Q1 is clear. 
> 
> About your response to question 2. You seem to imply that LDAP + Basic auth 
> can be done. But I'm not sure what you are suggesting exaclty. 
> The Tomcat SSO you are talking about is this? ( 
> https://tomcat.apache.org/tomcat-8.0-doc/windows-auth-howto.html ) The only 
> refference it makes to Basic auth seems to be that it doesn't work and you 
> need SPNEGO. 
> Apero CAS and QAuth2 both require another server (something not in my setup) 
> right? 
> 
> To be clear, can ofbiz take the basic auth credentials from the header 
> to logon the user? (validating it against ldap, or trusting the 
> servers validation of the basic auth)
> 
> On 2018/03/29 08:44:07, Shi Jinghai  wrote: 
> > Q1: http://server/ofbiz/
> > Yes. It's a simple configuration for both Apache Httd and Nginx.
> > 
> > Q2: Http header basic authentication Not sure whether Jacques has 
> > completed the new Tomcat SSO. If yes, then it's ready OOTB.
> > For this kind authentication, OFBiz also supports Apereo CAS (by LDAP 
> > plugin) and OAuth2 (by passport plugin).
> > 
> > Have fun,
> > 
> > -邮件原件-
> > 发件人: Jochen.Boutens@ [mailto:finalbeta.net 
> > jochen.bout...@finalbeta.net]
> > 发送时间: 2018年3月29日 15:39
> > 收件人: user@ofbiz.apache.org
> > 主题: Basic Q: Can ofbiz run in subdir and use HTTP auth?
> > 
> > Hello, We are exploring functionality of several sollutions. Ofbiz seems to 
> > qualify for most tasks. 
> > 
> > I have two questions I would like to make sure before we begin testing: 
> > 
> > For integration into our systems we require the the solution to run under a 
> > subdirectory of the root of the webserver. (http://server/ofbiz/). 
> > ( The reason for this is that ofbiz will be reverse proxied and that 
> > http://reverseproxy/ is used for something else. A differend domain is not 
> > a option because of question two).
> > 
> > For integration into our systems we prefer that the application can use 
> > authentication data in the http header (Basic Authorization/Http 
> > authorization). Our reverse proxy sends the users (LDAP) credentials in the 
> > header allowing applications to automatically log the user in. 
> > 
> > Can these things be done with Ofbiz? 
> > 
> > Thanks 

RE: Chargebacks

2018-04-02 Thread james

Paul - How would you open the invoice back up to now show it is still
due.  After a payment is marked as confirmed I noticed the void button
is no longer there.

Thanks,

James
 Original Message 
Subject: Re: Chargebacks
From: Paul Mandeltort 
Date: Fri, March 30, 2018 6:40 am
To: user@ofbiz.apache.org

It would just be a new payment issued from you to the customer. This is
better anyway as you’d want it to be in a separate account for
returned payments/bad debts for your accountant to track. 

--P

> On Mar 30, 2018, at 7:40 AM,   
> wrote:
> 
> How does the system handle a charge back of a customer payment that has
> been confirmed? Sometimes chargebacks don't happen until months after
> an invoice has been paid. I noticed you no longer have the ability to
> void the payment after it has been confirmed.
> 
> Thanks,
> 
> James


答复: A bug in 16.11.04

2018-04-02 Thread Schumann Ye
Dear Scott,



I agree with you because there is no need to add the locale translation in the 
release 16.11.03 and it works perfectly.

However, I could not figure out why and the temporary solution works for me.



Thanks

B.R.

Schumann



发送自 Windows 10 版邮件应用




From: Scott Gray 
Sent: Monday, April 2, 2018 6:08:53 AM
To: user@ofbiz.apache.org
Subject: Re: A bug in 16.11.04

My knowledge is a little bit out of date but the code used to be able to
fallback through to the default locale and if it still didn't find anything
then it would simply output the key instead.

For example if the user's locale was zh_cn and the default locale was en_US
then it would look for a value against each of the following locales:
zh_cn
zh
en_us
en
If it didn't find anything against any of those locales then it would
output the property key.

Adding the missing translation would fix your issue but a ticket would be
useful to fix the missing translation handling which seems buggy to me
based on this report.

Regards
Scott

On Sun, 1 Apr 2018, 02:31 Schumann Ye,  wrote:

> Dear Deepak and Paul,
>
> Sorry that I was totally tied up with some management issues in the past
> days and was late to reply to you.
> @Deepak, as tested, the issue could be solved by adding the needed locale
> in the file framework/service/config/ServiceUiLabels.xml.
> Do you still think it is necessary to create a jira note? Thanks
> So, @Paul, yes to your question.
>
> B.R.
> Schumann
>
> -邮件原件-
> 发件人: Paul Foxworthy 
> 发送时间: 2018年3月30日 13:26
> 收件人: user@ofbiz.apache.org
> 主题: Re: A bug in 16.11.04
>
> Hi all,
>
> Is the fix to add translations to zh_CN for the four messages here:
>
> https://github.com/apache/ofbiz-framework/blob/trunk/framework/service/config/ServiceUiLabels.xml
> ?
>
> Thanks
>
> Paul Foxworthy
>
> On 28 March 2018 at 16:03, Deepak Dixit 
> wrote:
>
> > Hi Schumann,
> >
> > Could you please create jira ticket for the reported issue?
> >
> > Thanks & Regards
> > --
> > Deepak Dixit
> > www.hotwaxsystems.com
> > www.hotwax.co
> >
> > On Wed, Mar 28, 2018 at 6:37 AM, Schumann Ye
> > 
> > wrote:
> >
> > > Dear Gurus,
> > >
> > > I'd like to report a bug (found in my 16.11.04 but previously not in
> > > 16.11.03).
> > > If we go to party profile and try to add new security group from any
> > > userlogin (For my case, any except admin) in a locale of zh (or
> > > other, I
> > > assume) instead of en, after clicking "Add", the system will prompt
> > > an error something like "Could not find resource bundle
> > > [ServiceUiLabels] in the locale zh_CN.".
> > >
> > > I checked it in my version 16.11.03 and found no this issue.
> > > The issue could be solved then by adding corresponding locale.
> > >
> > > HIH.
> > >
> > > Best Regards
> > >
> > > Schumann
> > >
> > >
> >
>
>
>
> --
> Coherent Software Australia Pty Ltd
> PO Box 2773
> Cheltenham Vic 3192
> Australia
>
> Phone: +61 3 9585 6788
> Web: http://www.coherentsoftware.com.au/
> Email: i...@coherentsoftware.com.au
>


Re: Scheduled jobs weird behavior

2018-04-02 Thread Rishi Solanki
Hi Giulio,

+1 for Michael suggestion, you should try to backup the file locally before
transferring.

Another item I could see in your code (thanks for sharing) that, it just
connect and transfer the file to ftp location. I see many methods with
FTPClient class. One is to set the buffer size.
FTPClient.setBufferSize(int), which set the internal buffer size for
buffered data streams.

As you mentioned initially mostly you got the successful transfer, and
problem occurs very few time. Please consider the size of the file to
transfer and increase its buffer size should resolve your problem. Also
there are many other methods which allows you to get/set the transfer
status and mode etc should help.

Reference:
https://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPClient.html

HTH!



Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Fri, Mar 30, 2018 at 10:42 PM, Michael Brohl 
wrote:

> Hi Giulio,
>
> It seems you directly store the generated file to the ftp server, correct?
>
> In such cases, we store the file to be transferred locally in an archive
> directory and then transfer it to the ftp server.
>
> You'll see if the file was written and you have a backup in case there was
> something wrong with the ftp transfer.
>
> Best regards,
>
> Michael
>
>
> Am 30.03.18 um 16:16 schrieb Giulio Speri - MpStyle Srl:
>
> Hi Rishi,
>>
>> thanks for the reply!
>>
>> The api used for the ftp transfer are the apache FTP api, group
>> "commons-net" (version 3.5);
>> The code used to connect and store file via fftp is the following:
>>
>> ftp = new FTPClient()
>> ftp.connect "xxx.yy.ww"
>> ftp.enterLocalPassiveMode()
>> ftp.login "username", "password"
>> ftp.changeWorkingDirectory "INPUT_DIRECTORY"
>> //put
>> InputStream file_put= new FileInputStream(directoryZip);
>> ftp.setFileType(FTP.BINARY_FILE_TYPE);
>> ftp.storeFile(zipName, file_put);
>> file_put.close()
>> ftp.logout()
>> ftp.disconnect()
>>
>> Shouldn't Groovy automatically raise exception in case of errors?
>>
>>
>>
>>
>> 2018-03-30 15:07 GMT+02:00 Rishi Solanki :
>>
>> Giulio,
>>>
>>> In addition to what Nicolas suggested please share or look into the
>>> specific code which logs the files and export the orders at ftp locaion.
>>> Probable cause for such error writer create the file at particular
>>> location
>>> but could not push the data/file due to some reason but send no
>>> exception/failure.
>>>
>>> My guess problem should be related to pushing the exported data and logs
>>> to
>>> ftp location and is giving success but not pushing. Kind of case when we
>>> tell the writer object to write and close. Sometime writer.flush() is
>>> also
>>> required.
>>>
>>> Also if possible at your end then share the relevant code and api you are
>>> using, to better understand the problem.
>>>
>>> HTH!
>>>
>>>
>>> Rishi Solanki
>>> Sr Manager, Enterprise Software Development
>>> HotWax Systems Pvt. Ltd.
>>> Direct: +91-9893287847
>>> http://www.hotwaxsystems.com
>>> www.hotwax.co
>>>
>>> On Fri, Mar 30, 2018 at 5:48 PM, Nicolas Malin >> >
>>> wrote:
>>>
>>> Hello Giulio,

 On 30/03/2018 14:05, Giulio Speri - MpStyle Srl wrote:

 Hi all,
> [...] Now, here is the issue; sometimes (runtime in which happen seems
> random), I
> notice that:
> - the service in the Job List screen, has the state of "Finished" (no
> errors);
> - No log file nor zip file is written;
> - the flag on the OrderHeader entity has been set to "Y" (by default is
> null this field);
> - no error or exception found in ofbiz/error log files;
>
> The Job Poller on the second instance of ofbiz is disabled
> ("poll-enable=false" in serviceengine.xml), so that all the scheduled
>
 jobs
>>>
 are run only on the first instance.
>
> I am quite confused by this situation and I really don't know what and
> where to look, to understand what happens.
>
> Does anyone ever experienced a similar issue?
>
> I worked several time with service engine and I interpreted your
 feedback
 as follow :
 * the service in the Job List screen, has the state of "Finished" -> Ok
 for OFBiz the service return a success
 * the flag on the OrderHeader entity has been set to "Y" (by default is
 null this field); -> If your service run under transaction, no reason

>>> that
>>>
 your service correctly
 * No log file nor zip file is written
** I see different case, if you are sure that your code works
 properly
 check if you didn't manage some silent exception ( as
 try{...}catch(Exception){ }) and is it's the case review you exception
 management.
** Increase your code with more log with good log4j configuration for
 track your service.
** 

Re: 答复: 答复: 答复: A major bug in OFBiz Manufacturing MRP function

2018-04-02 Thread Jacopo Cappellato
On Sun, Apr 1, 2018 at 10:30 AM, Schumann Ye 
wrote:

> Hi Jacopo,
>
> Thanks for your hints.
> Actually I am not using SVN now, I've done quite some customizations so I
> would like to do it directly in the database mysql by using alter table.
> Is it ok if I do it this way?
>

Yes, you can directly alter the MRP_EVENT table.

Regards,

Jacopo